fix 调整同步字段

This commit is contained in:
2026-05-06 13:57:20 +08:00
parent 278300a4f4
commit 008096302b
6 changed files with 24 additions and 8 deletions

View File

@@ -23,7 +23,8 @@ public class SapPersonComparer : IEqualityComparer<SapPersonItem>
&& x.ZWORKCODE == y.ZWORKCODE
&& (x.ZMOBILE ?? string.Empty) == (y.ZMOBILE ?? string.Empty)
&& (x.ZSTATUS ?? string.Empty) == (y.ZSTATUS ?? string.Empty)
&& (x.KOSTL ?? string.Empty) == (y.KOSTL ?? string.Empty)
&& (x.KOSTL_XJ ?? string.Empty) == (y.KOSTL_XJ ?? string.Empty)
&& (x.NAME2 ?? string.Empty) == (y.NAME2 ?? string.Empty)
&& (x.ZZ_ZD ?? string.Empty) == (y.ZZ_ZD ?? string.Empty)
&& (x.Z_ZJ ?? string.Empty) == (y.Z_ZJ ?? string.Empty)
&& x.ZRZRQ == y.ZRZRQ
@@ -51,7 +52,8 @@ public class SapPersonComparer : IEqualityComparer<SapPersonItem>
^ obj.ZWORKCODE.SafeGetHashCode()
^ obj.ZMOBILE.SafeGetHashCode()
^ obj.ZSTATUS.SafeGetHashCode()
^ obj.KOSTL.SafeGetHashCode()
^ obj.KOSTL_XJ.SafeGetHashCode()
^ obj.NAME2.SafeGetHashCode()
^ obj.ZZ_ZD.SafeGetHashCode()
^ obj.Z_ZJ.SafeGetHashCode()
^ obj.ZRZRQ.SafeGetHashCode()

View File

@@ -204,6 +204,7 @@ public class GainfoUpdateService : IGainfoUpdateService
InternalNo = item.PERNR,
Type = GainfoUserTypeEnumType.Normal,
Name = item.gname,
NameEn = item.gname2,
Code = item.ename,
CountryNo = item.country,
IdClass = item.idcls,
@@ -240,6 +241,7 @@ public class GainfoUpdateService : IGainfoUpdateService
{
PERNR = item.PERNR,
gname = item.gname,
gname2 = item.gname2,
phone = item.phone,
appellation = item.appellation,
isowner = item.isowner,
@@ -365,7 +367,7 @@ public class GainfoUpdateService : IGainfoUpdateService
}
}
}
else
else
{
await _gainfoPermissionService.ResetPermissionsAsync(gainfo.No, DeviceTaskEnumType.Delete, null, null, "人员离职生成");
@@ -463,6 +465,7 @@ public class GainfoUpdateService : IGainfoUpdateService
return gainfos.Select(x => new SapPersonItem
{
NAME = x.gname,
NAME2 = x.gname2,
ZWORKCODE = x.ename,
ZZ_SFZH = x.idno,
GBDAT = x.birthday,
@@ -473,7 +476,7 @@ public class GainfoUpdateService : IGainfoUpdateService
ZRZRQ = x.createdate,
PERNR = x.PERNR,
WERKS = x.WERKS,
KOSTL = x.KOSTL,
KOSTL_XJ = x.KOSTL,
ZZ_ZD = x.ZZ_ZD,
Z_ZJ = x.Z_ZJ,
PLANS = x.STELL, //x.STELL, 20251129变更
@@ -511,6 +514,7 @@ public class GainfoUpdateService : IGainfoUpdateService
GainfoSapEntity o = new()
{
gname = person.NAME,
gname2 = person.NAME2,
ename = person.ZWORKCODE,
idno = person.ZZ_SFZH,
birthday = person.GBDAT,
@@ -521,7 +525,7 @@ public class GainfoUpdateService : IGainfoUpdateService
createdate = person.ZRZRQ,
PERNR = person.PERNR,
WERKS = person.WERKS,
KOSTL = person.KOSTL,
KOSTL = person.KOSTL_XJ,
ZZ_ZD = person.ZZ_ZD,
Z_ZJ = person.Z_ZJ,
STELL = person.PLANS,//person.STELL, 20251129变更

View File

@@ -80,6 +80,7 @@ public class JinkoSapService : IJinkoSapService
var body = new
{
//I_ALLINFO = "X",
//I_DATE = DateTime.Today.ToString("yyyy-MM-dd"),//开始日期
T_WERKS = new
{
item = new List<object>
@@ -95,7 +96,7 @@ public class JinkoSapService : IJinkoSapService
};
var content = new StringContent(JsonConvert.SerializeObject(body), Encoding.UTF8, "application/json");
var response = await httpClient.PostAsync("/JIP/HCM/HCM_SYN_03", content);
var response = await httpClient.PostAsync("/JIP/HCM/HCM_SYN_03_IAM", content);
if (response.StatusCode != HttpStatusCode.OK)
{
_logger.LogError("获取{Werk}人事范围数据异常:{error}", werk, await response.Content.ReadAsStringAsync());