| 
					
					
						
							
						
					
					
				 | 
				@ -20,7 +20,7 @@ using Volo.Abp.Identity; | 
			
		
		
	
		
			
				 | 
				 | 
				namespace Shentun.Peis.OccupationalDiseaseReports | 
				 | 
				 | 
				namespace Shentun.Peis.OccupationalDiseaseReports | 
			
		
		
	
		
			
				 | 
				 | 
				{ | 
				 | 
				 | 
				{ | 
			
		
		
	
		
			
				 | 
				 | 
				    [ApiExplorerSettings(GroupName = "Work")] | 
				 | 
				 | 
				    [ApiExplorerSettings(GroupName = "Work")] | 
			
		
		
	
		
			
				 | 
				 | 
				    [Authorize] | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				    //[Authorize]
 | 
			
		
		
	
		
			
				 | 
				 | 
				    public class OccupationalDiseaseReportAppService : ApplicationService | 
				 | 
				 | 
				    public class OccupationalDiseaseReportAppService : ApplicationService | 
			
		
		
	
		
			
				 | 
				 | 
				    { | 
				 | 
				 | 
				    { | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
	
		
			
				| 
					
						
							
						
					
					
						
							
						
					
					
				 | 
				@ -348,12 +348,17 @@ namespace Shentun.Peis.OccupationalDiseaseReports | 
			
		
		
	
		
			
				 | 
				 | 
				                } | 
				 | 
				 | 
				                } | 
			
		
		
	
		
			
				 | 
				 | 
				            } | 
				 | 
				 | 
				            } | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				            List<Guid?> customerOrgIds = new List<Guid?>(); | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				            if (customerOrgPara.CustomerOrgId != null) | 
				 | 
				 | 
				            if (customerOrgPara.CustomerOrgId != null) | 
			
		
		
	
		
			
				 | 
				 | 
				            { | 
				 | 
				 | 
				            { | 
			
		
		
	
		
			
				 | 
				 | 
				                var CustomerOrgIds = await _customerOrgManager.GetCustomerOrgChildrenId(customerOrgPara.CustomerOrgId.Value); | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				                query = query.Where(m => CustomerOrgIds.Contains(m.patientRegister.CustomerOrgId)); | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				                customerOrgIds = await _customerOrgManager.GetCustomerOrgChildrenId(customerOrgPara.CustomerOrgId.Value); | 
			
		
		
	
		
			
				 | 
				 | 
				            } | 
				 | 
				 | 
				            } | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				            if (customerOrgIds.Any()) | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				            { | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				                query = query.Where(m => customerOrgIds.Contains(m.patientRegister.CustomerOrgId)); | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				            } | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				            if (customerOrgPara.CustomerOrgGroupId.Any()) | 
				 | 
				 | 
				            if (customerOrgPara.CustomerOrgGroupId.Any()) | 
			
		
		
	
		
			
				 | 
				 | 
				            { | 
				 | 
				 | 
				            { | 
			
		
		
	
	
		
			
				| 
					
						
							
						
					
					
						
							
						
					
					
				 | 
				@ -577,7 +582,7 @@ namespace Shentun.Peis.OccupationalDiseaseReports | 
			
		
		
	
		
			
				 | 
				 | 
				                                            from posionHaveEmpty in poisonTemp.DefaultIfEmpty() | 
				 | 
				 | 
				                                            from posionHaveEmpty in poisonTemp.DefaultIfEmpty() | 
			
		
		
	
		
			
				 | 
				 | 
				                                            where patientRegister.CustomerOrgRegisterId == customerOrgPara.CustomerOrgRegisterId | 
				 | 
				 | 
				                                            where patientRegister.CustomerOrgRegisterId == customerOrgPara.CustomerOrgRegisterId | 
			
		
		
	
		
			
				 | 
				 | 
				                                            // && !registerCheckSummaryEmpty.Summary.Contains("未见异常")
 | 
				 | 
				 | 
				                                            // && !registerCheckSummaryEmpty.Summary.Contains("未见异常")
 | 
			
		
		
	
		
			
				 | 
				 | 
				                                            && patientRegister.CompleteFlag != PatientRegisterCompleteFlag.PreRegistration | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				                                            // && patientRegister.CompleteFlag != PatientRegisterCompleteFlag.PreRegistration
 | 
			
		
		
	
		
			
				 | 
				 | 
				                                            && asbitemHaveEmpty.IsCheck == 'Y' | 
				 | 
				 | 
				                                            && asbitemHaveEmpty.IsCheck == 'Y' | 
			
		
		
	
		
			
				 | 
				 | 
				                                            select new | 
				 | 
				 | 
				                                            select new | 
			
		
		
	
		
			
				 | 
				 | 
				                                            { | 
				 | 
				 | 
				                                            { | 
			
		
		
	
	
		
			
				| 
					
						
							
						
					
					
						
							
						
					
					
				 | 
				@ -616,6 +621,12 @@ namespace Shentun.Peis.OccupationalDiseaseReports | 
			
		
		
	
		
			
				 | 
				 | 
				                } | 
				 | 
				 | 
				                } | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				
 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				                if (customerOrgIds.Any()) | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				                { | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				                    asbitemAbnormalQuery = asbitemAbnormalQuery.Where(m => customerOrgIds.Contains(m.patientRegister.CustomerOrgId)); | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				                } | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				
 | 
			
		
		
	
		
			
				 | 
				 | 
				                if (customerOrgPara.CustomerOrgGroupId.Any()) | 
				 | 
				 | 
				                if (customerOrgPara.CustomerOrgGroupId.Any()) | 
			
		
		
	
		
			
				 | 
				 | 
				                { | 
				 | 
				 | 
				                { | 
			
		
		
	
		
			
				 | 
				 | 
				                    asbitemAbnormalQuery = asbitemAbnormalQuery.Where(m => m.patientRegister.CustomerOrgGroupId != null && customerOrgPara.CustomerOrgGroupId.Contains(m.patientRegister.CustomerOrgGroupId.Value)); | 
				 | 
				 | 
				                    asbitemAbnormalQuery = asbitemAbnormalQuery.Where(m => m.patientRegister.CustomerOrgGroupId != null && customerOrgPara.CustomerOrgGroupId.Contains(m.patientRegister.CustomerOrgGroupId.Value)); | 
			
		
		
	
	
		
			
				| 
					
						
							
						
					
					
					
				 | 
				
  |