fix 人员更新异动

This commit is contained in:
2025-01-10 13:56:34 +08:00
parent 4837e7af97
commit 12dad0b8b4

View File

@@ -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)