修改排序

Test.EIImageViewer
hang 2022-05-26 17:28:11 +08:00
parent 7b740597c2
commit 998398beec
1 changed files with 4 additions and 2 deletions

View File

@ -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);