修改统计
parent
d3d6c939d9
commit
286867172b
|
@ -43,7 +43,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
))
|
))
|
||||||
|
|
||||||
.ForMember(o => o.SelfSubjectCount, t => t.MapFrom(u => u.Trial.SubjectDoctorUserList.Where(t => t.DoctorUserId == u.DoctorUserId).Count()))
|
.ForMember(o => o.SelfSubjectCount, t => t.MapFrom(u => u.Trial.SubjectDoctorUserList.Where(t => t.DoctorUserId == u.DoctorUserId).Count()))
|
||||||
.ForMember(o => o.SelfApplyedSubjectCount, t => t.MapFrom(u => u.Trial.SubjectDoctorUserList.Where(t => t.DoctorUserId == u.DoctorUserId && t.SubjectArmVisitTaskList.Any()).Count()))
|
.ForMember(o => o.SelfApplyedSubjectCount, t => t.MapFrom(u => u.Trial.SubjectDoctorUserList.Where(t => t.DoctorUserId == u.DoctorUserId && t.SubjectArmVisitTaskList.Any(c => c.DoctorUserId != null)).Count()))
|
||||||
|
|
||||||
.ForMember(o => o.WaitApplySelfSubjectCount, t => t.MapFrom(u =>
|
.ForMember(o => o.WaitApplySelfSubjectCount, t => t.MapFrom(u =>
|
||||||
subjectIdList.Count == 0 ? u.Trial.SubjectDoctorUserList.Where(t => t.DoctorUserId == u.DoctorUserId && t.SubjectArmVisitTaskList.Any(c=>c.DoctorUserId ==null)).Count()
|
subjectIdList.Count == 0 ? u.Trial.SubjectDoctorUserList.Where(t => t.DoctorUserId == u.DoctorUserId && t.SubjectArmVisitTaskList.Any(c=>c.DoctorUserId ==null)).Count()
|
||||||
: u.Trial.SubjectDoctorUserList.Where(t => t.DoctorUserId == u.DoctorUserId && subjectIdList.Contains(t.SubjectId) && t.SubjectArmVisitTaskList.Any(c => c.DoctorUserId == null)).Count()
|
: u.Trial.SubjectDoctorUserList.Where(t => t.DoctorUserId == u.DoctorUserId && subjectIdList.Contains(t.SubjectId) && t.SubjectArmVisitTaskList.Any(c => c.DoctorUserId == null)).Count()
|
||||||
|
|
|
@ -408,7 +408,7 @@ namespace IRaCIS.Core.Application
|
||||||
|
|
||||||
if (_taskAllocationRuleRepository.Where(t => t.TrialId == trialConfig.TrialId && t.IsEnable).Sum(t => t.PlanReadingRatio) != 100)
|
if (_taskAllocationRuleRepository.Where(t => t.TrialId == trialConfig.TrialId && t.IsEnable).Sum(t => t.PlanReadingRatio) != 100)
|
||||||
{
|
{
|
||||||
return ResponseOutput.NotOk("已启用医生的记录比率不为百分之100");
|
return ResponseOutput.NotOk("已启用医生比率不为百分之100");
|
||||||
}
|
}
|
||||||
|
|
||||||
return ResponseOutput.Ok(await _trialRepository.SaveChangesAsync());
|
return ResponseOutput.Ok(await _trialRepository.SaveChangesAsync());
|
||||||
|
|
Loading…
Reference in New Issue