fix 使用ArrivedTime

This commit is contained in:
2024-12-01 14:29:40 +08:00
parent 9d398791ed
commit aaeb565f84

View File

@@ -256,11 +256,7 @@ public class AppointmentService : IAppointmentService
.CountAsync();
var @in = await _dbContext.Queryable<VisitorAppointmentDetailEntity>()
.Where(x => x.IsEnterDoorArea && SqlFunc.DateIsSame(x.DoorStart, start))
// || (x.IsEnterWorkplace && ((x.WorkplaceStart >= start && x.WorkplaceStart <= end) || (x.WorkplaceEnd >= start && x.WorkplaceEnd <= end)))
.Where(x => (x.IsEnterDoorArea && x.DoorStatus == VisitorAppointmentDetailStatusEnumType.Arrived)
//|| (x.IsEnterWorkplace && x.WorkplaceStatus == VisitorAppointmentDetailStatusEnumType.Arrived)
)
.Where(x => x.IsEnterDoorArea && SqlFunc.DateIsSame(x.ArrivedTime, start) && x.DoorStatus == VisitorAppointmentDetailStatusEnumType.Arrived)
.Where(x => SqlFunc.Subqueryable<VisitorAppointmentEntity>().Where(p => p.No == x.No).Where(p => p.Factory == factory).Any())
.CountAsync();