From 917af2df9c38038ed3ebb4abd961947bac5620c0 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Wed, 29 Jun 2022 17:23:26 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=8F=8C=E5=AE=9E=E5=BD=95=E5=85=A5?= =?UTF-8?q?=E3=80=91=E7=BB=9F=E8=AE=A1=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/HouseInformationFormDTO.java | 3 +- .../dto/result/BuildingCountResultDTO.java | 1 + .../dto/result/BuildingListResultDTO.java | 5 +- .../dto/result/CommunityCountResultDTO.java | 2 + .../dto/result/GridCountListResultDTO.java | 3 + .../dto/result/GridStatisticsResultDTO.java | 2 + .../result/NeighborHoodCountResultDTO.java | 1 + .../dto/result/NeighborHoodListResultDTO.java | 3 + .../epmet/dto/result/UnitCountResultDTO.java | 1 + .../HouseInformationController.java | 10 + .../java/com/epmet/dao/IcNeighborHoodDao.java | 104 +++++- .../impl/HouseInformationServiceImpl.java | 112 ++++++- .../resources/mapper/IcNeighborHoodDao.xml | 313 ++++++++++++++++++ 13 files changed, 543 insertions(+), 17 deletions(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/HouseInformationFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/HouseInformationFormDTO.java index 3533225669..8fd3a8358e 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/HouseInformationFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/HouseInformationFormDTO.java @@ -13,6 +13,7 @@ import java.io.Serializable; @Data public class HouseInformationFormDTO extends PageFormDTO implements Serializable { private static final long serialVersionUID = 2348447479132364176L; + private String customerId; private String staffId; private String communityId; private String gridId; @@ -20,5 +21,5 @@ public class HouseInformationFormDTO extends PageFormDTO implements Serializable private String buildingId; private String unitId; private String name; - private String sort; + private String sort = "1"; } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingCountResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingCountResultDTO.java index 69f3919b61..c37e19702d 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingCountResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingCountResultDTO.java @@ -12,6 +12,7 @@ import lombok.NoArgsConstructor; @Data public class BuildingCountResultDTO { private String buildingId; + private String buildingName; private String buildingType; private Integer unitCount; private Integer houseCount; diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingListResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingListResultDTO.java index ed54d7b998..e0f6c7e038 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingListResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/BuildingListResultDTO.java @@ -16,10 +16,11 @@ public class BuildingListResultDTO implements Serializable { private static final long serialVersionUID = -1423424057500044373L; private String id; private String name; - private Integer buildingCount; + private Integer unitCount; private Integer houseCount; private Integer personCount; - private Integer differBuildingCount; private Integer differHouseCount; private Integer differPersonCount; + private Integer houseRealCount; + private Integer personRealCount; } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CommunityCountResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CommunityCountResultDTO.java index 2d85e642ca..50961f3a9f 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CommunityCountResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CommunityCountResultDTO.java @@ -14,6 +14,8 @@ import java.io.Serializable; @Data public class CommunityCountResultDTO implements Serializable { private static final long serialVersionUID = -1677303397440121269L; + private String id; + private String name; private Integer buildingCount; private Integer houseCount; private Integer personCount; diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridCountListResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridCountListResultDTO.java index 9a5c6b368c..99318e3bc5 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridCountListResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridCountListResultDTO.java @@ -22,4 +22,7 @@ public class GridCountListResultDTO implements Serializable { private Integer differBuildingCount; private Integer differHouseCount; private Integer differPersonCount; + private Integer buildingRealCount; + private Integer houseRealCount; + private Integer personRealCount; } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridStatisticsResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridStatisticsResultDTO.java index d1a74e8847..ea5ff3634f 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridStatisticsResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/GridStatisticsResultDTO.java @@ -15,6 +15,8 @@ import java.io.Serializable; public class GridStatisticsResultDTO implements Serializable { private static final long serialVersionUID = -2022337690871957027L; + private String gridId; + private String gridName; private Integer buildingCount; private Integer houseCount; private Integer personCount; diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodCountResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodCountResultDTO.java index 9c7d5cfcfd..610b7d871f 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodCountResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodCountResultDTO.java @@ -15,6 +15,7 @@ import java.io.Serializable; public class NeighborHoodCountResultDTO implements Serializable { private static final long serialVersionUID = 4148009467129407023L; private String neighborHoodId; + private String neighborHoodName; private Integer buildingCount; private Integer houseCount; private Integer personCount; diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodListResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodListResultDTO.java index fa41ac49f8..ad256b2f9f 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodListResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/NeighborHoodListResultDTO.java @@ -22,4 +22,7 @@ public class NeighborHoodListResultDTO implements Serializable { private Integer differBuildingCount; private Integer differHouseCount; private Integer differPersonCount; + private Integer buildingRealCount; + private Integer houseRealCount; + private Integer personRealCount; } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/UnitCountResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/UnitCountResultDTO.java index 548e0c4ef6..ac8d1d8d03 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/UnitCountResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/UnitCountResultDTO.java @@ -12,6 +12,7 @@ import lombok.NoArgsConstructor; @Data public class UnitCountResultDTO { private String unitId; + private String unitName; private Integer houseCount; private Integer personCount; } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java index ea9b6504a0..314940ecf8 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseInformationController.java @@ -103,6 +103,7 @@ public class HouseInformationController { */ @PostMapping("getCommunityCount") public Result getCommunityCount(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { + formDTO.setCustomerId(tokenDTO.getCustomerId()); formDTO.setStaffId(tokenDTO.getUserId()); return new Result().ok(houseInformationService.getCommunityCount(formDTO)); } @@ -118,6 +119,7 @@ public class HouseInformationController { */ @PostMapping("getGridList") public Result> getGridList(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { + formDTO.setCustomerId(tokenDTO.getCustomerId()); formDTO.setStaffId(tokenDTO.getUserId()); return new Result>().ok(houseInformationService.getGridList(formDTO)); } @@ -133,6 +135,7 @@ public class HouseInformationController { */ @PostMapping("getGridCount") public Result getGridCount(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { + formDTO.setCustomerId(tokenDTO.getCustomerId()); formDTO.setStaffId(tokenDTO.getUserId()); return new Result().ok(houseInformationService.getGridCount(formDTO)); } @@ -148,6 +151,7 @@ public class HouseInformationController { */ @PostMapping("getNeighborHoodList") public Result> getNeighborHoodList(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { + formDTO.setCustomerId(tokenDTO.getCustomerId()); formDTO.setStaffId(tokenDTO.getUserId()); return new Result>().ok(houseInformationService.getNeighborHoodList(formDTO)); } @@ -163,6 +167,7 @@ public class HouseInformationController { */ @PostMapping("getNeighborHoodCount") public Result getNeighborHoodCount(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { + formDTO.setCustomerId(tokenDTO.getCustomerId()); formDTO.setStaffId(tokenDTO.getUserId()); return new Result().ok(houseInformationService.getNeighborHoodCount(formDTO)); } @@ -178,6 +183,7 @@ public class HouseInformationController { */ @PostMapping("getBuildingList") public Result> getBuildingList(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { + formDTO.setCustomerId(tokenDTO.getCustomerId()); formDTO.setStaffId(tokenDTO.getUserId()); return new Result>().ok(houseInformationService.getBuildingList(formDTO)); } @@ -194,6 +200,7 @@ public class HouseInformationController { */ @PostMapping("getBuildingCount") public Result getBuildingCount(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { + formDTO.setCustomerId(tokenDTO.getCustomerId()); formDTO.setStaffId(tokenDTO.getUserId()); return new Result().ok(houseInformationService.getBuildingCount(formDTO)); } @@ -209,6 +216,7 @@ public class HouseInformationController { */ @PostMapping("getUnitList") public Result> getUnitList(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { + formDTO.setCustomerId(tokenDTO.getCustomerId()); formDTO.setStaffId(tokenDTO.getUserId()); return new Result>().ok(houseInformationService.getUnitList(formDTO)); } @@ -224,6 +232,7 @@ public class HouseInformationController { */ @PostMapping("getUnitCount") public Result getUnitCount(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { + formDTO.setCustomerId(tokenDTO.getCustomerId()); formDTO.setStaffId(tokenDTO.getUserId()); return new Result().ok(houseInformationService.getUnitCount(formDTO)); } @@ -239,6 +248,7 @@ public class HouseInformationController { */ @PostMapping("getHouseList") public Result> getHouseList(@LoginUser TokenDto tokenDTO, @RequestBody HouseInformationFormDTO formDTO) { + formDTO.setCustomerId(tokenDTO.getCustomerId()); formDTO.setStaffId(tokenDTO.getUserId()); return new Result>().ok(houseInformationService.getHouseList(formDTO)); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodDao.java index ac8fc69c10..f872338c1e 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcNeighborHoodDao.java @@ -21,9 +21,9 @@ import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.IcNeighborHoodDTO; import com.epmet.dto.ImportGeneralDTO; import com.epmet.dto.NeighborHoodAndManagementDTO; +import com.epmet.dto.form.HouseInformationFormDTO; import com.epmet.dto.form.IcNeighborHoodListFormDTO; -import com.epmet.dto.result.IcNeighborHoodResultDTO; -import com.epmet.dto.result.OrganizationCommunityDTO; +import com.epmet.dto.result.*; import com.epmet.entity.IcHouseEntity; import com.epmet.entity.IcNeighborHoodEntity; import com.epmet.excel.IcNeighborHoodExcel; @@ -111,4 +111,104 @@ public interface IcNeighborHoodDao extends BaseDao { */ IcNeighborHoodEntity selectByCoding(@Param("coding") String coding, @Param("id") String id); + + /** + * 社区录入数据统计 + * + * @Param communityId + * @Return {@link CommunityCountResultDTO} + * @Author zhaoqifeng + * @Date 2022/6/28 17:16 + */ + CommunityCountResultDTO getCommunityCount(HouseInformationFormDTO formDTO); + + /** + * 【双实录入】社区-网格列表 + * + * @Param formDTO + * @Return {@link List< GridCountListResultDTO>} + * @Author zhaoqifeng + * @Date 2022/6/29 11:06 + */ + List getGridList(HouseInformationFormDTO formDTO); + + /** + * 【双实录入】网格录入数据统计 + * + * @Param formDTO + * @Return {@link GridStatisticsResultDTO} + * @Author zhaoqifeng + * @Date 2022/6/29 13:52 + */ + GridStatisticsResultDTO getGridCount(HouseInformationFormDTO formDTO); + + /** + * 【双实录入】网格-小区列表 + * + * @Param formDTO + * @Return {@link List} + * @Author zhaoqifeng + * @Date 2022/6/29 14:11 + */ + List getNeighborHoodList(HouseInformationFormDTO formDTO); + + /** + * 【双实录入】小区录入数据统计 + * + * @Param formDTO + * @Return {@link NeighborHoodCountResultDTO} + * @Author zhaoqifeng + * @Date 2022/6/29 14:27 + */ + NeighborHoodCountResultDTO getNeighborHoodCount(HouseInformationFormDTO formDTO); + + /** + * 【双实录入】小区-楼栋列表 + * + * @Param formDTO + * @Return {@link List< BuildingListResultDTO>} + * @Author zhaoqifeng + * @Date 2022/6/29 14:50 + */ + List getBuildingList(HouseInformationFormDTO formDTO); + + /** + * 【双实录入】楼栋录入数据统计 + * + * @Param formDTO + * @Return {@link BuildingCountResultDTO} + * @Author zhaoqifeng + * @Date 2022/6/29 15:44 + */ + BuildingCountResultDTO getBuildingCount(HouseInformationFormDTO formDTO); + + /** + * 【双实录入】楼栋-单元列表 + * + * @Param formDTO + * @Return {@link List} + * @Author zhaoqifeng + * @Date 2022/6/29 16:07 + */ + List getUnitList(HouseInformationFormDTO formDTO); + + /** + * 【双实录入】单元录入数据统计 + * + * @Param formDTO + * @Return {@link UnitCountResultDTO} + * @Author zhaoqifeng + * @Date 2022/6/29 16:06 + */ + UnitCountResultDTO getUnitCount(HouseInformationFormDTO formDTO); + + /** + * 【双实录入】单元-房屋列表 + * + * @Param formDTO + * @Return {@link List} + * @Author zhaoqifeng + * @Date 2022/6/29 16:48 + */ + List getHouseList(HouseInformationFormDTO formDTO) } 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 0a03a15f97..66aae8029b 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 @@ -1,12 +1,28 @@ package com.epmet.service.impl; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.redis.common.CustomerStaffRedis; +import com.epmet.dao.CustomerAgencyDao; +import com.epmet.dao.IcNeighborHoodDao; import com.epmet.dto.form.HouseInformationFormDTO; import com.epmet.dto.result.*; +import com.epmet.entity.CustomerAgencyEntity; +import com.epmet.enums.HouseRentFlagEnums; import com.epmet.service.HouseInformationService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.List; + /** * @Description * @Author zhaoqifeng @@ -15,6 +31,12 @@ import org.springframework.stereotype.Service; @Slf4j @Service public class HouseInformationServiceImpl implements HouseInformationService { + + @Resource + private IcNeighborHoodDao icNeighborHoodDao; + @Resource + private CustomerAgencyDao customerAgencyDao; + /** * 【双实录入】社区录入数据统计 * @@ -26,7 +48,31 @@ public class HouseInformationServiceImpl implements HouseInformationService { */ @Override public CommunityCountResultDTO getCommunityCount(HouseInformationFormDTO formDTO) { - return null; + if (StringUtils.isEmpty(formDTO.getCommunityId())) { + //获取工作人员所属组织 + CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); + if(null == staffInfo) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取用户信息失败", "获取用户信息失败"); + } + formDTO.setCommunityId(staffInfo.getAgencyId()); + } + String orgName; + CustomerAgencyEntity agency = customerAgencyDao.selectById(formDTO.getCommunityId()); + if (null == agency) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "社区不存在", "社区不存在"); + } + CustomerAgencyEntity parentAgency = customerAgencyDao.selectById(agency.getPid()); + if (null == parentAgency) { + orgName = agency.getOrganizationName(); + } else { + orgName = parentAgency.getOrganizationName() + agency.getOrganizationName(); + } + //获取工作人员信息 + CommunityCountResultDTO result = icNeighborHoodDao.getCommunityCount(formDTO); + result.setId(agency.getId()); + result.setName(orgName); + //TODO 获取录入人口数 + return result; } /** @@ -34,13 +80,17 @@ public class HouseInformationServiceImpl implements HouseInformationService { * * @param formDTO * @Param formDTO - * @Return {@link PageData < GridCountListResultDTO >} + * @Return {@link PageData} * @Author zhaoqifeng * @Date 2022/6/28 15:41 */ @Override public PageData getGridList(HouseInformationFormDTO formDTO) { - return null; + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); + List list = icNeighborHoodDao.getGridList(formDTO); + PageInfo pageInfo = new PageInfo<>(list); + //TODO 获取录入人口数 + return new PageData<>(list, pageInfo.getTotal()); } /** @@ -54,7 +104,9 @@ public class HouseInformationServiceImpl implements HouseInformationService { */ @Override public GridStatisticsResultDTO getGridCount(HouseInformationFormDTO formDTO) { - return null; + GridStatisticsResultDTO result = icNeighborHoodDao.getGridCount(formDTO); + //TODO 获取录入人口数 + return result; } /** @@ -62,13 +114,17 @@ public class HouseInformationServiceImpl implements HouseInformationService { * * @param formDTO * @Param formDTO - * @Return {@link PageData< NeighborHoodListResultDTO >} + * @Return {@link PageData} * @Author zhaoqifeng * @Date 2022/6/28 16:24 */ @Override public PageData getNeighborHoodList(HouseInformationFormDTO formDTO) { - return null; + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); + List list = icNeighborHoodDao.getNeighborHoodList(formDTO); + PageInfo pageInfo = new PageInfo<>(list); + //TODO 获取录入人口数 + return new PageData<>(list, pageInfo.getTotal()); } /** @@ -82,7 +138,9 @@ public class HouseInformationServiceImpl implements HouseInformationService { */ @Override public NeighborHoodCountResultDTO getNeighborHoodCount(HouseInformationFormDTO formDTO) { - return null; + NeighborHoodCountResultDTO result = icNeighborHoodDao.getNeighborHoodCount(formDTO); + //TODO 获取录入人口数 + return result; } /** @@ -96,7 +154,20 @@ public class HouseInformationServiceImpl implements HouseInformationService { */ @Override public PageData getBuildingList(HouseInformationFormDTO formDTO) { - return null; + List list; + long total = 0; + //TODO 获取录入人口数 + if (NumConstant.FIVE_STR.equals(formDTO.getSort())) { + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); + list = icNeighborHoodDao.getBuildingList(formDTO); + PageInfo pageInfo = new PageInfo<>(list); + total = pageInfo.getTotal(); + } else { + list = icNeighborHoodDao.getBuildingList(formDTO); + total = list.size(); + } + + return new PageData<>(list, total); } /** @@ -110,7 +181,9 @@ public class HouseInformationServiceImpl implements HouseInformationService { */ @Override public BuildingCountResultDTO getBuildingCount(HouseInformationFormDTO formDTO) { - return null; + BuildingCountResultDTO result = icNeighborHoodDao.getBuildingCount(formDTO); + //TODO 获取录入人口数 + return result; } /** @@ -124,7 +197,11 @@ public class HouseInformationServiceImpl implements HouseInformationService { */ @Override public PageData getUnitList(HouseInformationFormDTO formDTO) { - return null; + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); + List list = icNeighborHoodDao.getUnitList(formDTO); + PageInfo pageInfo = new PageInfo<>(list); + //TODO 获取录入人口数 + return new PageData<>(list, pageInfo.getTotal()); } /** @@ -138,7 +215,9 @@ public class HouseInformationServiceImpl implements HouseInformationService { */ @Override public UnitCountResultDTO getUnitCount(HouseInformationFormDTO formDTO) { - return null; + UnitCountResultDTO result = icNeighborHoodDao.getUnitCount(formDTO); + //TODO 获取录入人口数 + return result; } /** @@ -152,6 +231,15 @@ public class HouseInformationServiceImpl implements HouseInformationService { */ @Override public PageData getHouseList(HouseInformationFormDTO formDTO) { - return null; + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); + List list = icNeighborHoodDao.getHouseList(formDTO); + PageInfo pageInfo = new PageInfo<>(list); + //TODO 获取录入人口数 + if (CollectionUtils.isNotEmpty(list)) { + list.forEach(item -> { + item.setHouseType(HouseRentFlagEnums.getTypeValue(item.getHouseType())); + }); + } + return new PageData<>(list, pageInfo.getTotal()); } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml index de52475d2a..2ac839f1ce 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcNeighborHoodDao.xml @@ -331,4 +331,317 @@ and id != #{id} + + + + + + + + + + + + + + + + + + +