fix list字段处理

This commit is contained in:
2024-10-14 10:23:03 +08:00
parent 53713902fe
commit 0ef687fa60
2 changed files with 40 additions and 6 deletions

View File

@@ -54,7 +54,29 @@ public class AppointmentService : IAppointmentService
{
return await _dbContext.Queryable<VisitorAppointmentDetailEntity>()
.Where(x => x.No == no)
.Select<AppointmentDetailResponse>()
.Select(x => new AppointmentDetailResponse
{
Id = x.Id,
No = x.No,
UserNo = x.UserNo,
IdType = x.IdType,
IdNo = x.IdNo,
Name = x.Name,
Phone = x.Phone,
LicensePlate = x.LicensePlate,
IsEnterDoorArea = x.IsEnterDoorArea,
ApplyDoorArea = x.ApplyDoorArea,
DoorStart = x.DoorStart,
DoorEnd = x.DoorEnd,
IsEnterWorkplace = false,
ApplyWorkplaceAreasString = x.ApplyWorkplaceAreas.ToString(),
WorkplaceStart = x.WorkplaceStart,
WorkplaceEnd = x.WorkplaceEnd,
ImageUrl = x.ImageUrl,
Remark = x.Remark,
DoorStatus = x.DoorStatus,
WorkplaceStatus = VisitorAppointmentDetailStatusEnumType.Wait
})
.ToListAsync();
}