diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/TaskAllocationRuleViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/TaskAllocationRuleViewModel.cs index 0fce6af28..3b9f66cf3 100644 --- a/IRaCIS.Core.Application/Service/Allocation/DTO/TaskAllocationRuleViewModel.cs +++ b/IRaCIS.Core.Application/Service/Allocation/DTO/TaskAllocationRuleViewModel.cs @@ -27,20 +27,23 @@ namespace IRaCIS.Core.Application.ViewModel //总任务数 public int? TotalTaskCount { get; set; } - //应用的任务总数 + //已经应用的任务总数 public int? ApplyedTotalTaskCount { get; set; } - //自己的任务数 + + //该医生未应用的任务数 + public int? WaitApplySelfTaskCount { get; set; } + + //该医生已应用的任务数 public int? SelfTaskCount { get; set; } - //分配给自己的Subject数量 + //已经分配该医生Subject数量 public int? SelfSubjectCount { get; set; } - - //已应用的Subject 数 + //已应用 的Subject 数 public int? ApplyedTotalSubjectCount { get; set; } - //系统Subject 数 + //系统 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 60903e9bb..fcd0c8c83 100644 --- a/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs @@ -19,7 +19,10 @@ namespace IRaCIS.Core.Application.Service //.ForMember(o => o.ArmList, t => t.MapFrom(u => u.DoctorVisitTaskList.Where(c => c.TrialId == u.TrialId).Select(t => t.ArmEnum).Distinct())) .ForMember(o => o.TotalTaskCount, t => t.MapFrom(u => u.Trial.VisitTaskList.Count())) .ForMember(o => o.ApplyedTotalTaskCount, t => t.MapFrom(u => u.Trial.VisitTaskList.Count(t=>t.DoctorUserId != null))) + .ForMember(o => o.WaitApplySelfTaskCount, t => t.MapFrom(u => u.Trial.SubjectList.Where(c => c.SubjectDoctorList.Any(d => d.DoctorUserId == u.DoctorUserId)) + .SelectMany(t=>t.SubjectVisitTaskList.Where(t=>t.DoctorUserId==null)).Count())) + .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())) .ForMember(o => o.ApplyedTotalSubjectCount, t => t.MapFrom(u => u.Trial.SubjectList.Count(c=>c.SubjectDoctorList.Any(d=>d.DoctorUserId==u.DoctorUserId))))