|
@ -205,13 +205,16 @@ |
|
|
SELECT |
|
|
SELECT |
|
|
d.CATEGORY_CODE, |
|
|
d.CATEGORY_CODE, |
|
|
d.PARENT_CODE, |
|
|
d.PARENT_CODE, |
|
|
concat( p.CATEGORY_NAME, '-', d.CATEGORY_NAME ) AS CATEGORY_NAME |
|
|
( |
|
|
|
|
|
case when d.level='1' then d.category_name |
|
|
|
|
|
when d.level='2' then concat( p.CATEGORY_NAME, '-', d.CATEGORY_NAME ) |
|
|
|
|
|
end |
|
|
|
|
|
)AS CATEGORY_NAME |
|
|
FROM |
|
|
FROM |
|
|
ic_resi_demand_dict d |
|
|
ic_resi_demand_dict d |
|
|
LEFT JOIN ic_resi_demand_dict p ON ( d.PARENT_CODE = p.CATEGORY_CODE AND p.CUSTOMER_ID = #{customerId} ) |
|
|
LEFT JOIN ic_resi_demand_dict p ON ( d.PARENT_CODE = p.CATEGORY_CODE AND p.CUSTOMER_ID = #{customerId} ) |
|
|
WHERE |
|
|
WHERE |
|
|
d.DEL_FLAG = '0' |
|
|
d.DEL_FLAG = '0' |
|
|
AND d.`LEVEL` = '2' |
|
|
|
|
|
AND d.CUSTOMER_ID = #{customerId} |
|
|
AND d.CUSTOMER_ID = #{customerId} |
|
|
<if test="null!=cateogryCodes and cateogryCodes.size()>0"> |
|
|
<if test="null!=cateogryCodes and cateogryCodes.size()>0"> |
|
|
and d.category_code in |
|
|
and d.category_code in |
|
|