diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml index 73409e2869..6b49401adf 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml @@ -205,13 +205,16 @@ SELECT d.CATEGORY_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 ic_resi_demand_dict d LEFT JOIN ic_resi_demand_dict p ON ( d.PARENT_CODE = p.CATEGORY_CODE AND p.CUSTOMER_ID = #{customerId} ) WHERE d.DEL_FLAG = '0' - AND d.`LEVEL` = '2' AND d.CUSTOMER_ID = #{customerId} and d.category_code in