fix 优化gainfo
This commit is contained in:
@@ -25,11 +25,6 @@ public class GainfoDetailResponse
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string Code { get; set; }
|
public string Code { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 部门
|
|
||||||
/// </summary>
|
|
||||||
public string DepartmentNo { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 部门名称
|
/// 部门名称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -71,7 +66,7 @@ public class GainfoDetailResponse
|
|||||||
public string Address { get; set; }
|
public string Address { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 生日
|
/// 出生日期
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime Birthday { get; set; }
|
public DateTime Birthday { get; set; }
|
||||||
|
|
||||||
@@ -95,6 +90,11 @@ public class GainfoDetailResponse
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string Degree { get; set; }
|
public string Degree { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 职级
|
||||||
|
/// </summary>
|
||||||
|
public string Title { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 人事范围
|
/// 人事范围
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -424,7 +424,7 @@ public class GainfoService : IGainfoService
|
|||||||
{
|
{
|
||||||
var info = await _gainfoStore.Queryable(request.Status)
|
var info = await _gainfoStore.Queryable(request.Status)
|
||||||
.LeftJoin<DepartmentEntity>((ga, de) => ga.DepartmentNo == de.No)
|
.LeftJoin<DepartmentEntity>((ga, de) => ga.DepartmentNo == de.No)
|
||||||
.LeftJoin<PositionEntity>((ga, de, pos) => ga.Position == pos.Name)
|
.LeftJoin<PositionEntity>((ga, de, pos) => ga.PositionNo == pos.No)
|
||||||
.Where(ga => ga.No == request.No)
|
.Where(ga => ga.No == request.No)
|
||||||
.Select((ga, de, pos) => new GainfoDetailResponse
|
.Select((ga, de, pos) => new GainfoDetailResponse
|
||||||
{
|
{
|
||||||
@@ -432,25 +432,27 @@ public class GainfoService : IGainfoService
|
|||||||
SapNo = ga.SapNo,
|
SapNo = ga.SapNo,
|
||||||
Name = ga.Name,
|
Name = ga.Name,
|
||||||
Code = ga.Code,
|
Code = ga.Code,
|
||||||
DepartmentName = de.Name,
|
|
||||||
IdClass = ga.IdClass,
|
IdClass = ga.IdClass,
|
||||||
IdNo = ga.IdNo,
|
IdNo = ga.IdNo,
|
||||||
Gender = ga.Gender,
|
Gender = ga.Gender,
|
||||||
Address = ga.Address,
|
Address = ga.Address,
|
||||||
Birthday = ga.Birthday,
|
Birthday = ga.Birthday,
|
||||||
Phone = ga.Phone,
|
Phone = ga.Phone,
|
||||||
Position = ga.Position,
|
Grade = ga.Grade,
|
||||||
Grade = pos.Grade,
|
Title = ga.Title,
|
||||||
Degree = ga.Degree,
|
Degree = ga.Degree,
|
||||||
Werks = ga.Werks,
|
Werks = ga.Werks,
|
||||||
CostId = ga.CostId,
|
CostId = ga.CostId,
|
||||||
Marital = ga.Marital == "Single" ? "未婚" : "已婚",
|
Marital = "未知",
|
||||||
NativeName = ga.Native,
|
NativeName = ga.Native,
|
||||||
CountryName = ga.CountryNo,
|
CountryName = ga.CountryNo,
|
||||||
NationName = ga.Nation,
|
NationName = ga.Nation,
|
||||||
ClassName = ga.IdClass,
|
ClassName = ga.IdClass,
|
||||||
Factory = ga.Factory,
|
Factory = ga.Factory,
|
||||||
OnboardingDate = ga.CreateTime,
|
OnboardingDate = ga.CreateTime,
|
||||||
|
|
||||||
|
DepartmentName = de.Name,
|
||||||
|
Position = pos.Name,
|
||||||
})
|
})
|
||||||
.SingleAsync();
|
.SingleAsync();
|
||||||
|
|
||||||
@@ -460,14 +462,18 @@ public class GainfoService : IGainfoService
|
|||||||
var types = await _dbContext.Queryable<BasicTypeEntity>().Where(x => searchTypes.Contains(x.Type)).ToListAsync();
|
var types = await _dbContext.Queryable<BasicTypeEntity>().Where(x => searchTypes.Contains(x.Type)).ToListAsync();
|
||||||
|
|
||||||
info.NativeName = types.Where(x => x.Type == "native").FirstOrDefault(x => x.Code == info.NativeName)?.Display;
|
info.NativeName = types.Where(x => x.Type == "native").FirstOrDefault(x => x.Code == info.NativeName)?.Display;
|
||||||
info.CountryName = types.Where(x => x.Type == "country").FirstOrDefault(x => x.Code == info.CountryName)?.Display;
|
info.CountryName = types.Where(x => x.Type == "country").FirstOrDefault(x => x.Code == info.CountryName)?.Display ?? "中国";
|
||||||
info.NationName = types.Where(x => x.Type == "nation").FirstOrDefault(x => x.Code == info.NationName)?.Display;
|
info.NationName = types.Where(x => x.Type == "nation").FirstOrDefault(x => x.Code == info.NationName)?.Display;
|
||||||
info.ClassName = types.Where(x => x.Type == "cls").FirstOrDefault(x => x.Code == info.ClassName)?.Display;
|
info.ClassName = types.Where(x => x.Type == "cls").FirstOrDefault(x => x.Code == info.ClassName)?.Display ?? "身份证";
|
||||||
|
|
||||||
if (request.WithFace)
|
if (request.WithFace)
|
||||||
{
|
{
|
||||||
info.Face = await _dbContext.ChangeDb("face").Queryable<GainfoFaceEntity>().Where(x => x.UserCode == info.Code).Select(x => x.Face).SingleAsync();
|
info.Face = await _dbContext.ChangeDb("face").Queryable<GainfoFaceEntity>().Where(x => x.UserCode == info.Code).Select(x => x.Face).SingleAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var tenantsResult = await _tenantApi.GetTenantsInternalAsync();
|
||||||
|
var tenants = tenantsResult.Data;
|
||||||
|
info.FactoryName = tenants.FirstOrDefault(x => x.Code == info.Factory)?.Name;
|
||||||
}
|
}
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
|
|||||||
@@ -89,11 +89,11 @@ public class GainfoEntity : SugarBaseEntity
|
|||||||
[SugarColumn(ColumnDescription = "身份证地址")]
|
[SugarColumn(ColumnDescription = "身份证地址")]
|
||||||
public string Address { get; set; }
|
public string Address { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
///// <summary>
|
||||||
/// 已婚/未婚
|
///// 已婚/未婚
|
||||||
/// </summary>
|
///// </summary>
|
||||||
[SugarColumn(ColumnDescription = "已婚/未婚")]
|
//[SugarColumn(ColumnDescription = "已婚/未婚")]
|
||||||
public string Marital { get; set; }
|
//public string Marital { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 部门编码
|
/// 部门编码
|
||||||
@@ -123,7 +123,19 @@ public class GainfoEntity : SugarBaseEntity
|
|||||||
/// 岗位
|
/// 岗位
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(ColumnDescription = "岗位")]
|
[SugarColumn(ColumnDescription = "岗位")]
|
||||||
public string Position { get; set; }
|
public string PositionNo { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 职等
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "职等")]
|
||||||
|
public string Grade { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 职级
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "职级")]
|
||||||
|
public string Title { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 卡号
|
/// 卡号
|
||||||
|
|||||||
@@ -174,7 +174,9 @@ public class SyncPersonJob
|
|||||||
Nation = item.nation,
|
Nation = item.nation,
|
||||||
Phone = item.phone,
|
Phone = item.phone,
|
||||||
Degree = item.email,
|
Degree = item.email,
|
||||||
Position = item.web,
|
Grade = item.ZZ_ZD,
|
||||||
|
Title = item.Z_ZJ,
|
||||||
|
PositionNo = item.STELL,
|
||||||
Remark = item.remark,
|
Remark = item.remark,
|
||||||
Werks = item.WERKS,
|
Werks = item.WERKS,
|
||||||
CostId = item.KOSTL,
|
CostId = item.KOSTL,
|
||||||
@@ -200,6 +202,9 @@ public class SyncPersonJob
|
|||||||
email = item.email,
|
email = item.email,
|
||||||
WERKS = item.WERKS,
|
WERKS = item.WERKS,
|
||||||
KOSTL = item.KOSTL,
|
KOSTL = item.KOSTL,
|
||||||
|
STELL = item.STELL,
|
||||||
|
Z_ZJ = item.Z_ZJ,
|
||||||
|
ZZ_ZD = item.ZZ_ZD,
|
||||||
ZZ_GZDJDNM = item.ZZ_GZDJDNM,
|
ZZ_GZDJDNM = item.ZZ_GZDJDNM,
|
||||||
ZZ_GZDCQNM = item.ZZ_GZDCQNM,
|
ZZ_GZDCQNM = item.ZZ_GZDCQNM,
|
||||||
})
|
})
|
||||||
@@ -217,7 +222,9 @@ public class SyncPersonJob
|
|||||||
{
|
{
|
||||||
SapNo = item.PERNR,
|
SapNo = item.PERNR,
|
||||||
Name = item.gname,
|
Name = item.gname,
|
||||||
Position = item.web,
|
PositionNo = item.STELL,
|
||||||
|
Grade = item.ZZ_ZD,
|
||||||
|
Title = item.Z_ZJ,
|
||||||
Phone = item.phone,
|
Phone = item.phone,
|
||||||
DepartmentNo = item.appellation,
|
DepartmentNo = item.appellation,
|
||||||
Remark = item.remark,
|
Remark = item.remark,
|
||||||
|
|||||||
Reference in New Issue
Block a user