From 12dad0b8b49415e164f9166b00c5b6ec9dbc83e4 Mon Sep 17 00:00:00 2001 From: liguoyang Date: Fri, 10 Jan 2025 13:56:34 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BA=BA=E5=91=98=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E5=BC=82=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/Implements/GainfoUpdateService.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Src/Dlhis.Basic/Organization/Services/Implements/GainfoUpdateService.cs b/Src/Dlhis.Basic/Organization/Services/Implements/GainfoUpdateService.cs index 2306e371..7663e18d 100644 --- a/Src/Dlhis.Basic/Organization/Services/Implements/GainfoUpdateService.cs +++ b/Src/Dlhis.Basic/Organization/Services/Implements/GainfoUpdateService.cs @@ -285,9 +285,18 @@ public class GainfoUpdateService : IGainfoUpdateService ResignationDate = item.ZLZRQ, Workplace = workplace, Factory = factory, + ModifiedTime = DateTime.Now }).Where(x => x.Code == item.ename).ExecuteCommandAsync(); - await _identityUserSyncService.SyncAccountAsync(gainfo.Code, gainfo.Name, gainfo.IdNo, factory); + if (gainfo.Factory != factory) + { + await _identityUserSyncService.SyncAccountAsync(gainfo.Code, gainfo.Name, gainfo.IdNo, factory); + } + + if (gainfo.Factory != factory || gainfo.Workplace != workplace || gainfo.DepartmentNo != item.appellation) + { + await _gainfoPermissionService.ResetPermissionsAsync(gainfo.No, DeviceTaskEnumType.Delete, null, "异动生成"); + } } else { @@ -346,7 +355,7 @@ public class GainfoUpdateService : IGainfoUpdateService } } } - + await _dbContext.Client.Ado.CommitTranAsync(); } catch (Exception ex)