fix 增加可查询所有door记录

This commit is contained in:
2024-11-21 17:22:13 +08:00
parent 471df07386
commit 3dd6e27128
3 changed files with 5 additions and 4 deletions

View File

@@ -206,12 +206,13 @@ public class AppointmentService : IAppointmentService
}
public async Task<List<AppointmentDetailResponse>> GetRecordListAsync(string factory, VisitorAppointmentDetailStatusEnumType status, DateTime start, DateTime end)
public async Task<List<AppointmentDetailResponse>> GetRecordListAsync(string factory, VisitorAppointmentDetailStatusEnumType? status, DateTime start, DateTime end)
{
return await _dbContext.Queryable<VisitorAppointmentDetailEntity>()
.LeftJoin<GainfoEntity>((x, ga) => ga.IdNo == x.IdNo)
.Where(x => SqlFunc.Subqueryable<VisitorAppointmentEntity>().Where(p => p.Factory == factory).Any())
.Where(x => x.IsEnterDoorArea && x.DoorStatus == status)
.Where(x => x.IsEnterDoorArea)
.WhereIF(status.HasValue, x => x.DoorStatus == status)
.Where(x => x.DoorStart >= start && x.DoorEnd <= end)
.Select(x => new AppointmentDetailResponse
{