From daeb2917009f7d9c75a2c6b31f5131c14bebe3d3 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 24 Nov 2021 13:28:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E9=A1=B5=E6=9F=A5=E8=AF=A2=EF=BC=8C?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=9C=80=E6=B1=82=E5=88=86=E7=B1=BB=E5=90=8D?= =?UTF-8?q?=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/IcResiDemandDictDao.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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