From 008096302b24a3fbfe91d568abe253f8ba53e2e9 Mon Sep 17 00:00:00 2001 From: liguoyang Date: Wed, 6 May 2026 13:57:20 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E8=B0=83=E6=95=B4=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Organization/Comparers/SapPersonComparer.cs | 6 ++++-- .../Services/Implements/GainfoUpdateService.cs | 10 +++++++--- .../Services/Implements/JinkoSapService.cs | 3 ++- Src/Dlhis.Entity/Basic/Entity/GainfoEntity.cs | 6 ++++++ Src/Dlhis.Entity/Basic/Entity/GainfoSapEntity.cs | 2 ++ Src/Dlhis.Jip.Api/Dto/SapPersonItem.cs | 5 +++-- 6 files changed, 24 insertions(+), 8 deletions(-) diff --git a/Src/Dlhis.Basic/Organization/Comparers/SapPersonComparer.cs b/Src/Dlhis.Basic/Organization/Comparers/SapPersonComparer.cs index 0d92861c..7072b332 100644 --- a/Src/Dlhis.Basic/Organization/Comparers/SapPersonComparer.cs +++ b/Src/Dlhis.Basic/Organization/Comparers/SapPersonComparer.cs @@ -23,7 +23,8 @@ public class SapPersonComparer : IEqualityComparer && 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 ^ 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() diff --git a/Src/Dlhis.Basic/Organization/Services/Implements/GainfoUpdateService.cs b/Src/Dlhis.Basic/Organization/Services/Implements/GainfoUpdateService.cs index 2c7d2a01..5af39e8f 100644 --- a/Src/Dlhis.Basic/Organization/Services/Implements/GainfoUpdateService.cs +++ b/Src/Dlhis.Basic/Organization/Services/Implements/GainfoUpdateService.cs @@ -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变更 diff --git a/Src/Dlhis.Basic/Organization/Services/Implements/JinkoSapService.cs b/Src/Dlhis.Basic/Organization/Services/Implements/JinkoSapService.cs index 6338af55..922b6a95 100644 --- a/Src/Dlhis.Basic/Organization/Services/Implements/JinkoSapService.cs +++ b/Src/Dlhis.Basic/Organization/Services/Implements/JinkoSapService.cs @@ -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 @@ -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()); diff --git a/Src/Dlhis.Entity/Basic/Entity/GainfoEntity.cs b/Src/Dlhis.Entity/Basic/Entity/GainfoEntity.cs index 9dae17ee..0f9b9dd1 100644 --- a/Src/Dlhis.Entity/Basic/Entity/GainfoEntity.cs +++ b/Src/Dlhis.Entity/Basic/Entity/GainfoEntity.cs @@ -44,6 +44,12 @@ public class GainfoEntity : SugarBaseEntity [SugarColumn(IsNullable = false, ColumnDescription = "姓名")] public string Name { get; set; } + /// + /// 姓名 + /// + [SugarColumn(IsNullable = true, ColumnDescription = "姓名")] + public string NameEn { get; set; } + /// /// 学工号 /// diff --git a/Src/Dlhis.Entity/Basic/Entity/GainfoSapEntity.cs b/Src/Dlhis.Entity/Basic/Entity/GainfoSapEntity.cs index cf62cdbe..2aac478a 100644 --- a/Src/Dlhis.Entity/Basic/Entity/GainfoSapEntity.cs +++ b/Src/Dlhis.Entity/Basic/Entity/GainfoSapEntity.cs @@ -18,6 +18,7 @@ namespace Dlhis.Entity.Basic.Entity public string answer { get; set; } public string gname { get; set; } + public string gname2 { get; set; } public string ename { get; set; } @@ -106,6 +107,7 @@ namespace Dlhis.Entity.Basic.Entity public string MASSG { get; set; } public string MGTXT { get; set; } + public DateTime? logdate { get; set; } public DateTime? updatelogdate { get; set; } diff --git a/Src/Dlhis.Jip.Api/Dto/SapPersonItem.cs b/Src/Dlhis.Jip.Api/Dto/SapPersonItem.cs index 5346dcc8..2fab6c33 100644 --- a/Src/Dlhis.Jip.Api/Dto/SapPersonItem.cs +++ b/Src/Dlhis.Jip.Api/Dto/SapPersonItem.cs @@ -2,7 +2,7 @@ namespace Dlhis.Jip.Api.Dto; public class SapPersonItem { - public string KOSTL { get; set; } + public string KOSTL_XJ { get; set; } /// /// 离职日期 @@ -141,6 +141,7 @@ public class SapPersonItem /// /// public string NAME { get; set; } + public string NAME2 { get; set; } /// /// /// @@ -198,7 +199,7 @@ public class SapPersonItem /// 国家 /// public string ZZ_COUNNM { get; set; } - + /// /// 基地 ///