From 4f3dfc736393484d728d8c5de7b5ef1a6046194a Mon Sep 17 00:00:00 2001 From: YUJT Date: Mon, 11 Jul 2022 09:34:07 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E5=BA=94=E6=80=A5=E7=9A=84?= =?UTF-8?q?=E6=94=B9=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/HouseInformationServiceImpl.java | 40 +------------------ 1 file changed, 2 insertions(+), 38 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java index 1acb3f8184..33f3e3ab33 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseInformationServiceImpl.java @@ -58,11 +58,9 @@ public class HouseInformationServiceImpl implements HouseInformationService { */ @Override public CommunityCountResultDTO getCommunityCount(HouseInformationFormDTO formDTO) { - //获取工作人员所属组织 - CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); if (StringUtils.isEmpty(formDTO.getCommunityId())) { //获取工作人员所属组织 -// CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); if (null == staffInfo) { throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取用户信息失败", "获取用户信息失败"); } @@ -71,12 +69,7 @@ public class HouseInformationServiceImpl implements HouseInformationService { String orgName; CustomerAgencyEntity agency = customerAgencyDao.selectById(formDTO.getCommunityId()); if (null == agency) { - agency = customerAgencyDao.selectById(staffInfo.getAgencyId()); - if (null == agency) { - throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "社区不存在", "社区不存在"); - } else { - formDTO.setCommunityId(staffInfo.getAgencyId()); - } + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "社区不存在", "社区不存在"); } CustomerAgencyEntity parentAgency = customerAgencyDao.selectById(agency.getPid()); if (null == parentAgency) { @@ -128,35 +121,6 @@ public class HouseInformationServiceImpl implements HouseInformationService { } item.setDifferPersonCount(item.getPersonRealCount() - item.getPersonCount()); }); - - } else { - return deleteAfetrEmergency(formDTO); - } - return new PageData<>(list, pageInfo.getTotal()); - } - - private PageData deleteAfetrEmergency(HouseInformationFormDTO formDTO) { - //获取工作人员所属组织 - CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); - formDTO.setCommunityId(staffInfo.getAgencyId()); - PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); - List list = icNeighborHoodDao.getGridList(formDTO); - PageInfo pageInfo = new PageInfo<>(list); - if (CollectionUtils.isNotEmpty(list)) { - //获取录入人口数 - IcUserCountFormDTO countFormDTO = new IcUserCountFormDTO(); - countFormDTO.setOrgType(NumConstant.ZERO_STR); - countFormDTO.setOrgId(formDTO.getCommunityId()); - countFormDTO.setType(NumConstant.ONE_STR); - Map map = getMapResult(countFormDTO); - - list.forEach(item -> { - if (map.containsKey(item.getId())) { - item.setPersonCount(map.get(item.getId())); - } - item.setDifferPersonCount(item.getPersonRealCount() - item.getPersonCount()); - }); - } return new PageData<>(list, pageInfo.getTotal()); }