diff --git a/Src/Dlhis.Basic/Organization/Response/GainfoDetailResponse.cs b/Src/Dlhis.Basic/Organization/Response/GainfoDetailResponse.cs
index af1460b3..e3c21c36 100644
--- a/Src/Dlhis.Basic/Organization/Response/GainfoDetailResponse.cs
+++ b/Src/Dlhis.Basic/Organization/Response/GainfoDetailResponse.cs
@@ -25,11 +25,6 @@ public class GainfoDetailResponse
///
public string Code { get; set; }
- ///
- /// 部门
- ///
- public string DepartmentNo { get; set; }
-
///
/// 部门名称
///
@@ -71,7 +66,7 @@ public class GainfoDetailResponse
public string Address { get; set; }
///
- /// 生日
+ /// 出生日期
///
public DateTime Birthday { get; set; }
@@ -95,6 +90,11 @@ public class GainfoDetailResponse
///
public string Degree { get; set; }
+ ///
+ /// 职级
+ ///
+ public string Title { get; set; }
+
///
/// 人事范围
///
diff --git a/Src/Dlhis.Basic/Organization/Services/Implements/GainfoService.cs b/Src/Dlhis.Basic/Organization/Services/Implements/GainfoService.cs
index 9640d7f3..a2ca22a7 100644
--- a/Src/Dlhis.Basic/Organization/Services/Implements/GainfoService.cs
+++ b/Src/Dlhis.Basic/Organization/Services/Implements/GainfoService.cs
@@ -424,7 +424,7 @@ public class GainfoService : IGainfoService
{
var info = await _gainfoStore.Queryable(request.Status)
.LeftJoin((ga, de) => ga.DepartmentNo == de.No)
- .LeftJoin((ga, de, pos) => ga.Position == pos.Name)
+ .LeftJoin((ga, de, pos) => ga.PositionNo == pos.No)
.Where(ga => ga.No == request.No)
.Select((ga, de, pos) => new GainfoDetailResponse
{
@@ -432,25 +432,27 @@ public class GainfoService : IGainfoService
SapNo = ga.SapNo,
Name = ga.Name,
Code = ga.Code,
- DepartmentName = de.Name,
IdClass = ga.IdClass,
IdNo = ga.IdNo,
Gender = ga.Gender,
Address = ga.Address,
Birthday = ga.Birthday,
Phone = ga.Phone,
- Position = ga.Position,
- Grade = pos.Grade,
+ Grade = ga.Grade,
+ Title = ga.Title,
Degree = ga.Degree,
Werks = ga.Werks,
CostId = ga.CostId,
- Marital = ga.Marital == "Single" ? "未婚" : "已婚",
+ Marital = "未知",
NativeName = ga.Native,
CountryName = ga.CountryNo,
NationName = ga.Nation,
ClassName = ga.IdClass,
Factory = ga.Factory,
OnboardingDate = ga.CreateTime,
+
+ DepartmentName = de.Name,
+ Position = pos.Name,
})
.SingleAsync();
@@ -460,14 +462,18 @@ public class GainfoService : IGainfoService
var types = await _dbContext.Queryable().Where(x => searchTypes.Contains(x.Type)).ToListAsync();
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.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)
{
info.Face = await _dbContext.ChangeDb("face").Queryable().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;
diff --git a/Src/Dlhis.Entity/Basic/Entity/GainfoEntity.cs b/Src/Dlhis.Entity/Basic/Entity/GainfoEntity.cs
index 63631b17..e1fbc481 100644
--- a/Src/Dlhis.Entity/Basic/Entity/GainfoEntity.cs
+++ b/Src/Dlhis.Entity/Basic/Entity/GainfoEntity.cs
@@ -89,11 +89,11 @@ public class GainfoEntity : SugarBaseEntity
[SugarColumn(ColumnDescription = "身份证地址")]
public string Address { get; set; }
- ///
- /// 已婚/未婚
- ///
- [SugarColumn(ColumnDescription = "已婚/未婚")]
- public string Marital { get; set; }
+ /////
+ ///// 已婚/未婚
+ /////
+ //[SugarColumn(ColumnDescription = "已婚/未婚")]
+ //public string Marital { get; set; }
///
/// 部门编码
@@ -123,7 +123,19 @@ public class GainfoEntity : SugarBaseEntity
/// 岗位
///
[SugarColumn(ColumnDescription = "岗位")]
- public string Position { get; set; }
+ public string PositionNo { get; set; }
+
+ ///
+ /// 职等
+ ///
+ [SugarColumn(ColumnDescription = "职等")]
+ public string Grade { get; set; }
+
+ ///
+ /// 职级
+ ///
+ [SugarColumn(ColumnDescription = "职级")]
+ public string Title { get; set; }
///
/// 卡号
diff --git a/Src/Dlhis.ScheduledTask/SyncSapInfo/Job/SyncPersonJob.cs b/Src/Dlhis.ScheduledTask/SyncSapInfo/Job/SyncPersonJob.cs
index f6aa1900..1d7e09af 100644
--- a/Src/Dlhis.ScheduledTask/SyncSapInfo/Job/SyncPersonJob.cs
+++ b/Src/Dlhis.ScheduledTask/SyncSapInfo/Job/SyncPersonJob.cs
@@ -174,7 +174,9 @@ public class SyncPersonJob
Nation = item.nation,
Phone = item.phone,
Degree = item.email,
- Position = item.web,
+ Grade = item.ZZ_ZD,
+ Title = item.Z_ZJ,
+ PositionNo = item.STELL,
Remark = item.remark,
Werks = item.WERKS,
CostId = item.KOSTL,
@@ -200,6 +202,9 @@ public class SyncPersonJob
email = item.email,
WERKS = item.WERKS,
KOSTL = item.KOSTL,
+ STELL = item.STELL,
+ Z_ZJ = item.Z_ZJ,
+ ZZ_ZD = item.ZZ_ZD,
ZZ_GZDJDNM = item.ZZ_GZDJDNM,
ZZ_GZDCQNM = item.ZZ_GZDCQNM,
})
@@ -217,7 +222,9 @@ public class SyncPersonJob
{
SapNo = item.PERNR,
Name = item.gname,
- Position = item.web,
+ PositionNo = item.STELL,
+ Grade = item.ZZ_ZD,
+ Title = item.Z_ZJ,
Phone = item.phone,
DepartmentNo = item.appellation,
Remark = item.remark,