From ea22977a555ab3d2e9edcd5c46b61a0e766c979d Mon Sep 17 00:00:00 2001 From: liguoyang Date: Mon, 7 Apr 2025 10:36:47 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E5=8F=82=E6=95=B0=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/Implements/WorkGridScheduleService.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Src/Dlhis.Basic/WorkGrids/Services/Implements/WorkGridScheduleService.cs b/Src/Dlhis.Basic/WorkGrids/Services/Implements/WorkGridScheduleService.cs index 6a61b533..2d4881fd 100644 --- a/Src/Dlhis.Basic/WorkGrids/Services/Implements/WorkGridScheduleService.cs +++ b/Src/Dlhis.Basic/WorkGrids/Services/Implements/WorkGridScheduleService.cs @@ -55,7 +55,8 @@ public class WorkGridScheduleService : IWorkGridScheduleService { x.Code, x.Name, x.LeaderUserCode, - LeaderUserName = ga.Name + LeaderUserName = ga.Name, + x.MaxConsecutiveLimitCount }) .SingleAsync(); workGrid.ThrowIfNull("工作网格不存在"); @@ -100,8 +101,8 @@ public class WorkGridScheduleService : IWorkGridScheduleService existsUserCodes.ThrowIfExists(existsUserCodes.Join(",") + $"在{dateAfter.ToString("yyyy-MM-dd")}已存在{WorkGridTimePeriodEnumType.Day.GetDescription()}"); } - var maximumConsecutiveDtos = await MaximumConsecutiveUserCodesAsync(request.UserCodes, 10, request.Date); - maximumConsecutiveDtos.ThrowIfExists(maximumConsecutiveDtos.Select(x => $"{x.UserCode}已经连续排班10天({x.Start}-{x.End}),禁止排班").Join("\r\n")); + var maximumConsecutiveDtos = await MaximumConsecutiveUserCodesAsync(request.UserCodes, workGrid.MaxConsecutiveLimitCount, request.Date); + maximumConsecutiveDtos.ThrowIfExists(maximumConsecutiveDtos.Select(x => $"{x.UserCode}已经连续排班{workGrid.MaxConsecutiveLimitCount}天({x.Start}-{x.End}),禁止排班").Join("\r\n")); var toInserts = request.UserCodes.Select(x => new WorkGridScheduleEntity {