fix 考勤记录上传needUpload重新判断
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user