diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index eee852d8..7d9df1b2 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -1481,7 +1481,7 @@ - + SeriesCount diff --git a/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs b/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs index f76726f6..3649f532 100644 --- a/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Document/SystemDocumentService.cs @@ -128,7 +128,7 @@ namespace IRaCIS.Core.Application.Services { - var query = from sysDoc in _systemDocumentRepository.Where(t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId),true) + var query = from sysDoc in _systemDocumentRepository.Where(t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId)) join confirm in _repository.GetQueryable() on new { ConfirmUserId = _userInfo.Id, SystemDocumentId = sysDoc.Id } equals new { confirm.ConfirmUserId, confirm.SystemDocumentId } into cc from confirm in cc.DefaultIfEmpty() diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs index e5c6d37d..2d092473 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs @@ -86,7 +86,7 @@ namespace IRaCIS.Core.Application { return await _trialRepository.ProjectTo(_mapper.ConfigurationProvider, new { userTypeEnumInt = _userInfo.UserTypeEnumInt, userId = _userInfo.Id }) - .ToPagedListAsync(query.PageIndex, query.PageSize, query.SortField, query.Asc); + .OrderByDescending(t=>t.ApprovalRequiredCount).ToPagedListAsync(query.PageIndex, query.PageSize, query.SortField, query.Asc); } @@ -108,6 +108,7 @@ namespace IRaCIS.Core.Application var trialDocStat = await _trialRepository .WhereIf(!_userInfo.IsAdmin, c => c.TrialDocumentList.Where(t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId) && !t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id)).Count() > 0) .ProjectTo(_mapper.ConfigurationProvider, new { userTypeEnumInt = _userInfo.UserTypeEnumInt, userId = _userInfo.Id, userTypeId = _userInfo.UserTypeId }) + .OrderByDescending(t => t.WaitSignCount) .ToPagedListAsync(query.PageIndex, query.PageSize - 1, query.SortField, query.Asc);