fix 逻辑问题处理

This commit is contained in:
2025-12-18 09:40:58 +08:00
parent 0fb0cb1038
commit 4d1dbd1985

View File

@@ -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,15 +424,12 @@ public class AppointmentService : IAppointmentService
days--;
}
}
else
{
}
if (weekends.Contains(date.DayOfWeek))
{
days--;
}
}
}
}
if (days >= setting.NoRecordAutoResignExternalDays)
{