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--; } }