From 57cd0281fa6af4d1703ae38ebd6531ca1cbda074 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Thu, 13 Mar 2025 16:33:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Doctor/DTO/DoctorModel.cs | 10 ++++++++++ .../Service/Doctor/DoctorListService.cs | 7 ++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs b/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs index a2850c379..867638b3a 100644 --- a/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs +++ b/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs @@ -169,6 +169,16 @@ namespace IRaCIS.Application.Contracts public class ReviewerConfirmationQueryDTO : PageInput { public Guid TrialId { get; set; } = Guid.Empty; + + public DateTime? OptStartTime{ get; set; } + + public DateTime? OptEndTime { get; set; } + + public string? Code { get; set; } + + public int? OptUserType { get; set; } + + public string? OptUserName { get; set; } } public class SelectionReviewerDTO : DoctorDTO diff --git a/IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs b/IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs index c64db3edf..002dbf7e9 100644 --- a/IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs +++ b/IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs @@ -244,7 +244,12 @@ namespace IRaCIS.Core.Application.Service var doctorQuery = _enrollRepository.Where(x => x.TrialId == inQuery.TrialId && x.EnrollStatus >= EnrollStatus.InviteIntoGroup) - .ProjectTo(_mapper.ConfigurationProvider); + .ProjectTo(_mapper.ConfigurationProvider) + .WhereIf(inQuery.OptStartTime != null, x => x.OptTime >= inQuery.OptStartTime) + .WhereIf(inQuery.OptEndTime != null, x => x.OptTime <= inQuery.OptEndTime) + .WhereIf(inQuery.Code.IsNotNullOrEmpty(), x => x.Code.Contains(inQuery.Code)) + .WhereIf(inQuery.OptUserType!=null, x => x.OptUserType==inQuery.OptUserType) + .WhereIf(inQuery.OptUserName.IsNotNullOrEmpty(), x => x.OptUserName.Contains(inQuery.OptUserName)); var doctorPageList = await doctorQuery.ToPagedListAsync(inQuery);