Uat_Study
			
			
		
		
							parent
							
								
									819a6a0b07
								
							
						
					
					
						commit
						58fe222837
					
				| 
						 | 
				
			
			@ -56,6 +56,9 @@ namespace IRaCIS.Core.Application.ViewModel
 | 
			
		|||
        //总共已应用 的Subject 数
 | 
			
		||||
        public int? ApplyedTotalSubjectCount { get; set; }
 | 
			
		||||
 | 
			
		||||
        //未应用的Subejct 数量
 | 
			
		||||
        public int? WaitApplyTotalSubjectCount { get; set; }
 | 
			
		||||
 | 
			
		||||
        //系统  Subject数
 | 
			
		||||
        public int? TotalSubjectCount { get; set; }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -31,14 +31,17 @@ namespace IRaCIS.Core.Application.Service
 | 
			
		|||
                 .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.SubjectVisitTaskList.Any(d => d.DoctorUserId !=null))))
 | 
			
		||||
                  .ForMember(o => o.WaitApplyTotalSubjectCount, t => t.MapFrom(u =>
 | 
			
		||||
                  subjectIdList.Count == 0 ? u.Trial.SubjectList.Where(t => t.SubjectVisitTaskList.Any(c => c.DoctorUserId == null)).Count()
 | 
			
		||||
                  : u.Trial.SubjectList.Where(t =>  subjectIdList.Contains(t.Id) && t.SubjectVisitTaskList.Any(c => c.DoctorUserId == null)).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.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()
 | 
			
		||||
                  : u.Trial.SubjectDoctorUserList.Where(t => t.DoctorUserId == u.DoctorUserId && subjectIdList.Contains(t.SubjectId) && t.SubjectArmVisitTaskList.Any(c => c.DoctorUserId == null)).Count()
 | 
			
		||||
 | 
			
		||||
                  ))
 | 
			
		||||
                 
 | 
			
		||||
                  ))                
 | 
			
		||||
                 ;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue