From f9d2fb91c8b870181326736e46e787c1932ee40c Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 17 Jun 2022 16:27:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BB=9F=E8=AE=A1=E6=95=B0?= =?UTF-8?q?=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Allocation/DTO/TaskAllocationRuleViewModel.cs | 11 +++++++---- .../Service/Allocation/_MapConfig.cs | 6 ++++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/TaskAllocationRuleViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/TaskAllocationRuleViewModel.cs index 7adf017a7..f52c47359 100644 --- a/IRaCIS.Core.Application/Service/Allocation/DTO/TaskAllocationRuleViewModel.cs +++ b/IRaCIS.Core.Application/Service/Allocation/DTO/TaskAllocationRuleViewModel.cs @@ -39,7 +39,13 @@ namespace IRaCIS.Core.Application.ViewModel //该医生未应用Subject 数量 不是两者相减 跟批量勾选有关系 public int? WaitApplySelfSubjectCount { get; set; } + //该医生未应用的任务数 + public int? WaitApplySelfTaskCount { get; set; } + //总共未应用的Subejct 数量 + public int? WaitApplyTotalSubjectCount { get; set; } + + public int? WaitApplyTotalTaskCount { get; set; } //该医生已应用的任务数 @@ -48,16 +54,13 @@ namespace IRaCIS.Core.Application.ViewModel //已分配但是未读片签名的数量 public int? SelfUndoTaskCount { get; set; } - //该医生未应用的任务数 - public int? WaitApplySelfTaskCount { get; set; } + //总共已应用 的Subject 数 public int? ApplyedTotalSubjectCount { get; set; } - //未应用的Subejct 数量 - public int? WaitApplyTotalSubjectCount { get; set; } //系统 Subject数 public int? TotalSubjectCount { get; set; } diff --git a/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs b/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs index 244d12cae..940a11bac 100644 --- a/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs @@ -27,6 +27,12 @@ namespace IRaCIS.Core.Application.Service : u.Trial.SubjectDoctorUserList.Where(d => d.DoctorUserId == u.DoctorUserId && subjectIdList.Contains(d.SubjectId)).SelectMany(t => t.SubjectArmVisitTaskList.Where(t => t.DoctorUserId == null)).Count() )) + .ForMember(o => o.WaitApplyTotalTaskCount, t => t.MapFrom(u => + subjectIdList.Count == 0 ? u.Trial.VisitTaskList.Where(t => t.DoctorUserId == null).Count() + : u.Trial.VisitTaskList.Where(t => t.DoctorUserId == null && subjectIdList.Contains(t.SubjectId)).Count() )) + + + .ForMember(o => o.SelfUndoTaskCount, t => t.MapFrom(u => u.Trial.VisitTaskList.Count(t => t.DoctorUserId == u.DoctorUserId && t.ReadingTaskState != ReadingTaskState.HaveSigned))) .ForMember(o => o.SelfTaskCount, t => t.MapFrom(u => u.Trial.VisitTaskList.Count(t => t.DoctorUserId == u.DoctorUserId))) .ForMember(o => o.TotalSubjectCount, t => t.MapFrom(u => u.Trial.SubjectList.Count()))