fix 增加离职人员判断

This commit is contained in:
2025-10-11 10:14:51 +08:00
parent 0de9991db6
commit 8a67c0d23a

View File

@@ -547,6 +547,13 @@ public class DevicePermissionService : IDevicePermissionService
.Where(x => userCodes.Contains(x.Code)) .Where(x => userCodes.Contains(x.Code))
.Select(x => x.No) .Select(x => x.No)
.ToListAsync(); .ToListAsync();
var userNoLeaves = await _dbContext.Queryable<GainfoLeaveEntity>()
.Where(x => userCodes.Contains(x.Code))
.Select(x => x.No)
.ToListAsync();
userNos.AddRange(userNoLeaves);
await _dbContext.Updateable<DeviceUserEntity>() await _dbContext.Updateable<DeviceUserEntity>()
.SetColumns(x => x.IsDeleted == true) .SetColumns(x => x.IsDeleted == true)