| 
					
					
						
							
						
					
					
				 | 
				@ -302,7 +302,7 @@ namespace Shentun.Peis.CustomerOrgs | 
			
		
		
	
		
			
				 | 
				 | 
				            var customerOrgEnt = await _repository.FirstOrDefaultAsync(m => m.Id == id); | 
				 | 
				 | 
				            var customerOrgEnt = await _repository.FirstOrDefaultAsync(m => m.Id == id); | 
			
		
		
	
		
			
				 | 
				 | 
				            if (customerOrgEnt != null) | 
				 | 
				 | 
				            if (customerOrgEnt != null) | 
			
		
		
	
		
			
				 | 
				 | 
				            { | 
				 | 
				 | 
				            { | 
			
		
		
	
		
			
				 | 
				 | 
				                var patientRegisterEnt = await _patientRegisterRepository.FirstOrDefaultAsync(m => m.CustomerOrgGroupId == id); | 
				 | 
				 | 
				 | 
			
		
		
	
		
			
				 | 
				 | 
				 | 
				 | 
				 | 
				                var patientRegisterEnt = await _patientRegisterRepository.FirstOrDefaultAsync(m => m.CustomerOrgId == id); | 
			
		
		
	
		
			
				 | 
				 | 
				                if (patientRegisterEnt != null) | 
				 | 
				 | 
				                if (patientRegisterEnt != null) | 
			
		
		
	
		
			
				 | 
				 | 
				                { | 
				 | 
				 | 
				                { | 
			
		
		
	
		
			
				 | 
				 | 
				                    throw new UserFriendlyException($"单位\"{customerOrgEnt.DisplayName}\"已被体检人员\"{patientRegisterEnt.PatientName}\"登记使用,不能删除"); | 
				 | 
				 | 
				                    throw new UserFriendlyException($"单位\"{customerOrgEnt.DisplayName}\"已被体检人员\"{patientRegisterEnt.PatientName}\"登记使用,不能删除"); | 
			
		
		
	
	
		
			
				| 
					
						
							
						
					
					
					
				 | 
				
  |