From f30c3a37f5bdf79dbb943fc1fb7ed1200f7d1e4c Mon Sep 17 00:00:00 2001 From: DESKTOP-71BH0QO\L、ming <172680469@qq.com> Date: 星期四, 22 四月 2021 17:58:20 +0800 Subject: [PATCH] fix:修改实有人口导入接口 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java index 3a4b95e..8e2bea8 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java @@ -38,6 +38,7 @@ import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.List; +import java.util.stream.Collectors; /** * 实有人口Service实现类 @@ -218,10 +219,11 @@ if (comMngVillageDO == null) { throw new ServiceException("街道巷:" + vo.getRoad() + "不存在!"); } + List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); comMngPopulationDO.setVillageId(comMngVillageDO.getVillageId()); comMngPopulationDO.setActId(comActDO.getCommunityId()); comMngPopulationDO.setStreetId(comActDO.getStreetId()); - comMngPopulationDO.setLabel(Joiner.on(",").join(vo.getUserTagStr())); + comMngPopulationDO.setLabel(Joiner.on(",").join(userTag)); comMngPopulationDO.setVillageName(comMngVillageDO.getGroupAt()); populationDOList.add(comMngPopulationDO); }); @@ -257,7 +259,8 @@ comMngPopulationDO.setVillageId(comMngVillageDO.getVillageId()); comMngPopulationDO.setActId(comActDO.getCommunityId()); comMngPopulationDO.setStreetId(comActDO.getStreetId()); - comMngPopulationDO.setLabel(Joiner.on(",").join(vo.getUserTagStr())); + List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); + comMngPopulationDO.setLabel(Joiner.on(",").join(userTag)); comMngPopulationDO.setVillageName(comMngVillageDO.getGroupAt()); populationDOList.add(comMngPopulationDO); }); -- Gitblit v1.7.1