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)