From 0049861d4e8f79cbb8f33a4b2640403022eda724 Mon Sep 17 00:00:00 2001 From: zxc <954985705@qq.com> Date: Thu, 30 Apr 2020 17:06:15 +0800 Subject: [PATCH] =?UTF-8?q?gridFullPath=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/PartymemberInfoServiceImpl.java | 27 ++++++++++++++----- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberInfoServiceImpl.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberInfoServiceImpl.java index a6b52cfd48..bbb512211c 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberInfoServiceImpl.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/service/impl/PartymemberInfoServiceImpl.java @@ -28,6 +28,7 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.dto.form.CreatedTimeByUserIdFormDTO; import com.epmet.dto.result.CertifiedResultDTO; import com.epmet.dto.result.CreatedTimeByUserIdResultDTO; +import com.epmet.dto.result.GridInfoResultDTO; import com.epmet.dto.result.SelectGridNameByGridIdResultDTO; import com.epmet.modules.feign.EpmetUserFeignClient; import com.epmet.modules.feign.GovOrgFeignClient; @@ -152,9 +153,16 @@ public class PartymemberInfoServiceImpl extends BaseServiceImpl> listResult = epmetUserFeignClient.selectUserHeadPhotoByUserId(certifiedResultDTOS); - Result gridName = govOrgFeignClient.selectGridNameByGridId(certifiedFormDTO); + Result gridInfoResult = govOrgFeignClient.queryGridInfo(certifiedFormDTO.getGridId()); + String gridFullPath = ""; + if (gridInfoResult.success() && null != gridInfoResult.getData()) { + gridFullPath = String.format("%s-%s-%s", gridInfoResult.getData().getStreetName() == null?"":gridInfoResult.getData().getStreetName(), + gridInfoResult.getData().getCommnuityName() == null?"":gridInfoResult.getData().getCommnuityName(), + gridInfoResult.getData().getGridName() == null?"":gridInfoResult.getData().getGridName()); + gridFullPath = gridFullPath.replaceAll("--", "").trim(); + } for (CertifiedResultDTO datum : listResult.getData()) { - datum.setGridFullPath(gridName.getData().getGridName()); + datum.setGridFullPath(gridFullPath); } return listResult.getData(); } @@ -178,11 +186,16 @@ public class PartymemberInfoServiceImpl extends BaseServiceImpl registerTime = epmetUserFeignClient.createdTimeByUserId(time); certifiedDetail.setCertifyTime(registerTime.getData().getRegisterTime()); - CertifiedFormDTO certifiedFormDTO = new CertifiedFormDTO(); - certifiedFormDTO.setGridId(certifiedDetail.getGridId()); - //查询网格名称 - Result gridName = govOrgFeignClient.selectGridNameByGridId(certifiedFormDTO); - certifiedDetail.setGridFullPath(gridName.getData().getGridName()); + //查询gridFullName + Result gridInfoResult = govOrgFeignClient.queryGridInfo(certifiedDetail.getGridId()); + String gridFullPath = ""; + if (gridInfoResult.success() && null != gridInfoResult.getData()) { + gridFullPath = String.format("%s-%s-%s", gridInfoResult.getData().getStreetName() == null?"":gridInfoResult.getData().getStreetName(), + gridInfoResult.getData().getCommnuityName() == null?"":gridInfoResult.getData().getCommnuityName(), + gridInfoResult.getData().getGridName() == null?"":gridInfoResult.getData().getGridName()); + gridFullPath = gridFullPath.replaceAll("--", "").trim(); + } + certifiedDetail.setGridFullPath(gridFullPath); return certifiedDetail; }