DESKTOP-71BH0QO\L、ming
2021-04-15 6b8215905b911ccdccff76e931703c9756a79f36
Merge remote-tracking branch 'origin/master'
1个文件已修改
6 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java
@@ -191,7 +191,7 @@
        }
        List<ComMngPopulationDO> comMngPopulationDOS = populationDAO.selectList(new QueryWrapper<ComMngPopulationDO>().lambda().eq(ComMngPopulationDO::getActId, communityId));
        //查询该社区所有(实有房屋)小区
        List<ComMngVillageDO> villageDOList = comActVillageDAO.selectList(new QueryWrapper<ComMngVillageDO>().lambda().eq(ComMngVillageDO::getCommunityId, communityId));
//        List<ComMngVillageDO> villageDOList = comActVillageDAO.selectList(new QueryWrapper<ComMngVillageDO>().lambda().eq(ComMngVillageDO::getCommunityId, communityId));
        int index = 2;
        for (ComMngPopulationServeExcelVO vo : list) {
            //判断DB和exel数据重复判断
@@ -205,7 +205,9 @@
        ArrayList<ComMngPopulationDO> populationDOList = Lists.newArrayList();
        list.forEach(vo -> {
            ComMngPopulationDO comMngPopulationDO = new ComMngPopulationDO();
            ComMngVillageDO comMngVillageDO = villageDOList.stream().filter(village -> village.getAlley().equals(vo.getRoad()) && village.getHouseNum().equals(Integer.valueOf(vo.getDoorNo()))).findFirst().orElse(null);
            //查询街路巷是否存在
            ComMngVillageDO comMngVillageDO = comActVillageDAO.selectOne(new QueryWrapper<ComMngVillageDO>().eq("alley",vo.getRoad()).eq("house_num",vo.getDoorNo()).eq("community_id",communityId));
//            ComMngVillageDO comMngVillageDO = villageDOList.stream().filter(village -> village.getAlley().equals(vo.getRoad()) && village.getHouseNum().equals(Integer.valueOf(vo.getDoorNo()))).findFirst().orElse(null);
            BeanUtils.copyProperties(vo, comMngPopulationDO);
            if (comMngVillageDO == null) {
                throw new ServiceException("街道巷:" + vo.getRoad() + "不存在!");