diff --git a/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs b/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs index 7e3f43e74..0dd0ac176 100644 --- a/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs +++ b/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs @@ -198,6 +198,26 @@ namespace IRaCIS.Application.Contracts } + public class GetTrialDoctorListInDto : PageInput + { + public Guid TrialId { get; set; } = Guid.Empty; + + /// + /// 亚专业 + /// + public Guid? SubspecialityId { get; set; } + + /// + /// 专业 + /// + public Guid? SpecialityId { get; set; } + + /// + /// 机构 + /// + public Guid? HospitalId { get; set; } + } + public class TrialDoctorInfo : ConfirmationReviewerDTO { @@ -245,6 +265,8 @@ namespace IRaCIS.Application.Contracts public string OptUserName { get; set; } = String.Empty; public DateTime? OptTime { get; set; } + + } #endregion diff --git a/IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs b/IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs index e19aa593c..eab2c7cec 100644 --- a/IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs +++ b/IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs @@ -278,14 +278,19 @@ namespace IRaCIS.Core.Application.Service /// [HttpPost] public async Task> GetTrialDoctorList( - ReviewerConfirmationQueryDTO inQuery) + GetTrialDoctorListInDto inQuery) { var doctorQuery = _enrollRepository.Where(x => x.TrialId == inQuery.TrialId && x.EnrollStatus == EnrollStatus.ConfirmIntoGroup) + .ProjectTo(_mapper.ConfigurationProvider); - var doctorPageList = await doctorQuery.ToPagedListAsync(inQuery); + var doctorPageList = await doctorQuery + .WhereIf(inQuery.HospitalId!=null,x=>x.HospitalId==inQuery.HospitalId.Value) + .WhereIf(inQuery.SpecialityId != null, x => x.SpecialityId == inQuery.SpecialityId.Value) + .WhereIf(inQuery.SubspecialityId != null, x => x.SubspecialityIds.Contains(inQuery.SpecialityId.Value)) + .ToPagedListAsync(inQuery); var enrollStateList = await _enrollDetailRepository.Where(x => x.TrialId == inQuery.TrialId && x.EnrollStatus > EnrollStatus.InviteIntoGroup) .ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); diff --git a/IRaCIS.Core.Application/Service/Document/DTO/SystemDocumentViewModel.cs b/IRaCIS.Core.Application/Service/Document/DTO/SystemDocumentViewModel.cs index 9669388cf..2f322994c 100644 --- a/IRaCIS.Core.Application/Service/Document/DTO/SystemDocumentViewModel.cs +++ b/IRaCIS.Core.Application/Service/Document/DTO/SystemDocumentViewModel.cs @@ -178,7 +178,25 @@ namespace IRaCIS.Core.Application.Contracts public bool? IsConfirmed { get; set; } + /// + /// 课时状态 + /// public bool? IsDeleted { get; set; } + + /// + /// 用户名 + /// + public string? UserName { get; set; } + + /// + /// 开始时间 + /// + public DateTime? StartCreateTime { get; set; } + + /// + /// 结束时间 + /// + public DateTime? EndCreateTime { get; set; } } /// SystemDocumentAddOrEdit 列表查询参数模型 diff --git a/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs b/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs index cc1cac31d..18e795873 100644 --- a/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs @@ -473,7 +473,7 @@ namespace IRaCIS.Core.Application.Services var trialDocQuery = from trialDoc in _trialDocumentRepository.AsQueryable(false).Where(t => t.TrialId == inQuery.TrialId) .Where(t => inQuery.UserTypeId != null ? t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == inQuery.UserTypeId) : true) - from trialUser in _trialIdentityUserRepository.AsQueryable(false).Where(t => t.TrialId == inQuery.TrialId + from trialUser in _trialIdentityUserRepository.AsQueryable(false).Where(t => t.TrialId == inQuery.TrialId && t.TrialUserRoleList.AsQueryable().Any(t => trialDoc.NeedConfirmedUserTypeList.Any(c => c.NeedConfirmUserTypeId == t.UserRole.UserTypeId)) ) .Where(t => inQuery.UserId != null ? t.IdentityUserId == inQuery.UserId : true) @@ -557,6 +557,9 @@ namespace IRaCIS.Core.Application.Services .WhereIf(inQuery.FileTypeId != null, t => t.FileTypeId == inQuery.FileTypeId) .WhereIf(inQuery.IsConfirmed == true, t => t.ConfirmTime != null) .WhereIf(inQuery.IsConfirmed == false, t => t.ConfirmTime == null) + .WhereIf(inQuery.StartCreateTime!=null, t => t.CreateTime >= inQuery.StartCreateTime.Value) + .WhereIf(inQuery.EndCreateTime != null, t => t.CreateTime <= inQuery.EndCreateTime.Value) + .WhereIf(!string.IsNullOrEmpty(inQuery.UserName), t => t.UserName.Contains(inQuery.UserName)) .WhereIf(inQuery.IsDeleted != null, t => t.IsDeleted == inQuery.IsDeleted); var result = await unionQuery.ToPagedListAsync(inQuery);