From e9c4fb99a33f9e5abae564a80629d9af64f1b474 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 3 Nov 2021 17:56:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E7=B1=BB=E5=90=8D=E8=B5=8B=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/IcFormItemServiceImpl.java | 8 +++++ .../java/com/epmet/dao/IcResiUserDao.java | 4 +++ .../service/impl/IcResiUserServiceImpl.java | 27 ++++++++++---- .../main/resources/mapper/IcResiUserDao.xml | 35 +++++++++++++++---- 4 files changed, 60 insertions(+), 14 deletions(-) diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormItemServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormItemServiceImpl.java index a114d68126..f614e64e0b 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormItemServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcFormItemServiceImpl.java @@ -129,6 +129,14 @@ public class IcFormItemServiceImpl extends BaseServiceImpl()); + list.add(categoryName); + TableHeaderResultDTO houseType=new TableHeaderResultDTO(); houseType.setItemType("input"); houseType.setItemId(StrConstant.EPMETY_STR); diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java index a73caaccf6..45e31dd726 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java @@ -28,6 +28,7 @@ import org.apache.ibatis.annotations.Param; import java.util.List; import java.util.Map; +import java.util.Set; /** * 用户基础信息 @@ -117,4 +118,7 @@ public interface IcResiUserDao extends BaseDao { */ List searchByName(@Param("name")String name, @Param("agencyId")String agencyId,@Param("pageNo")Integer pageNo); + Set selectUserDemandCode(String icResiUserId); + + String selectCategoryNames(@Param("customerId") String customerId,@Param("codeSet") Set codeSet); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java index d2c5b2dbed..4950eb97e6 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java @@ -95,7 +95,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl page(Map params) { IPage page = baseDao.selectPage( @@ -414,12 +414,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl(pageInfo.getList(), pageInfo.getTotal()); } + private String queryUserDemandName(String customerId,String icResiUserId) { + Set demandCodePath=baseDao.selectUserDemandCode(icResiUserId); + if(CollectionUtils.isEmpty(demandCodePath)){ + return StrConstant.EPMETY_STR; + } + Set codeSet=new HashSet<>(); + for(String codePath:demandCodePath){ + if(codePath.contains(StrConstant.COMMA)){ + String[] codeAtt=codePath.split(StrConstant.COMMA); + codeSet.add(codeAtt[codeAtt.length-1]); + }else{ + codeSet.add(codePath); + } + } + String demandName=baseDao.selectCategoryNames(customerId,codeSet); + return demandName; + } + /** * 编辑页面,显示居民信息详情 * diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml index 6e91e4f0c0..cff59d414d 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml @@ -101,9 +101,6 @@ ${column.columnName} - , - GROUP_CONCAT(ic_resi_demand.CATEGORY_CODE) as DEMAND_CATEGORY_IDS, - GROUP_CONCAT(ic_resi_demand_dict.CATEGORY_NAME) as DEMAND_NAME FROM ic_resi_user @@ -111,10 +108,6 @@ ${subTableName} - - left join ic_resi_demand_dict - on(ic_resi_user.customer_id=ic_resi_demand_dict.CUSTOMER_ID - and ic_resi_demand.CATEGORY_CODE=ic_resi_demand_dict.CATEGORY_CODE ) @@ -185,4 +178,32 @@ AND `NAME` LIKE CONCAT('%',#{name},'%') ORDER BY `NAME` + + + + \ No newline at end of file