fix 访客当天查询时间范围

This commit is contained in:
2024-11-29 16:42:07 +08:00
parent 6a9e2822a1
commit e5286bd773

View File

@@ -159,7 +159,7 @@ public class AppointmentService : IAppointmentService
return await _dbContext.Queryable<VisitorAppointmentDetailEntity>()
.LeftJoin<GainfoEntity>((x, ga) => ga.IdNo == x.IdNo)
.Where((x, ga) => ga.IdNo == idNo)
.Where(x => (x.IsEnterDoorArea && SqlFunc.DateIsSame(x.DoorStart, now) && x.DoorStatus == VisitorAppointmentDetailStatusEnumType.Wait))
.Where(x => x.IsEnterDoorArea && now >= x.DoorStart && now <= x.DoorEnd && x.DoorStatus == VisitorAppointmentDetailStatusEnumType.Wait)
.Where(x => SqlFunc.Subqueryable<VisitorAppointmentEntity>().Where(p => p.Factory == factory).Where(p => p.No == x.No).Any())
.Select(x => new AppointmentDetailResponse
{