fix 考勤记录上传needUpload重新判断

This commit is contained in:
2025-03-05 14:42:54 +08:00
parent 72f040487a
commit 639432234f

View File

@@ -99,7 +99,7 @@ public class DeviceUploadLogService : IDeviceUploadLogService
var workGridInfo = new WorkGridInfo();
var currentWorkGridTimePeriods = workGridTimePeriods.Where(x => x.TenantId == device.TenantId).ToList();
var workGridUser = workGridUsers.FirstOrDefault(x => x.UserCode == request.UserUniqueNo);
if (currentWorkGridTimePeriods.Any() && workGridUser != null)
if (needUpload && currentWorkGridTimePeriods.Any() && workGridUser != null)
{
workGridInfo.TimeSetting = currentWorkGridTimePeriods;
workGridInfo.WorkGrid = new
@@ -152,6 +152,8 @@ public class DeviceUploadLogService : IDeviceUploadLogService
}
}
}
needUpload = workGridInfo.PeriodType.HasValue;
}
inserts.Add(new DeviceUploadLogEntity
@@ -406,6 +408,4 @@ public class WorkGridInfo
public object WorkGrid { get; set; }
public WorkGridTimePeriodEnumType? PeriodType { get; set; }
public object TimeSetting { get; set; }
public bool NeedUpload => WorkGrid != null && PeriodType.HasValue;
}