From f431963f45d028350f8a403a517a4b04ab8fff09 Mon Sep 17 00:00:00 2001 From: 101captain <237651143@qq.com> Date: 星期五, 27 五月 2022 15:28:46 +0800 Subject: [PATCH] bug修改 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngVillageServiceImpl.java | 40 ++++++++++++++++++++-------------------- 1 files changed, 20 insertions(+), 20 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngVillageServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngVillageServiceImpl.java index eb885f4..7b1ed42 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngVillageServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngVillageServiceImpl.java @@ -232,30 +232,30 @@ if(count>0){ return R.fail("街路巷已存在"); } + //历史人口数据处理 + List<ComMngPopulationDO> populationDOS=this.populationDAO.selectList(new QueryWrapper<ComMngPopulationDO>().lambda().eq(ComMngPopulationDO::getVillageId,villageId)); + if(!populationDOS.isEmpty()){ + populationDOS.forEach(comMngPopulationDO -> { + comMngPopulationDO.setRoad(comMngVillageVO.getAlley()); + comMngPopulationDO.setDoorNo(comMngVillageVO.getHouseNum()); + comMngPopulationDO.setAddress(comMngPopulationDO.getAddress().replace(comMngVillageDO.getAlley()+comMngVillageDO.getHouseNum(),comMngVillageVO.getAlley()+comMngVillageVO.getHouseNum())); + this.populationDAO.updateById(comMngPopulationDO); + }); + } + //历史房屋数据处理 + List<ComMngPopulationHouseDO> comMngPopulationHouseDOS=this.comMngPopulationHouseDAO.selectList(new QueryWrapper<ComMngPopulationHouseDO>().lambda().eq(ComMngPopulationHouseDO::getVillageId,comMngVillageVO.getVillageId())); + if(!comMngPopulationHouseDOS.isEmpty()){ + comMngPopulationHouseDOS.forEach(comMngPopulationHouseDO -> { + comMngPopulationHouseDO.setAlley(comMngVillageVO.getAlley()); + comMngPopulationHouseDO.setHouseNum(comMngVillageVO.getHouseNum()); + comMngPopulationHouseDO.setAddress(comMngPopulationHouseDO.getAddress().replace(comMngVillageDO.getAlley()+comMngVillageDO.getHouseNum(),comMngVillageVO.getAlley()+comMngVillageVO.getHouseNum())); + this.comMngPopulationHouseDAO.updateById(comMngPopulationHouseDO); + }); + } } ComActDO comActDO = comActDAO.selectById(comMngVillageDO.getCommunityId()); if (comActDO == null || comActDO.getStreetId() == null) { return R.fail("社区没有绑定街道,请绑定后操作!"); - } - //历史人口数据处理 - List<ComMngPopulationDO> populationDOS=this.populationDAO.selectList(new QueryWrapper<ComMngPopulationDO>().lambda().eq(ComMngPopulationDO::getVillageId,villageId)); - if(!populationDOS.isEmpty()){ - populationDOS.forEach(comMngPopulationDO -> { - comMngPopulationDO.setRoad(comMngVillageVO.getAlley()); - comMngPopulationDO.setDoorNo(comMngVillageVO.getHouseNum()); - comMngPopulationDO.setAddress(comMngPopulationDO.getAddress().replace(comMngVillageDO.getAlley()+comMngVillageDO.getHouseNum(),comMngVillageVO.getAlley()+comMngVillageVO.getHouseNum())); - this.populationDAO.updateById(comMngPopulationDO); - }); - } - //历史房屋数据处理 - List<ComMngPopulationHouseDO> comMngPopulationHouseDOS=this.comMngPopulationHouseDAO.selectList(new QueryWrapper<ComMngPopulationHouseDO>().lambda().eq(ComMngPopulationHouseDO::getVillageId,comMngVillageVO.getVillageId())); - if(!comMngPopulationHouseDOS.isEmpty()){ - comMngPopulationHouseDOS.forEach(comMngPopulationHouseDO -> { - comMngPopulationHouseDO.setAlley(comMngVillageVO.getAlley()); - comMngPopulationHouseDO.setHouseNum(comMngVillageVO.getHouseNum()); - comMngPopulationHouseDO.setAddress(comMngPopulationHouseDO.getAddress().replace(comMngVillageDO.getAlley()+comMngVillageDO.getHouseNum(),comMngVillageVO.getAlley()+comMngVillageVO.getHouseNum())); - this.comMngPopulationHouseDAO.updateById(comMngPopulationHouseDO); - }); } BeanUtils.copyProperties(comMngVillageVO, comMngVillageDO); comMngVillageDO.setName(comMngVillageVO.getGroupAt()); -- Gitblit v1.7.1