From 6a7a5cc2dd42603613fd628384380088d7218d49 Mon Sep 17 00:00:00 2001
From: he <10978375@qq.com>
Date: Wed, 11 Jan 2023 11:14:16 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Service/Doctor/DoctorService.cs | 4 ++--
.../WorkLoad/DTO/DoctorWorkLoadViewModel.cs | 14 +++++++++++---
.../Service/WorkLoad/DoctorWorkloadService.cs | 7 ++++++-
3 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs b/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs
index a46a7a4d2..00a8bc7fe 100644
--- a/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs
+++ b/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs
@@ -502,12 +502,12 @@ namespace IRaCIS.Application.Services
///
///
[HttpPost]
- public async Task> GetDoctorCriterionFile(GetDoctorCriterionFileInDto inDto)
+ public async Task> GetDoctorCriterionFile(GetDoctorCriterionFileInDto inDto)
{
var result = await _doctorCriterionFileRepository.Where(x => x.DoctorId == inDto.DoctorId)
.WhereIf(inDto.CriterionType != null, x => x.CriterionType == inDto.CriterionType)
.WhereIf(inDto.FileType != null, x => x.FileType == inDto.FileType)
- .ProjectTo(_mapper.ConfigurationProvider)
+ .ProjectTo(_mapper.ConfigurationProvider)
.ToListAsync();
return result;
}
diff --git a/IRaCIS.Core.Application/Service/WorkLoad/DTO/DoctorWorkLoadViewModel.cs b/IRaCIS.Core.Application/Service/WorkLoad/DTO/DoctorWorkLoadViewModel.cs
index e04666048..5ef5cb838 100644
--- a/IRaCIS.Core.Application/Service/WorkLoad/DTO/DoctorWorkLoadViewModel.cs
+++ b/IRaCIS.Core.Application/Service/WorkLoad/DTO/DoctorWorkLoadViewModel.cs
@@ -271,7 +271,7 @@ namespace IRaCIS.Application.Contracts
public List CriterionReadingCategoryList { get; set; }
//任务阅片状态
- public List ReadingTaskStateList { get; set; }
+ public List ReadingTaskStateList { get; set; }
public List CriterionFileList { get; set; }
@@ -281,8 +281,8 @@ namespace IRaCIS.Application.Contracts
new CriterionReadingCategory()
{
EnrollId = EnrollId,
- ToDoQuantity= ReadingTaskStateList.Where(x=>x!=ReadingTaskState.HaveSigned).Count(),
- CompletionQuantity = ReadingTaskStateList.Where(x => x == ReadingTaskState.HaveSigned).Count(),
+ ToDoQuantity= ReadingTaskStateList.Where(x=>x.ReadingTaskState != ReadingTaskState.HaveSigned&&x.CriterionType== t.CriterionType).Count(),
+ CompletionQuantity = ReadingTaskStateList.Where(x => x.ReadingTaskState == ReadingTaskState.HaveSigned && x.CriterionType == t.CriterionType).Count(),
CriterionFileList = CriterionFileList.Where(x=>x.CriterionType==t.CriterionType).ToList(),
TrialReadingCriterionId = t.TrialReadingCriterionId,
ReadingCategorys = CriterionReadingCategoryList.Where(c => c.TrialReadingCriterionId == t.TrialReadingCriterionId).Select(t => t.ReadingCategory).OrderBy(c => c).ToList()
@@ -297,6 +297,14 @@ namespace IRaCIS.Application.Contracts
}
+
+ public class DoctorUserTask
+ {
+ public ReadingTaskState ReadingTaskState { get; set; }
+
+ public CriterionType? CriterionType { get; set; }
+ }
+
public class TrialReadingCriterionDto
{
public Guid TrialReadingCriterionId { get; set; }
diff --git a/IRaCIS.Core.Application/Service/WorkLoad/DoctorWorkloadService.cs b/IRaCIS.Core.Application/Service/WorkLoad/DoctorWorkloadService.cs
index 4c8844d66..338265292 100644
--- a/IRaCIS.Core.Application/Service/WorkLoad/DoctorWorkloadService.cs
+++ b/IRaCIS.Core.Application/Service/WorkLoad/DoctorWorkloadService.cs
@@ -217,7 +217,12 @@ namespace IRaCIS.Application.Services
Id=x.Id
}).ToList(),
CriterionReadingCategoryList =intoGroup.EnrollReadingCategoryList.Select(t=>new TrialCriterionReadingCategory() { EnrollId=t.EnrollId,ReadingCategory=t.ReadingCategory, TrialReadingCriterionId = t.TrialReadingCriterionId }).ToList(),
- ReadingTaskStateList=doctor.User.VisitTaskList.Where(x=>x.TaskState==TaskState.Effect&&x.TrialId== trialId).Select(x=>x.ReadingTaskState).ToList(),
+
+ ReadingTaskStateList=doctor.User.VisitTaskList.Where(x=>x.TaskState==TaskState.Effect&&x.TrialId== trialId).Select(x=> new DoctorUserTask() {
+ ReadingTaskState= x.ReadingTaskState,
+ CriterionType=x.TrialReadingCriterion.CriterionType,
+
+ }).ToList(),
DoctorId = doctor.Id,
Code = doctor.ReviewerCode,
FirstName = doctor.FirstName,