fix 系统分组生成调整
This commit is contained in:
@@ -148,11 +148,19 @@ public class GainfoService : IGainfoService
|
||||
public async Task<GainfoCurrentResponse> CurrentUserInfoAsync()
|
||||
{
|
||||
var identityId = _currentUser.GetIntSubjectId();
|
||||
var code = _currentUser.GetUserClaim("jinko-code");
|
||||
var gainfo = await _gainfoStore.Queryable().Where(x => x.Code == code).FirstAsync()
|
||||
?? await _gainfoStore.Queryable().Where(x => x.IdentityUserId == identityId).FirstAsync();
|
||||
|
||||
var gainfo = await _gainfoStore.Queryable(GainfoStatusEnumType.Working)
|
||||
if (gainfo == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var info = await _gainfoStore.Queryable(GainfoStatusEnumType.Working)
|
||||
.LeftJoin<DepartmentEntity>((ga, department) => ga.DepartmentNo == department.No)
|
||||
.LeftJoin<CanteenUserEntity>((ga, department, mealUser) => ga.No == mealUser.UserNo)
|
||||
.Where((ga, department) => ga.IdentityUserId == identityId)
|
||||
.Where((ga, department) => ga.Id == gainfo.Id)
|
||||
.Select((ga, department, mealUser) => new GainfoCurrentResponse
|
||||
{
|
||||
UserNo = ga.No,
|
||||
@@ -169,7 +177,7 @@ public class GainfoService : IGainfoService
|
||||
})
|
||||
.FirstAsync();
|
||||
|
||||
return gainfo;
|
||||
return info;
|
||||
}
|
||||
|
||||
public async Task<IActionResult> GetFaceAsync(string token)
|
||||
@@ -368,9 +376,9 @@ public class GainfoService : IGainfoService
|
||||
.LeftJoin<PositionEntity>((ga, de, type, posi) => ga.Position == posi.Name)
|
||||
.LeftJoin<BasicTypeEntity>((ga, de, type, posi, type2) => ga.CountryNo == type2.Code && type2.Type == "country")
|
||||
.LeftJoin<BasicTypeEntity>((ga, de, type, posi, type2, type3) => ga.Nation == type3.Code && type3.Type == "nation")
|
||||
.LeftJoin<BasicTypeEntity>((ga, de, type, posi, type2, type3,type4) => ga.IdClass == type4.Code && type4.Type == "cls")
|
||||
.LeftJoin<BasicTypeEntity>((ga, de, type, posi, type2, type3, type4) => ga.IdClass == type4.Code && type4.Type == "cls")
|
||||
.Where(ga => ga.No == request.No)
|
||||
.Select((ga, de, type, posi, type2, type3,type4) => new GainfoDetailResponse
|
||||
.Select((ga, de, type, posi, type2, type3, type4) => new GainfoDetailResponse
|
||||
{
|
||||
No = ga.No,
|
||||
SapNo = ga.SapNo,
|
||||
@@ -389,7 +397,7 @@ public class GainfoService : IGainfoService
|
||||
Degree = ga.Degree,
|
||||
Werks = ga.Werks,
|
||||
CostId = ga.CostId,
|
||||
Marital = ga.Marital== "Single" ? "未婚":"已婚",
|
||||
Marital = ga.Marital == "Single" ? "未婚" : "已婚",
|
||||
CountryName = type2.Display,
|
||||
NationName = type3.Display,
|
||||
ClassName = type4.Display,
|
||||
|
||||
Reference in New Issue
Block a user