|  | @ -30,6 +30,7 @@ import org.springframework.beans.factory.annotation.Autowired; | 
			
		
	
		
		
			
				
					|  |  | import org.springframework.stereotype.Service; |  |  | import org.springframework.stereotype.Service; | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | import java.util.ArrayList; |  |  | import java.util.ArrayList; | 
			
		
	
		
		
			
				
					|  |  |  |  |  | import java.util.HashSet; | 
			
		
	
		
		
			
				
					|  |  | import java.util.Iterator; |  |  | import java.util.Iterator; | 
			
		
	
		
		
			
				
					|  |  | import java.util.List; |  |  | import java.util.List; | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  | @ -151,17 +152,22 @@ public class GovOrgServiceImpl implements GovOrgService { | 
			
		
	
		
		
			
				
					|  |  |             List<String> usedAreaCodeList1 = customerAgencyDao.selectUsedAreaCodeList(formDTO.getAreaCode()); |  |  |             List<String> usedAreaCodeList1 = customerAgencyDao.selectUsedAreaCodeList(formDTO.getAreaCode()); | 
			
		
	
		
		
			
				
					|  |  |             //外部子客户:
 |  |  |             //外部子客户:
 | 
			
		
	
		
		
			
				
					|  |  |             List<String> usedAreaCodeList2 = customerRelation.selectUsedAreaCodeList(formDTO.getAreaCode()); |  |  |             List<String> usedAreaCodeList2 = customerRelation.selectUsedAreaCodeList(formDTO.getAreaCode()); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             List<String> list=new ArrayList<>(); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             if(CollectionUtils.isNotEmpty(usedAreaCodeList1)){ | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                 list.addAll(usedAreaCodeList1); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             } | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             if(CollectionUtils.isNotEmpty(usedAreaCodeList2)){ | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                 list.addAll(usedAreaCodeList2); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             } | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             HashSet set = new HashSet(list); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             list.clear(); | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             list.addAll(set); | 
			
		
	
		
		
			
				
					|  |  |             //已经被使用的移除不显示
 |  |  |             //已经被使用的移除不显示
 | 
			
		
	
		
		
			
				
					|  |  |             Iterator<NextAreaCodeResultDTO> iterator = allList.iterator(); |  |  |             Iterator<NextAreaCodeResultDTO> iterator = allList.iterator(); | 
			
		
	
		
		
			
				
					|  |  |             while (iterator.hasNext()) { |  |  |             while (iterator.hasNext()) { | 
			
		
	
		
		
			
				
					|  |  |                 NextAreaCodeResultDTO next = iterator.next(); |  |  |                 NextAreaCodeResultDTO next = iterator.next(); | 
			
		
	
		
		
			
				
					
					|  |  |                 for (String usedAreaCode1 : usedAreaCodeList1) { |  |  |                 for (String areaCode : list) { | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |                     if (next.getAreaCode().equals(usedAreaCode1)) { |  |  |                     if (next.getAreaCode().equals(areaCode)) { | 
			
				
				
			
		
	
		
		
			
				
					|  |  |                         iterator.remove(); |  |  |  | 
			
		
	
		
		
			
				
					|  |  |                     } |  |  |  | 
			
		
	
		
		
			
				
					|  |  |                 } |  |  |  | 
			
		
	
		
		
			
				
					|  |  |                 for (String usedAreaCode2 : usedAreaCodeList2) { |  |  |  | 
			
		
	
		
		
			
				
					|  |  |                     if (next.getAreaCode().contains(usedAreaCode2)) { |  |  |  | 
			
		
	
		
		
	
		
		
	
		
		
			
				
					|  |  |                         iterator.remove(); |  |  |                         iterator.remove(); | 
			
		
	
		
		
			
				
					|  |  |                     } |  |  |                     } | 
			
		
	
		
		
			
				
					|  |  |                 } |  |  |                 } | 
			
		
	
	
		
		
			
				
					|  | 
 |