huanghongfa
2021-04-23 90625c6c87f4be5f93cad0d5b1802b9df95add17
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java
@@ -204,7 +204,7 @@
            //判断DB和exel数据重复判断
            boolean result = comMngPopulationDOS.stream().anyMatch(population -> population.getCardNo().equals(vo.getCardNo()));
            if (result) {
                return R.fail("导入实有人口已存在(" + vo.getCardNo() + ")");
                return R.fail(501,"导入实有人口已存在(" + vo.getCardNo() + ")");
            }
            index++;
        }
@@ -217,7 +217,7 @@
//            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() + "不存在!");
                throw new ServiceException("查无:" + vo.getRoad() + "小区/房租地址,请先新建地址");
            }
            List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList());
            comMngPopulationDO.setVillageId(comMngVillageDO.getVillageId());