|  |  | @ -945,8 +945,25 @@ | 
			
		
	
		
			
				
					|  |  |  |             AND ac.PID = '0' | 
			
		
	
		
			
				
					|  |  |  |             AND cop.PARAMETER_VALUE = 'open' | 
			
		
	
		
			
				
					|  |  |  |         <if test="areaCode != null and areaCode != ''"> | 
			
		
	
		
			
				
					|  |  |  |             AND AREA_CODE != #{areaCode} | 
			
		
	
		
			
				
					|  |  |  |             AND AREA_CODE LIKE CONCAT(#{areaCode}, '%') | 
			
		
	
		
			
				
					|  |  |  |             AND ac.AREA_CODE != #{areaCode} | 
			
		
	
		
			
				
					|  |  |  |             AND ac.AREA_CODE LIKE CONCAT(#{areaCode}, '%') | 
			
		
	
		
			
				
					|  |  |  |         </if> | 
			
		
	
		
			
				
					|  |  |  |     </select> | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     <select id="getAreaRootAgency" resultType="com.epmet.entity.CustomerAgencyEntity"> | 
			
		
	
		
			
				
					|  |  |  |         SELECT | 
			
		
	
		
			
				
					|  |  |  |         ac.* | 
			
		
	
		
			
				
					|  |  |  |         FROM | 
			
		
	
		
			
				
					|  |  |  |         customer_agency ac | 
			
		
	
		
			
				
					|  |  |  |         INNER JOIN customer_org_parameter cop ON cop.CUSTOMER_ID = ac.CUSTOMER_ID | 
			
		
	
		
			
				
					|  |  |  |         WHERE | 
			
		
	
		
			
				
					|  |  |  |         ac.DEL_FLAG = '0' | 
			
		
	
		
			
				
					|  |  |  |         AND cop.DEL_FLAG = '0' | 
			
		
	
		
			
				
					|  |  |  |         AND cop.PARAMETER_KEY = 'area_code_switch' | 
			
		
	
		
			
				
					|  |  |  |         AND ac.PID = '0' | 
			
		
	
		
			
				
					|  |  |  |         AND cop.PARAMETER_VALUE = 'open' | 
			
		
	
		
			
				
					|  |  |  |         <if test="customerId != null and customerId != ''"> | 
			
		
	
		
			
				
					|  |  |  |             AND ac.CUSTOMER_ID = #{customerId} | 
			
		
	
		
			
				
					|  |  |  |         </if> | 
			
		
	
		
			
				
					|  |  |  |     </select> | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  | 
 |