diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index 6fa7c712..4d64802f 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -271,6 +271,13 @@
+
+
+ 获取有序阅片IQuery对象
+
+
+
+
IR 已阅片任务
diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs
index a1a80008..a9531eeb 100644
--- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs
+++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs
@@ -909,7 +909,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
var visitTaskQuery = GetOrderReadingIQueryable(trialId);
- var totalCount = visitTaskQuery.Item1.Count();
+ var totalCount = visitTaskQuery.Item1;
var currentPageData = await visitTaskQuery.Item2.Skip((iRUnReadSubjectQuery.PageIndex - 1) * iRUnReadSubjectQuery.PageSize)
.Take(iRUnReadSubjectQuery.PageSize).ToListAsync();
@@ -965,7 +965,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
///
///
///
- public (IQueryable>?,IOrderedQueryable?) GetOrderReadingIQueryable(Guid trialId)
+ public (int,IOrderedQueryable?) GetOrderReadingIQueryable(Guid trialId)
{
var visitGroupQuery = _visitTaskRepository.Where(x => x.TrialId == trialId && x.DoctorUserId == _userInfo.Id)
.Where(x => !x.Subject.IsDeleted)
@@ -978,10 +978,17 @@ namespace IRaCIS.Core.Application.Service.Allocation
SubjectCode = x.Key.BlindSubjectCode == string.Empty ? x.Key.Code : x.Key.BlindSubjectCode,
UnReadTaskCount = x.Where(y => y.ReReadingApplyState != ReReadingApplyState.HaveApplyed).Count(),
ExixtsReadingApply = x.Any(y => y.ReReadingApplyState == ReReadingApplyState.HaveApplyed),
- UnReadTaskList = x.Where(y => y.ReReadingApplyState != ReReadingApplyState.HaveApplyed).Select(u => new IRUnreadTaskView() { Id = u.Id, IsUrgent = u.IsUrgent, SuggesteFinishedTime = u.SuggesteFinishedTime }).ToList(),
+ UnReadTaskList = x.Where(y => y.ReReadingApplyState != ReReadingApplyState.HaveApplyed)
+ .Select(u => new IRUnreadTaskView() { Id = u.Id, IsUrgent = u.IsUrgent, SuggesteFinishedTime = u.SuggesteFinishedTime }).ToList(),
}).Where(x => x.UnReadTaskCount > 0).OrderBy(x => x.SubjectId);
- return (visitGroupQuery, visitTaskQuery);
+
+
+ var count = visitGroupQuery.Select(x => new
+ {
+ UnReadTaskCount = x.Where(y => y.ReReadingApplyState != ReReadingApplyState.HaveApplyed).Count(),
+ }).Where(x => x.UnReadTaskCount > 0).Count();
+ return (count, visitTaskQuery);
}