From 889c52ffe9cf71a2480c18efcffcc226ea2caca1 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Wed, 20 Apr 2022 10:32:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E4=B8=AA=E6=88=BF=E5=B1=8B=E4=B8=8B?= =?UTF-8?q?=E5=8F=AA=E6=9C=89=E4=B8=80=E4=B8=AA=E6=88=B7=E4=B8=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/IcResiUserServiceImpl.java | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) 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 63ad97fc96..39260d1c44 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 @@ -208,6 +208,19 @@ public class IcResiUserServiceImpl extends BaseServiceImpl wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(IcResiUserEntity::getHomeId, map.get("HOME_ID")); + wrapper.eq(IcResiUserEntity::getYhzgx, RelationshipEnum.SELF.getCode()); + List entityList = baseDao.selectList(wrapper); + if (CollectionUtils.isNotEmpty(entityList)) { + String errorMsg = "房屋下已存在户主"; + throw new EpmetException(EpmetErrorCode.ORG_ADD_FAILED.getCode(), errorMsg, errorMsg); + } + + } + //2022.04.19 end //查询组织信息 String agencyId = map.get("AGENCY_ID"); Result result = govOrgOpenFeignClient.getAgencyById(agencyId); @@ -325,6 +338,21 @@ public class IcResiUserServiceImpl extends BaseServiceImpl wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(IcResiUserEntity::getHomeId, entity.getHomeId()); + wrapper.eq(IcResiUserEntity::getYhzgx, RelationshipEnum.SELF.getCode()); + List entityList = baseDao.selectList(wrapper); + if (CollectionUtils.isNotEmpty(entityList)) { + String errorMsg = "房屋下已存在户主"; + throw new EpmetException(EpmetErrorCode.ORG_ADD_FAILED.getCode(), errorMsg, errorMsg); + } + } + } + //2022.04.19 end resiUserId = map.get("ID"); } }