fix 优化通行记录判断

This commit is contained in:
2025-03-07 15:37:41 +08:00
parent 732a98f513
commit d4729fe703
2 changed files with 65 additions and 52 deletions

View File

@@ -78,8 +78,9 @@ public class WorkGridScheduleService : IWorkGridScheduleService
}
var maximumConsecutiveDtos = await MaximumConsecutiveUserCodesAsync(request.UserCodes, 10, request.Date);
maximumConsecutiveDtos.ThrowIfExists(maximumConsecutiveDtos.Select(x => $"{x.UserCode}已经连续排班10天({x.Start}-{x.End}),不可继续排班").Join("\r\n"));
//张三(工号)已连续排班10天,超10休1规定,禁止排班,请处理
maximumConsecutiveDtos.ThrowIfExists(maximumConsecutiveDtos.Select(x => $"{x.UserCode}已经连续排班10天({x.Start}-{x.End}),超10休1规定,禁止排班").Join("\r\n"));
var toInserts = request.UserCodes.Select(x => new WorkGridScheduleEntity
{
WorkGridCode = request.WorkGridCode,