fix 网格排班移除处理

This commit is contained in:
2025-05-23 17:37:27 +08:00
parent 81be8763a4
commit 55eee61e02

View File

@@ -282,6 +282,8 @@ public class GainfoUpdateService : IGainfoUpdateService
}
}
var hasAllChange = gainfo.Factory != factory || gainfo.Workplace != workplace;
await _dbContext.Updateable<GainfoEntity>().SetColumns(g => new GainfoEntity
{
InternalNo = item.PERNR,
@@ -302,11 +304,10 @@ public class GainfoUpdateService : IGainfoUpdateService
ModifiedTime = DateTime.Now
}).Where(x => x.Code == item.ename).ExecuteCommandAsync();
if (change.IsPresent())
if (hasAllChange)
{
await _gainfoPermissionService.ResetPermissionsAsync(gainfo.No, DeviceTaskEnumType.Add, null, $"异动生成({change})");
var workGridUser = await _dbContext.Queryable<WorkGridUserEntity>().Where(x => x.UserCode == gainfo.Code).SingleAsync();
if (workGridUser != null)
{