From 2f3f773199c1acd56ae2f35051808364a5e3af66 Mon Sep 17 00:00:00 2001 From: jianjun Date: Tue, 21 Jun 2022 17:47:59 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=B1=85=E6=B0=91=E7=9A=84pi?= =?UTF-8?q?ds=20pids=E4=B8=BAagencyId=E7=9A=84pids+agencyId=20=E5=8D=B3?= =?UTF-8?q?=E5=8C=85=E5=90=AB=E7=BB=84=E7=BB=87=E6=9C=AC=E8=BA=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/IcResiUserService.java | 6 +++ .../impl/IcBirthRecordServiceImpl.java | 5 +++ .../impl/IcMoveInRecordServiceImpl.java | 4 ++ .../impl/IcResiUserImportServiceImpl.java | 8 +++- .../service/impl/IcResiUserServiceImpl.java | 37 +++++++++++++++++-- 5 files changed, 56 insertions(+), 4 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java index 3ef76601bc..8548ca5b53 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java @@ -436,4 +436,10 @@ public interface IcResiUserService extends BaseService { * @Date 2022/6/16 15:30 */ List getUserId(String icResiUserId); + + /** + * desc:设置居民的pids pids为agencyId的pids+agencyId 即包含组织本身 如果pids 为空则pids 为agencyId + * @param entity + */ + void setIcResiUserPids(IcResiUserEntity entity); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcBirthRecordServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcBirthRecordServiceImpl.java index afb5f9bfd4..163d15c563 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcBirthRecordServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcBirthRecordServiceImpl.java @@ -159,11 +159,13 @@ public class IcBirthRecordServiceImpl extends BaseServiceImpl map = new LinkedHashMap<>(); com.epmet.resi.partymember.dto.partymember.IcPartyMemberDTO partyMemberDTO = new com.epmet.resi.partymember.dto.partymember.IcPartyMemberDTO(); @@ -231,6 +232,9 @@ public class IcResiUserServiceImpl extends BaseServiceImpl result = govOrgOpenFeignClient.getAgencyById(agencyId); if (result.success() && null != result.getData()) { - map.put("pids", result.getData().getPids()); + //pids拼上 agencyId + String pids = result.getData().getPids(); + if (StringUtils.isBlank(pids)) { + pids = agencyId; + } else if (!pids.contains(agencyId)){ + pids = pids + StrConstant.COLON + agencyId; + } + map.put("pids", pids); } else { throw new RenException(String.format("新增居民信息-根据agencyId查询组织信息失败,agencyId->%s", agencyId)); } @@ -1999,6 +2010,8 @@ public class IcResiUserServiceImpl extends BaseServiceImpl getAllUserIds(String idCard, String customerId) { return baseDao.getAllUserIds(idCard, customerId); } + + /** + * desc:设置居民的pids pids为agencyId的pids+agencyId 即包含组织本身 如果pids 为空则pids 为agencyId + * @param entity + */ + @Override + public void setIcResiUserPids(IcResiUserEntity entity) { + String agencyPath = entity.getPids(); + if (StringUtils.isBlank(agencyPath)) { + agencyPath = entity.getAgencyId(); + } else if (!agencyPath.contains(entity.getAgencyId())) { + agencyPath = agencyPath + StrConstant.COLON + entity.getAgencyId(); + } + entity.setPids(agencyPath); + } }