From 4d1dbd19858441de1f6c3e2690b015d980ccd8d0 Mon Sep 17 00:00:00 2001 From: liguoyang Date: Thu, 18 Dec 2025 09:40:58 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E9=80=BB=E8=BE=91=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/Implements/AppointmentService.cs | 20 +++++++------------ 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/Src/Dlhis.Basic/Appointment/Services/Implements/AppointmentService.cs b/Src/Dlhis.Basic/Appointment/Services/Implements/AppointmentService.cs index 16b66021..a2e37a6e 100644 --- a/Src/Dlhis.Basic/Appointment/Services/Implements/AppointmentService.cs +++ b/Src/Dlhis.Basic/Appointment/Services/Implements/AppointmentService.cs @@ -380,11 +380,8 @@ public class AppointmentService : IAppointmentService .Select(x => new { x.Type, - Period = new DatePeriod - { - Start = x.Start, - End = x.End - } + x.Start, + x.End }) .ToListAsync(); @@ -419,7 +416,7 @@ public class AppointmentService : IAppointmentService //date.DayOfWeek foreach (var holiday in holidaies) { - var isPresent = date >= holiday.Period.Start && date <= holiday.Period.Start; + var isPresent = date >= holiday.Start && date <= holiday.Start; if (isPresent) { if (holiday.Type == HolidayEnumType.Rest) @@ -427,13 +424,10 @@ public class AppointmentService : IAppointmentService days--; } } - else - { - if (weekends.Contains(date.DayOfWeek)) - { - days--; - } - } + } + if (weekends.Contains(date.DayOfWeek)) + { + days--; } }