From 9ac48c4dedf18c1f588eaf73ee37aa218d905406 Mon Sep 17 00:00:00 2001
From: he <10978375@qq.com>
Date: Fri, 22 Jul 2022 11:31:13 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=80=E7=89=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../IRaCIS.Core.Application.xml | 7 +++++++
.../Service/Allocation/VisitTaskService.cs | 15 +++++++++++----
2 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index 6fa7c7121..4d64802f6 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 a1a80008f..a9531eeba 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);
}