修改排序
parent
7b740597c2
commit
998398beec
|
@ -114,7 +114,8 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
.ProjectTo<QCCRCVisitViewModel>(_mapper.ConfigurationProvider);
|
||||
|
||||
|
||||
var pageList = await query.ToPagedListAsync(visitSearchDTO.PageIndex, visitSearchDTO.PageSize, visitSearchDTO.SortField, visitSearchDTO.Asc);
|
||||
var defalutSortArray = new string[] { nameof(SubjectVisit.IsUrgent), nameof(SubjectVisit.SubjectId), nameof(SubjectVisit.VisitNum) };
|
||||
var pageList = await query.ToPagedListAsync(visitSearchDTO.PageIndex, visitSearchDTO.PageSize, visitSearchDTO.SortField, visitSearchDTO.Asc,string.IsNullOrWhiteSpace(visitSearchDTO.SortField), defalutSortArray);
|
||||
|
||||
var config = await _repository.Where<Trial>(t => t.Id == visitSearchDTO.TrialId).ProjectTo<TrialSubjectAndSVConfig>(_mapper.ConfigurationProvider).FirstOrDefaultAsync().IfNullThrowException();
|
||||
|
||||
|
@ -466,7 +467,8 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
//.WhereIf(visitSearchDTO.ChallengeState != null, t => t.ChallengeState == visitSearchDTO.ChallengeState)
|
||||
.ProjectTo<QCVisitViewModel>(_mapper.ConfigurationProvider);
|
||||
|
||||
var pageList = query.ToPagedList(visitSearchDTO.PageIndex, visitSearchDTO.PageSize, visitSearchDTO.SortField, visitSearchDTO.Asc);
|
||||
var defalutSortArray = new string[] { nameof(SubjectVisit.IsUrgent), nameof(SubjectVisit.SubjectId), nameof(SubjectVisit.VisitNum) };
|
||||
var pageList = await query.ToPagedListAsync(visitSearchDTO.PageIndex, visitSearchDTO.PageSize, visitSearchDTO.SortField, visitSearchDTO.Asc,string.IsNullOrWhiteSpace(visitSearchDTO.SortField), defalutSortArray);
|
||||
|
||||
var config = await _repository.Where<Trial>(t => t.Id == visitSearchDTO.TrialId).ProjectTo<TrialSubjectAndSVConfig>(_mapper.ConfigurationProvider).FirstOrDefaultAsync().IfNullThrowException();
|
||||
return ResponseOutput.Ok(pageList, config);
|
||||
|
|
Loading…
Reference in New Issue