From 37f67cb2ce369d0125c372655cd49169db6965de Mon Sep 17 00:00:00 2001 From: liguoyang Date: Wed, 13 May 2026 13:33:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=86=8D=E6=AC=A1=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/Implements/GainfoUpdateService.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Src/Dlhis.Basic/Organization/Services/Implements/GainfoUpdateService.cs b/Src/Dlhis.Basic/Organization/Services/Implements/GainfoUpdateService.cs index 9cef8d54..1a1cf5fe 100644 --- a/Src/Dlhis.Basic/Organization/Services/Implements/GainfoUpdateService.cs +++ b/Src/Dlhis.Basic/Organization/Services/Implements/GainfoUpdateService.cs @@ -509,11 +509,12 @@ public class GainfoUpdateService : IGainfoUpdateService var first = modifiedPersons[0]; SapPersonItem historyPerson = null; var hasHistory = !string.IsNullOrWhiteSpace(first.ZWORKCODE) && lastMap.TryGetValue(first.ZWORKCODE, out historyPerson); + var diffType = hasHistory ? "Update" : "Insert"; var diffMessage = hasHistory ? string.Join("; ", GetFirstDiffFields(first, historyPerson)) : "历史记录不存在"; - _logger.LogWarning("SAP首条差异 ZWORKCODE:{workCode}, HasHistory:{hasHistory}, Diffs:{diffs}", - first.ZWORKCODE, hasHistory, diffMessage); + _logger.LogWarning("SAP首条差异 DiffType:{diffType}, ZWORKCODE:{workCode}, HasHistory:{hasHistory}, Diffs:{diffs}", + diffType, first.ZWORKCODE, hasHistory, diffMessage); } return modifiedPersons; @@ -599,10 +600,10 @@ public class GainfoUpdateService : IGainfoUpdateService ZZ_ZD = person.ZZ_ZD, Z_ZJ = person.Z_ZJ, STELL = person.PLANS,//person.STELL, 20251129变更 - STELL_NM = person.STELL_NM, + STELL_NM = person.STELL_NM ?? string.Empty, ZLZRQ = person.ZLZRQ, - MASSN = person.MASSN, - MNTXT = person.MNTXT, + MASSN = person.MASSN ?? string.Empty, + MNTXT = person.MNTXT ?? string.Empty, remark = rmk, native = native, sex = gender,