From 0063ba470b8d6db99d7786ec1fdceb1703ba985a Mon Sep 17 00:00:00 2001 From: huanghongfa <huanghongfa123456> Date: 星期二, 01 六月 2021 17:11:57 +0800 Subject: [PATCH] 修改bug --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 43 insertions(+), 0 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java index 64f4062..b7abff9 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java @@ -198,6 +198,42 @@ } page.setSize(pageSize); page.setCurrent(pageNum); + + if(comMngPopulationVO.getHouseId() != null){ + ComMngPopulationHouseDO houseDO = comMngPopulationHouseDAO.selectById(comMngPopulationVO.getHouseId()); + if(houseDO != null){ + switch (comMngPopulationVO.getLevel()){ + case 1: + comMngPopulationVO.setRoad(houseDO.getAlley()); + break; + case 2: + comMngPopulationVO.setRoad(houseDO.getAlley()); + comMngPopulationVO.setDoorNo(houseDO.getHouseNum()); + break; + case 3: + comMngPopulationVO.setRoad(houseDO.getAlley()); + comMngPopulationVO.setDoorNo(houseDO.getHouseNum()); + comMngPopulationVO.setFloor(houseDO.getFloor()); + break; + case 4: + comMngPopulationVO.setRoad(houseDO.getAlley()); + comMngPopulationVO.setDoorNo(houseDO.getHouseNum()); + comMngPopulationVO.setFloor(houseDO.getFloor()); + comMngPopulationVO.setUnitNo(houseDO.getUnitNo()); + break; + case 5: + comMngPopulationVO.setRoad(houseDO.getAlley()); + comMngPopulationVO.setDoorNo(houseDO.getHouseNum()); + comMngPopulationVO.setFloor(houseDO.getFloor()); + comMngPopulationVO.setUnitNo(houseDO.getUnitNo()); + comMngPopulationVO.setHouseNo(houseDO.getHouseNo()); + break; + default: + break; + } + } + } + IPage<ComMngPopulationVO> iPage = populationDAO.pagePopulation(page, comMngPopulationVO); if(!iPage.getRecords().isEmpty()){ iPage.getRecords().forEach(populDO -> { @@ -308,6 +344,7 @@ populationHouseDO.setUnitNo(vo.getUnitNo()); populationHouseDO.setHouseNo(vo.getHouseNo()); populationHouseDO.setAddress(address); + populationHouseDO.setUpdateAt(new Date()); if(StringUtils.isEmpty(vo.getName()) && StringUtils.isEmpty(vo.getCardNo())){ populationHouseDO.setIsEmpty(PopulIsOksEnum.YES.getCode()); } @@ -587,6 +624,12 @@ return R.fail(); } BeanUtils.copyProperties(vo,populationDO); + if(StringUtils.isEmpty(vo.getLabel())){ + populationDO.setLabel(null); + } + if(StringUtils.isEmpty(vo.getRemark())){ + populationDO.setRemark(null); + } populationDO.setCardNo(null); populationDO.setPhone(AESUtil.encrypt128(vo.getPhone(), aesKey)); -- Gitblit v1.7.1