CeDo
2021-04-15 b714023894362053bca15f5295e307049ee9216e
Merge remote-tracking branch 'origin/master'
3个文件已修改
31 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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/ComMngVillageServiceImpl.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java
@@ -125,19 +125,19 @@
            "com_mng_population AS cmp " +
            "LEFT JOIN com_mng_village AS cmv ON cmv.village_id = cmp.village_id " +
            "<where>" +
            "<if test='comMngPopulationVO.name != null and comMngPopulationVO.name.trim() != &quot;&quot;'>" +
            "<if test='comMngPopulationVO.name != null and comMngPopulationVO.name != &quot;&quot;'>" +
            "AND cmp.`name` LIKE concat(#{comMngPopulationVO.name},'%') " +
            " </if> " +
            "<if test='comMngPopulationVO.road != null and comMngPopulationVO.road.trim() != &quot;&quot;'>" +
            "<if test='comMngPopulationVO.road != null and comMngPopulationVO.road != &quot;&quot;'>" +
            "AND cmp.road LIKE concat(#{comMngPopulationVO.road},'%') " +
            " </if> " +
            "<if test='comMngPopulationVO.doorNo != null and comMngPopulationVO.doorNo.trim() != &quot;&quot;'>" +
            "<if test='comMngPopulationVO.doorNo != null and comMngPopulationVO.doorNo != &quot;&quot;'>" +
            "AND cmp.door_no = #{comMngPopulationVO.doorNo} " +
            " </if> " +
            "<if test='comMngPopulationVO.alley != null and comMngPopulationVO.alley.trim() != &quot;&quot;'>" +
            "<if test='comMngPopulationVO.alley != null and comMngPopulationVO.alley != &quot;&quot;'>" +
            "AND cmv.alley LIKE concat(#{comMngPopulationVO.alley},'%') " +
            " </if> " +
            "<if test='comMngPopulationVO.sex != null and comMngPopulationVO.sex.trim() != &quot;&quot;'>" +
            "<if test='comMngPopulationVO.sex != null and comMngPopulationVO.sex != &quot;&quot;'>" +
            "AND cmp.sex = #{comMngPopulationVO.sex} " +
            " </if> " +
            "<if test='comMngPopulationVO.ageStart != null'>" +
@@ -146,19 +146,19 @@
            "<if test='comMngPopulationVO.ageEnd != null'>" +
            "AND cmp.age <![CDATA[ <= ]]> #{comMngPopulationVO.ageEnd} " +
            " </if> " +
            "<if test='comMngPopulationVO.nativePlace != null and comMngPopulationVO.nativePlace.trim() != &quot;&quot;'>" +
            "<if test='comMngPopulationVO.nativePlace != null and comMngPopulationVO.nativePlace != &quot;&quot;'>" +
            "AND cmp.native_place LIKE concat(#{comMngPopulationVO.nativePlace},'%') " +
            " </if> " +
            "<if test='comMngPopulationVO.nation != null and comMngPopulationVO.nation.trim() != &quot;&quot;'>" +
            "<if test='comMngPopulationVO.nation != null and comMngPopulationVO.nation != &quot;&quot;'>" +
            "AND cmp.nation = #{comMngPopulationVO.nation} " +
            " </if> " +
            "<if test='comMngPopulationVO.politicalOutlook != null and comMngPopulationVO.politicalOutlook.trim() != &quot;&quot;'>" +
            "<if test='comMngPopulationVO.politicalOutlook != null and comMngPopulationVO.politicalOutlook != &quot;&quot;'>" +
            "AND cmp.political_outlook = #{comMngPopulationVO.politicalOutlook} " +
            " </if> " +
            "<if test='comMngPopulationVO.cardNo != null and comMngPopulationVO.cardNo.trim() != &quot;&quot;'>" +
            "<if test='comMngPopulationVO.cardNo != null and comMngPopulationVO.cardNo != &quot;&quot;'>" +
            "AND cmp.card_no = #{comMngPopulationVO.cardNo} " +
            " </if> " +
            "<if test='comMngPopulationVO.remark != null and comMngPopulationVO.remark.trim() != &quot;&quot;'>" +
            "<if test='comMngPopulationVO.remark != null and comMngPopulationVO.remark != &quot;&quot;'>" +
            "AND cmp.remark = #{comMngPopulationVO.remark} " +
            " </if> " +
            " </where>" +
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() + "不存在!");
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngVillageServiceImpl.java
@@ -56,7 +56,7 @@
        }
        BeanUtils.copyProperties(comMngVillageVO, comMngVillageDO);
        ComActDO comActDO = comActDAO.selectById(comMngVillageDO.getCommunityId());
        if(comActDO==null){
        if (comActDO == null || comActDO.getStreetId() == null) {
            return R.fail("社区没有绑定街道,请绑定后操作!");
        }
        comMngVillageDO.setStreetId(comActDO.getStreetId());
@@ -143,6 +143,9 @@
            index++;
        }
        ComActDO comActDO = comActDAO.selectById(communityId);
        if(comActDO.getStreetId()==null||comActDO.getStreetId().toString().equals("")){
            return R.fail("请绑定街道,再操作!");
        }
        ArrayList<ComMngVillageDO> comMngVillageDOS = Lists.newArrayList();
        list.forEach(vo -> {
            ComMngVillageDO comMngVillageDO = new ComMngVillageDO();