查询验证

This commit is contained in:
he
2024-01-10 10:48:21 +08:00
parent 397ac4a154
commit 4c607302f3
13 changed files with 112 additions and 45 deletions
@@ -355,7 +355,12 @@ namespace IRaCIS.Core.Application.Contracts
public DateTime? UpdateTimeBegin { get; set; }
public DateTime? UpdateTimeEnd { get; set; }
}
public string? PreliminaryUserName { get; set; }
public string? ReviewerUserName { get; set; }
}
public class CopyTrialSiteSurveyDTO
{
@@ -451,8 +451,11 @@ namespace IRaCIS.Core.Application.Contracts
.WhereIf(surveyQueryDTO.State != null, t => t.State == surveyQueryDTO.State)
.WhereIf(surveyQueryDTO.UpdateTimeBegin != null, t => t.UpdateTime >= surveyQueryDTO.UpdateTimeBegin)
.WhereIf(surveyQueryDTO.UpdateTimeEnd != null, t => t.UpdateTime <= surveyQueryDTO.UpdateTimeEnd)
.ProjectTo<TrialSiteSurveyView>(_mapper.ConfigurationProvider, new { isEn_Us = _userInfo.IsEn_Us });
.ProjectTo<TrialSiteSurveyView>(_mapper.ConfigurationProvider, new { isEn_Us = _userInfo.IsEn_Us })
.WhereIf(!string.IsNullOrWhiteSpace(surveyQueryDTO.PreliminaryUserName), t => t.PreliminaryUser.RealName.Contains(surveyQueryDTO.PreliminaryUserName))
.WhereIf(!string.IsNullOrWhiteSpace(surveyQueryDTO.ReviewerUserName), t => t.ReviewerUser.RealName.Contains(surveyQueryDTO.ReviewerUserName))
;
return await trialSiteSurveyQueryable.ToPagedListAsync(surveyQueryDTO.PageIndex, surveyQueryDTO.PageSize, surveyQueryDTO.SortField, surveyQueryDTO.Asc);
}