修改项目配置
This commit is contained in:
@@ -105,6 +105,15 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
}
|
||||
|
||||
|
||||
public class AssignDoctorStatView : TaskAllocationRuleDTO
|
||||
{
|
||||
public int? AssignedSubjectCount { get; set; }
|
||||
|
||||
public int? WaitDealTrialTaskCount { get; set; }
|
||||
|
||||
public int? WaitDealAllTaskCount { get; set; }
|
||||
}
|
||||
|
||||
///<summary> TaskAllocationRuleAddOrEdit 列表查询参数模型</summary>
|
||||
public class TaskAllocationRuleAddOrEdit
|
||||
{
|
||||
|
||||
@@ -96,16 +96,17 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
///// <summary>
|
||||
///// 阅片人维度 Subject统计表
|
||||
///// </summary>
|
||||
///// <param name="command"></param>
|
||||
///// <returns></returns>
|
||||
//public async Task<IResponseOutput> GetDoctorSubjectStat(Guid trialId )
|
||||
//{
|
||||
// var query= from enroll in _repository.Where<Enroll>(t=>t.TrialId==trialId)
|
||||
// join user in _repository.Where<User>() on enroll.DoctorId equals user.DoctorId
|
||||
//}
|
||||
/// <summary>
|
||||
/// 阅片人维度 Subject统计表
|
||||
/// </summary>
|
||||
/// <param name="trialId"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<AssignDoctorStatView>> GetDoctorSubjectStat(Guid trialId)
|
||||
{
|
||||
var list = await _taskAllocationRuleRepository.Where(t => t.TrialId == trialId).ProjectTo<AssignDoctorStatView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -69,7 +69,12 @@ namespace IRaCIS.Core.Application.Service
|
||||
.ForMember(o => o.DoctorUser, t => t.MapFrom(u => u.Enroll.DoctorUser))
|
||||
.ForMember(o => o.ReadingCategoryList, t => t.MapFrom(u => u.Enroll.EnrollReadingCategoryList.Select(t=>t.ReadingCategory).ToList()));
|
||||
|
||||
|
||||
CreateMap<TaskAllocationRule, AssignDoctorStatView>().IncludeBase<TaskAllocationRule, TaskAllocationRuleDTO>()
|
||||
.ForMember(o => o.AssignedSubjectCount, t => t.MapFrom(u => u.Enroll.DoctorTrialVisitTaskList.Select(t=>t.SubjectId).Distinct().Count()))
|
||||
.ForMember(o => o.WaitDealAllTaskCount, t => t.MapFrom(u => u.Enroll.DoctorTrialVisitTaskList.Where(t=>t.ReadingTaskState!=ReadingTaskState.HaveSigned && t.TaskState==TaskState.Effect).Count()))
|
||||
.ForMember(o => o.WaitDealTrialTaskCount, t => t.MapFrom(u => u.Trial.VisitTaskList.Where(t => t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect).Count()));
|
||||
|
||||
|
||||
|
||||
|
||||
CreateMap<Subject, SubjectAssignStat>()
|
||||
|
||||
Reference in New Issue
Block a user