From 6b5603cc0e473ccd51c71feb28f2ba3c3e07eae8 Mon Sep 17 00:00:00 2001 From: liguoyang Date: Thu, 30 Oct 2025 14:10:34 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E7=BD=91=E6=A0=BC=E7=99=BD=E7=8F=AD?= =?UTF-8?q?=E6=97=B6=E6=AE=B5=E7=A0=81=E7=A6=81=E6=AD=A2=E8=B7=A8=E5=A4=A9?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WorkGrids/Request/WorkGridTimePeriodSaveRequest.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Src/Dlhis.Basic/WorkGrids/Request/WorkGridTimePeriodSaveRequest.cs b/Src/Dlhis.Basic/WorkGrids/Request/WorkGridTimePeriodSaveRequest.cs index c2ccef6c..168f5899 100644 --- a/Src/Dlhis.Basic/WorkGrids/Request/WorkGridTimePeriodSaveRequest.cs +++ b/Src/Dlhis.Basic/WorkGrids/Request/WorkGridTimePeriodSaveRequest.cs @@ -43,13 +43,9 @@ public class WorkGridTimePeriodSaveRequest : IValidatableObject yield break; } - var today = DateTime.Today; - var start = today.Add(Start.AddMinutes(-Before).ToTimeSpan()); - var end = today.Add(End.AddMinutes(After).ToTimeSpan()); - - if (start.Date != end.Date) + if (End.AddMinutes(After) < End) { - yield return new ValidationResult(WorkGridTimePeriodEnumType.Day.GetDescription() + "禁止跨天", new[] { nameof(Type) }); + yield return new ValidationResult(WorkGridTimePeriodEnumType.Day.GetDescription() + "禁止跨天,请检查时间段配置", new[] { nameof(Type) }); } } } \ No newline at end of file