|  | @ -24,8 +24,9 @@ | 
			
		
	
		
		
			
				
					|  |  |         <result column="value"  property="value"/> |  |  |         <result column="value"  property="value"/> | 
			
		
	
		
		
			
				
					|  |  |         <result column="label" property="label"/> |  |  |         <result column="label" property="label"/> | 
			
		
	
		
		
			
				
					|  |  |         <result column="PARENT_CODE" property="pValue"/> |  |  |         <result column="PARENT_CODE" property="pValue"/> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         <result column="usableFlag" property="usableFlag"/> | 
			
		
	
		
		
			
				
					|  |  |         <collection property="children" ofType="com.epmet.commons.tools.dto.result.OptionResultDTO" |  |  |         <collection property="children" ofType="com.epmet.commons.tools.dto.result.OptionResultDTO" | 
			
		
	
		
		
			
				
					
					|  |  |                     select="selectChildDemands" column="customerId=customerId,parentCode=value"> |  |  |                     select="selectChildDemands" column="customerId=customerId,parentCode=value,usableFlagFormValue=usable_flag_form_value"> | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |         </collection> |  |  |         </collection> | 
			
		
	
		
		
			
				
					|  |  |     </resultMap> |  |  |     </resultMap> | 
			
		
	
		
		
			
				
					|  |  |     <select id="selectDemandOptions" resultMap="DemandResult"> |  |  |     <select id="selectDemandOptions" resultMap="DemandResult"> | 
			
		
	
	
		
		
			
				
					|  | @ -33,13 +34,18 @@ | 
			
		
	
		
		
			
				
					|  |  |             CUSTOMER_ID AS customerId, |  |  |             CUSTOMER_ID AS customerId, | 
			
		
	
		
		
			
				
					|  |  |             CATEGORY_CODE AS "value", |  |  |             CATEGORY_CODE AS "value", | 
			
		
	
		
		
			
				
					|  |  |             CATEGORY_NAME AS "label", |  |  |             CATEGORY_NAME AS "label", | 
			
		
	
		
		
			
				
					
					|  |  |             PARENT_CODE as pValue |  |  |             PARENT_CODE as pValue, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |  |  |  |             #{usableFlagFormValue} as usable_flag_form_value, | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             USABLE_FLAG as usableFlag | 
			
		
	
		
		
			
				
					|  |  |         FROM |  |  |         FROM | 
			
		
	
		
		
			
				
					|  |  |             ic_resi_demand_dict |  |  |             ic_resi_demand_dict | 
			
		
	
		
		
			
				
					|  |  |         WHERE |  |  |         WHERE | 
			
		
	
		
		
			
				
					|  |  |             DEL_FLAG = 0 |  |  |             DEL_FLAG = 0 | 
			
		
	
		
		
			
				
					|  |  |             AND LEVEL = 1 |  |  |             AND LEVEL = 1 | 
			
		
	
		
		
			
				
					|  |  |             AND CUSTOMER_ID = #{customerId} |  |  |             AND CUSTOMER_ID = #{customerId} | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             <if test="null !=usableFlagFormValue and usableFlagFormValue!='' "> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                 and USABLE_FLAG=#{usableFlagFormValue} | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					|  |  |         ORDER BY |  |  |         ORDER BY | 
			
		
	
		
		
			
				
					|  |  |             SORT ASC |  |  |             SORT ASC | 
			
		
	
		
		
			
				
					|  |  |     </select> |  |  |     </select> | 
			
		
	
	
		
		
			
				
					|  | @ -48,7 +54,9 @@ | 
			
		
	
		
		
			
				
					|  |  |             CUSTOMER_ID AS customerId, |  |  |             CUSTOMER_ID AS customerId, | 
			
		
	
		
		
			
				
					|  |  |             CATEGORY_CODE AS "value", |  |  |             CATEGORY_CODE AS "value", | 
			
		
	
		
		
			
				
					|  |  |             CATEGORY_NAME AS "label", |  |  |             CATEGORY_NAME AS "label", | 
			
		
	
		
		
			
				
					
					|  |  |             PARENT_CODE as pValue |  |  |             PARENT_CODE as pValue, | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					|  |  |  |  |  |             #{usableFlagFormValue} as usable_flag_form_value, | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             USABLE_FLAG as usableFlag | 
			
		
	
		
		
			
				
					|  |  |         FROM |  |  |         FROM | 
			
		
	
		
		
			
				
					|  |  |             ic_resi_demand_dict |  |  |             ic_resi_demand_dict | 
			
		
	
		
		
			
				
					|  |  |         WHERE |  |  |         WHERE | 
			
		
	
	
		
		
			
				
					|  | @ -56,6 +64,9 @@ | 
			
		
	
		
		
			
				
					|  |  |             AND LEVEL = 2 |  |  |             AND LEVEL = 2 | 
			
		
	
		
		
			
				
					|  |  |             AND CUSTOMER_ID = #{customerId} |  |  |             AND CUSTOMER_ID = #{customerId} | 
			
		
	
		
		
			
				
					|  |  |             AND PARENT_CODE = #{parentCode} |  |  |             AND PARENT_CODE = #{parentCode} | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             <if test="null !=usableFlagFormValue and usableFlagFormValue!='' "> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                 and USABLE_FLAG=#{usableFlagFormValue} | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					|  |  |         ORDER BY |  |  |         ORDER BY | 
			
		
	
		
		
			
				
					|  |  |             SORT ASC |  |  |             SORT ASC | 
			
		
	
		
		
			
				
					|  |  |     </select> |  |  |     </select> | 
			
		
	
	
		
		
			
				
					|  | 
 |