diff --git a/Src/Dlhis.Basic/Appointment/Controllers/AppointmentsController.cs b/Src/Dlhis.Basic/Appointment/Controllers/AppointmentsController.cs index 6ec5f3fa..bd78cd22 100644 --- a/Src/Dlhis.Basic/Appointment/Controllers/AppointmentsController.cs +++ b/Src/Dlhis.Basic/Appointment/Controllers/AppointmentsController.cs @@ -87,15 +87,16 @@ public class AppointmentsController : ControllerBase /// 门禁预约 /// /// + /// /// /// /// /// [AllowAnonymous] [HttpGet("door/list")] - public async Task> GetRecordListAsync(string factory, VisitorAppointmentDetailStatusEnumType? status, DateTime start, DateTime end) + public async Task> GetRecordListAsync(string factory, string search, VisitorAppointmentDetailStatusEnumType? status, DateTime start, DateTime end) { - return await _appointmentService.GetRecordListAsync(factory, status, start, end); + return await _appointmentService.GetRecordListAsync(factory, search, status, start, end); } /// diff --git a/Src/Dlhis.Basic/Appointment/Services/IAppointmentService.cs b/Src/Dlhis.Basic/Appointment/Services/IAppointmentService.cs index a4858b75..11780c93 100644 --- a/Src/Dlhis.Basic/Appointment/Services/IAppointmentService.cs +++ b/Src/Dlhis.Basic/Appointment/Services/IAppointmentService.cs @@ -42,11 +42,12 @@ public interface IAppointmentService : IScopeDependency /// 获取记录列表 /// /// + /// /// /// /// /// - Task> GetRecordListAsync(string factory, VisitorAppointmentDetailStatusEnumType? status, DateTime start, DateTime end); + Task> GetRecordListAsync(string factory, string search, VisitorAppointmentDetailStatusEnumType? status, DateTime start, DateTime end); Task> GetRecordPageByIdNoAsync([FromQuery] AppointmentIdNoPageRequest request); diff --git a/Src/Dlhis.Basic/Appointment/Services/Implements/AppointmentService.cs b/Src/Dlhis.Basic/Appointment/Services/Implements/AppointmentService.cs index 6ae7d27d..3a6bdb4d 100644 --- a/Src/Dlhis.Basic/Appointment/Services/Implements/AppointmentService.cs +++ b/Src/Dlhis.Basic/Appointment/Services/Implements/AppointmentService.cs @@ -206,7 +206,7 @@ public class AppointmentService : IAppointmentService } - public async Task> GetRecordListAsync(string factory, VisitorAppointmentDetailStatusEnumType? status, DateTime start, DateTime end) + public async Task> GetRecordListAsync(string factory, string search, VisitorAppointmentDetailStatusEnumType? status, DateTime start, DateTime end) { return await _dbContext.Queryable() .LeftJoin((x, ga) => ga.IdNo == x.IdNo) @@ -214,6 +214,7 @@ public class AppointmentService : IAppointmentService .Where(x => x.IsEnterDoorArea) .WhereIF(status.HasValue, x => x.DoorStatus == status) .Where(x => x.DoorStart >= start && x.DoorEnd <= end) + .WhereIF(search.IsPresent(), x => x.Name.Contains(search) || x.No == search || x.IdNo == search) .Select(x => new AppointmentDetailResponse { No = x.No,