From 4ece8fc1e5f07611ebe86df4fe1537f1d2360585 Mon Sep 17 00:00:00 2001 From: liguoyang Date: Wed, 13 May 2026 13:52:33 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E5=88=A4=E6=96=AD=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E5=AD=98=E5=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Organization/Services/Implements/GainfoUpdateService.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Src/Dlhis.Basic/Organization/Services/Implements/GainfoUpdateService.cs b/Src/Dlhis.Basic/Organization/Services/Implements/GainfoUpdateService.cs index 1a1cf5fe..2d659763 100644 --- a/Src/Dlhis.Basic/Organization/Services/Implements/GainfoUpdateService.cs +++ b/Src/Dlhis.Basic/Organization/Services/Implements/GainfoUpdateService.cs @@ -178,7 +178,11 @@ public class GainfoUpdateService : IGainfoUpdateService if (item.isowner == "T") { - await _dbContext.InsertAsync(info); + if (!await _dbContext.Queryable().AnyAsync(x => x.Code == item.ename)) + { + await _dbContext.InsertAsync(info); + } + await _identityUserSyncService.SyncAccountAsync(info.Code, info.Name, info.IdNo, info.Factory); } else