101captain
2021-08-30 c36c5a9a1928df1e472a6b9ce12b789aeedc22e1
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java
@@ -550,7 +550,7 @@
        try {
            // 查询社区信息
            log.info("开始查询社区信息数据");
            ComPopulationActVO populationActVO = comActDAO.getPopulationActById(communityId);
            ComPopulationActVO populationActVO = comActDAO.getPopulationActById(31L);
            if (populationActVO == null) {
                log.error("未查询到社区信息");
                return R.fail("未查询到社区信息");
@@ -560,7 +560,7 @@
            // 查询当前社区标签列表
            List<String> labelList = new ArrayList<>();
            List<ComMngUserTagDO> comMngUserTagDOS = comMngUserTagDAO
                .selectList(new QueryWrapper<ComMngUserTagDO>().eq("sys_flag", 1).or().eq("community_id", communityId));
                .selectList(new QueryWrapper<ComMngUserTagDO>().eq("sys_flag", 1).or().eq("community_id", 31));
            if (!ObjectUtils.isEmpty(comMngUserTagDOS)) {
                labelList = comMngUserTagDOS.stream().map(comMngUserTagDO -> comMngUserTagDO.getTagName())
                    .collect(Collectors.toList());
@@ -632,7 +632,7 @@
                log.info("开始查询小区街路巷是否存在");
                // 查询小区街路巷是否存在
                ComMngVillageDO comMngVillageDO = null;
                String villageKey = communityId + vo.getRoad() + vo.getDoorNo();
                String villageKey = 31 + vo.getRoad() + vo.getDoorNo();
                if (!isOnly(villageKey, villageMap)) {
                    comMngVillageDO = (ComMngVillageDO)villageMap.get(villageKey);
                } else {
@@ -751,29 +751,29 @@
                        populationDO.setLabel(Joiner.on(",").join(userTag));
                        populationDO.setCreateBy(userId);
                        savePopulationCommunityList.add(cpopulationCommunityTagsDO);
                    }
                } else {
                    // 实有人口存在于当前社区,则更新
                    ComMngPopulationCommunityTagsDO comMngPopulationCommunityTagsDO =
                        (ComMngPopulationCommunityTagsDO)populationCommunityMap.get(populationCommunityKey);
                    List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0])
                        .collect(Collectors.toList());
                    // 如果导入数据标签中有当前社区标签列表中不包含的标签,则删除
                    Iterator<String> iterator = userTag.iterator();
                    while (iterator.hasNext()) {
                        String s = iterator.next();
                        if (!labelList.contains(s))
                            iterator.remove();
                    }
                    comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag));
                    comMngPopulationCommunityTagsDO.setUpdateBy(userId);
                    updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO);
                    }else {
                        // 实有人口存在于当前社区,则更新
                        ComMngPopulationCommunityTagsDO comMngPopulationCommunityTagsDO =
                                (ComMngPopulationCommunityTagsDO)populationCommunityMap.get(populationCommunityKey);
                        List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0])
                                .collect(Collectors.toList());
                        // 如果导入数据标签中有当前社区标签列表中不包含的标签,则删除
                        Iterator<String> iterator = userTag.iterator();
                        while (iterator.hasNext()) {
                            String s = iterator.next();
                            if (!labelList.contains(s))
                                iterator.remove();
                        }
                        comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag));
                        comMngPopulationCommunityTagsDO.setUpdateBy(userId);
                        updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO);
                    ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO();
                    BeanUtils.copyProperties(vo, mistake);
                    setMistake(mistake, vo);
                    mistake.setMistake("该实有人口已存在于该社区,执行更新");
                    mistakes.add(mistake);
                        ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO();
                        BeanUtils.copyProperties(vo, mistake);
                        setMistake(mistake, vo);
                        mistake.setMistake("该实有人口已存在于该社区,执行更新");
                        mistakes.add(mistake);
                    }
                }
                log.info("查询实有人口存在社区信息完成");
            }
@@ -811,7 +811,7 @@
        }
        if (!updatePopulationCommunityList.isEmpty()) {
            log.info("执行数据库更新人口社区关系");
            comMngPopulationCommunityTagsService.updateBatchById(updatePopulationCommunityList);
            comMngPopulationCommunityTagsDAO.updateAll(updatePopulationCommunityList);
            log.info("数据库更新人口社区关系完成");
        }
        log.info("执行数据库导入完成");
@@ -1046,29 +1046,29 @@
                        populationDO.setLabel(Joiner.on(",").join(userTag));
                        populationDO.setCreateBy(userId);
                        savePopulationCommunityList.add(cpopulationCommunityTagsDO);
                    }
                } else {
                    // 实有人口存在于当前社区,则更新
                    ComMngPopulationCommunityTagsDO comMngPopulationCommunityTagsDO =
                        (ComMngPopulationCommunityTagsDO)populationCommunityMap.get(populationCommunityKey);
                    List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0])
                        .collect(Collectors.toList());
                    // 如果导入数据标签中有当前社区标签列表中不包含的标签,则删除
                    Iterator<String> iterator = userTag.iterator();
                    while (iterator.hasNext()) {
                        String s = iterator.next();
                        if (!labelList.contains(s))
                            iterator.remove();
                    }
                    comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag));
                    comMngPopulationCommunityTagsDO.setUpdateBy(userId);
                    updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO);
                    }else {
                        // 实有人口存在于当前社区,则更新
                        ComMngPopulationCommunityTagsDO comMngPopulationCommunityTagsDO =
                                (ComMngPopulationCommunityTagsDO)populationCommunityMap.get(populationCommunityKey);
                        List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0])
                                .collect(Collectors.toList());
                        // 如果导入数据标签中有当前社区标签列表中不包含的标签,则删除
                        Iterator<String> iterator = userTag.iterator();
                        while (iterator.hasNext()) {
                            String s = iterator.next();
                            if (!labelList.contains(s))
                                iterator.remove();
                        }
                        comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag));
                        comMngPopulationCommunityTagsDO.setUpdateBy(userId);
                        updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO);
                    ComMngPopulationDrugMistakeExcelVO mistake = new ComMngPopulationDrugMistakeExcelVO();
                    BeanUtils.copyProperties(vo, mistake);
                    setDrugMistake(mistake, vo);
                    mistake.setMistake("该实有人口已存在于该社区,执行更新");
                    mistakes.add(mistake);
                        ComMngPopulationDrugMistakeExcelVO mistake = new ComMngPopulationDrugMistakeExcelVO();
                        BeanUtils.copyProperties(vo, mistake);
                        setDrugMistake(mistake, vo);
                        mistake.setMistake("该实有人口已存在于该社区,执行更新");
                        mistakes.add(mistake);
                    }
                }
                log.info("查询实有人口存在社区信息完成");
            }
@@ -1106,7 +1106,7 @@
        }
        if (!updatePopulationCommunityList.isEmpty()) {
            log.info("执行数据库更新人口社区关系");
            comMngPopulationCommunityTagsService.updateBatchById(updatePopulationCommunityList);
            comMngPopulationCommunityTagsDAO.updateAll(updatePopulationCommunityList);
            log.info("数据库更新人口社区关系完成");
        }
        log.info("执行数据库导入完成");
@@ -1341,29 +1341,29 @@
                        populationDO.setLabel(Joiner.on(",").join(userTag));
                        populationDO.setCreateBy(userId);
                        savePopulationCommunityList.add(cpopulationCommunityTagsDO);
                    }
                } else {
                    // 实有人口存在于当前社区,则更新
                    ComMngPopulationCommunityTagsDO comMngPopulationCommunityTagsDO =
                        (ComMngPopulationCommunityTagsDO)populationCommunityMap.get(populationCommunityKey);
                    List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0])
                        .collect(Collectors.toList());
                    // 如果导入数据标签中有当前社区标签列表中不包含的标签,则删除
                    Iterator<String> iterator = userTag.iterator();
                    while (iterator.hasNext()) {
                        String s = iterator.next();
                        if (!labelList.contains(s))
                            iterator.remove();
                    }
                    comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag));
                    comMngPopulationCommunityTagsDO.setUpdateBy(userId);
                    updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO);
                    }else {
                        // 实有人口存在于当前社区,则更新
                        ComMngPopulationCommunityTagsDO comMngPopulationCommunityTagsDO =
                                (ComMngPopulationCommunityTagsDO)populationCommunityMap.get(populationCommunityKey);
                        List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0])
                                .collect(Collectors.toList());
                        // 如果导入数据标签中有当前社区标签列表中不包含的标签,则删除
                        Iterator<String> iterator = userTag.iterator();
                        while (iterator.hasNext()) {
                            String s = iterator.next();
                            if (!labelList.contains(s))
                                iterator.remove();
                        }
                        comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag));
                        comMngPopulationCommunityTagsDO.setUpdateBy(userId);
                        updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO);
                    ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO();
                    BeanUtils.copyProperties(vo, mistake);
                    setCorrectMistake(mistake, vo);
                    mistake.setMistake("该实有人口已存在于该社区,执行更新");
                    mistakes.add(mistake);
                        ComMngPopulationCorrectMistakeExcelVO mistake = new ComMngPopulationCorrectMistakeExcelVO();
                        BeanUtils.copyProperties(vo, mistake);
                        setCorrectMistake(mistake, vo);
                        mistake.setMistake("该实有人口已存在于该社区,执行更新");
                        mistakes.add(mistake);
                    }
                }
                log.info("查询实有人口存在社区信息完成");
            }
@@ -1401,7 +1401,7 @@
        }
        if (!updatePopulationCommunityList.isEmpty()) {
            log.info("执行数据库更新人口社区关系");
            comMngPopulationCommunityTagsService.updateBatchById(updatePopulationCommunityList);
            comMngPopulationCommunityTagsDAO.updateAll(updatePopulationCommunityList);
            log.info("数据库更新人口社区关系完成");
        }
        log.info("执行数据库导入完成");
@@ -1636,29 +1636,29 @@
                        populationDO.setLabel(Joiner.on(",").join(userTag));
                        populationDO.setCreateBy(userId);
                        savePopulationCommunityList.add(cpopulationCommunityTagsDO);
                    }
                } else {
                    // 实有人口存在于当前社区,则更新
                    ComMngPopulationCommunityTagsDO comMngPopulationCommunityTagsDO =
                        (ComMngPopulationCommunityTagsDO)populationCommunityMap.get(populationCommunityKey);
                    List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0])
                        .collect(Collectors.toList());
                    // 如果导入数据标签中有当前社区标签列表中不包含的标签,则删除
                    Iterator<String> iterator = userTag.iterator();
                    while (iterator.hasNext()) {
                        String s = iterator.next();
                        if (!labelList.contains(s))
                            iterator.remove();
                    }
                    comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag));
                    comMngPopulationCommunityTagsDO.setUpdateBy(userId);
                    updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO);
                    }else {
                        // 实有人口存在于当前社区,则更新
                        ComMngPopulationCommunityTagsDO comMngPopulationCommunityTagsDO =
                                (ComMngPopulationCommunityTagsDO)populationCommunityMap.get(populationCommunityKey);
                        List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0])
                                .collect(Collectors.toList());
                        // 如果导入数据标签中有当前社区标签列表中不包含的标签,则删除
                        Iterator<String> iterator = userTag.iterator();
                        while (iterator.hasNext()) {
                            String s = iterator.next();
                            if (!labelList.contains(s))
                                iterator.remove();
                        }
                        comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag));
                        comMngPopulationCommunityTagsDO.setUpdateBy(userId);
                        updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO);
                    ComMngPopulationMajorMistakeExcelVO mistake = new ComMngPopulationMajorMistakeExcelVO();
                    BeanUtils.copyProperties(vo, mistake);
                    setMajorMistake(mistake, vo);
                    mistake.setMistake("该实有人口已存在于该社区,执行更新");
                    mistakes.add(mistake);
                        ComMngPopulationMajorMistakeExcelVO mistake = new ComMngPopulationMajorMistakeExcelVO();
                        BeanUtils.copyProperties(vo, mistake);
                        setMajorMistake(mistake, vo);
                        mistake.setMistake("该实有人口已存在于该社区,执行更新");
                        mistakes.add(mistake);
                    }
                }
                log.info("查询实有人口存在社区信息完成");
            }
@@ -1696,7 +1696,7 @@
        }
        if (!updatePopulationCommunityList.isEmpty()) {
            log.info("执行数据库更新人口社区关系");
            comMngPopulationCommunityTagsService.updateBatchById(updatePopulationCommunityList);
            comMngPopulationCommunityTagsDAO.updateAll(updatePopulationCommunityList);
            log.info("数据库更新人口社区关系完成");
        }
        log.info("执行数据库导入完成");
@@ -1931,29 +1931,29 @@
                        populationDO.setLabel(Joiner.on(",").join(userTag));
                        populationDO.setCreateBy(userId);
                        savePopulationCommunityList.add(cpopulationCommunityTagsDO);
                    }
                } else {
                    // 实有人口存在于当前社区,则更新
                    ComMngPopulationCommunityTagsDO comMngPopulationCommunityTagsDO =
                        (ComMngPopulationCommunityTagsDO)populationCommunityMap.get(populationCommunityKey);
                    List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0])
                        .collect(Collectors.toList());
                    // 如果导入数据标签中有当前社区标签列表中不包含的标签,则删除
                    Iterator<String> iterator = userTag.iterator();
                    while (iterator.hasNext()) {
                        String s = iterator.next();
                        if (!labelList.contains(s))
                            iterator.remove();
                    }
                    comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag));
                    comMngPopulationCommunityTagsDO.setUpdateBy(userId);
                    updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO);
                    } else {
                        // 实有人口存在于当前社区,则更新
                        ComMngPopulationCommunityTagsDO comMngPopulationCommunityTagsDO =
                                (ComMngPopulationCommunityTagsDO)populationCommunityMap.get(populationCommunityKey);
                        List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0])
                                .collect(Collectors.toList());
                        // 如果导入数据标签中有当前社区标签列表中不包含的标签,则删除
                        Iterator<String> iterator = userTag.iterator();
                        while (iterator.hasNext()) {
                            String s = iterator.next();
                            if (!labelList.contains(s))
                                iterator.remove();
                        }
                        comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag));
                        comMngPopulationCommunityTagsDO.setUpdateBy(userId);
                        updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO);
                    ComMngPopulationCultMistakeExcelVO mistake = new ComMngPopulationCultMistakeExcelVO();
                    BeanUtils.copyProperties(vo, mistake);
                    setCultMistake(mistake, vo);
                    mistake.setMistake("该实有人口已存在于该社区,执行更新");
                    mistakes.add(mistake);
                        ComMngPopulationCultMistakeExcelVO mistake = new ComMngPopulationCultMistakeExcelVO();
                        BeanUtils.copyProperties(vo, mistake);
                        setCultMistake(mistake, vo);
                        mistake.setMistake("该实有人口已存在于该社区,执行更新");
                        mistakes.add(mistake);
                    }
                }
                log.info("查询实有人口存在社区信息完成");
            }
@@ -1991,7 +1991,7 @@
        }
        if (!updatePopulationCommunityList.isEmpty()) {
            log.info("执行数据库更新人口社区关系");
            comMngPopulationCommunityTagsService.updateBatchById(updatePopulationCommunityList);
            comMngPopulationCommunityTagsDAO.updateAll(updatePopulationCommunityList);
            log.info("数据库更新人口社区关系完成");
        }
        log.info("执行数据库导入完成");
@@ -2228,30 +2228,30 @@
                        populationDO.setLabel(Joiner.on(",").join(userTag));
                        populationDO.setCreateBy(userId);
                        savePopulationCommunityList.add(cpopulationCommunityTagsDO);
                    }
                } else {
                    // 实有人口存在于当前社区,则更新
                    ComMngPopulationCommunityTagsDO comMngPopulationCommunityTagsDO =
                        (ComMngPopulationCommunityTagsDO)populationCommunityMap.get(populationCommunityKey);
                    List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0])
                        .collect(Collectors.toList());
                    // 如果导入数据标签中有当前社区标签列表中不包含的标签,则删除
                    Iterator<String> iterator = userTag.iterator();
                    while (iterator.hasNext()) {
                        String s = iterator.next();
                        if (!labelList.contains(s))
                            iterator.remove();
                    }
                    comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag));
                    comMngPopulationCommunityTagsDO.setUpdateBy(userId);
                    updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO);
                    }else {
                        // 实有人口存在于当前社区,则更新
                        ComMngPopulationCommunityTagsDO comMngPopulationCommunityTagsDO =
                                (ComMngPopulationCommunityTagsDO)populationCommunityMap.get(populationCommunityKey);
                        List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0])
                                .collect(Collectors.toList());
                        // 如果导入数据标签中有当前社区标签列表中不包含的标签,则删除
                        Iterator<String> iterator = userTag.iterator();
                        while (iterator.hasNext()) {
                            String s = iterator.next();
                            if (!labelList.contains(s))
                                iterator.remove();
                        }
                        comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag));
                        comMngPopulationCommunityTagsDO.setUpdateBy(userId);
                        updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO);
                    ComMngPopulationRehabilitationMistakeExcelVO mistake =
                        new ComMngPopulationRehabilitationMistakeExcelVO();
                    BeanUtils.copyProperties(vo, mistake);
                    setRehabilitationMistake(mistake, vo);
                    mistake.setMistake("该实有人口已存在于该社区,执行更新");
                    mistakes.add(mistake);
                        ComMngPopulationRehabilitationMistakeExcelVO mistake =
                                new ComMngPopulationRehabilitationMistakeExcelVO();
                        BeanUtils.copyProperties(vo, mistake);
                        setRehabilitationMistake(mistake, vo);
                        mistake.setMistake("该实有人口已存在于该社区,执行更新");
                        mistakes.add(mistake);
                    }
                }
                log.info("查询实有人口存在社区信息完成");
            }
@@ -2289,7 +2289,7 @@
        }
        if (!updatePopulationCommunityList.isEmpty()) {
            log.info("执行数据库更新人口社区关系");
            comMngPopulationCommunityTagsService.updateBatchById(updatePopulationCommunityList);
            comMngPopulationCommunityTagsDAO.updateAll(updatePopulationCommunityList);
            log.info("数据库更新人口社区关系完成");
        }
        log.info("执行数据库导入完成");
@@ -2524,29 +2524,29 @@
                        populationDO.setLabel(Joiner.on(",").join(userTag));
                        populationDO.setCreateBy(userId);
                        savePopulationCommunityList.add(cpopulationCommunityTagsDO);
                    }
                } else {
                    // 实有人口存在于当前社区,则更新
                    ComMngPopulationCommunityTagsDO comMngPopulationCommunityTagsDO =
                        (ComMngPopulationCommunityTagsDO)populationCommunityMap.get(populationCommunityKey);
                    List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0])
                        .collect(Collectors.toList());
                    // 如果导入数据标签中有当前社区标签列表中不包含的标签,则删除
                    Iterator<String> iterator = userTag.iterator();
                    while (iterator.hasNext()) {
                        String s = iterator.next();
                        if (!labelList.contains(s))
                            iterator.remove();
                    }
                    comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag));
                    comMngPopulationCommunityTagsDO.setUpdateBy(userId);
                    updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO);
                    }else {
                        // 实有人口存在于当前社区,则更新
                        ComMngPopulationCommunityTagsDO comMngPopulationCommunityTagsDO =
                                (ComMngPopulationCommunityTagsDO)populationCommunityMap.get(populationCommunityKey);
                        List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0])
                                .collect(Collectors.toList());
                        // 如果导入数据标签中有当前社区标签列表中不包含的标签,则删除
                        Iterator<String> iterator = userTag.iterator();
                        while (iterator.hasNext()) {
                            String s = iterator.next();
                            if (!labelList.contains(s))
                                iterator.remove();
                        }
                        comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag));
                        comMngPopulationCommunityTagsDO.setUpdateBy(userId);
                        updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO);
                    ComMngPopulationKeyMistakeExcelVO mistake = new ComMngPopulationKeyMistakeExcelVO();
                    BeanUtils.copyProperties(vo, mistake);
                    setKeyMistake(mistake, vo);
                    mistake.setMistake("该实有人口已存在于该社区,执行更新");
                    mistakes.add(mistake);
                        ComMngPopulationKeyMistakeExcelVO mistake = new ComMngPopulationKeyMistakeExcelVO();
                        BeanUtils.copyProperties(vo, mistake);
                        setKeyMistake(mistake, vo);
                        mistake.setMistake("该实有人口已存在于该社区,执行更新");
                        mistakes.add(mistake);
                    }
                }
                log.info("查询实有人口存在社区信息完成");
            }
@@ -2584,7 +2584,7 @@
        }
        if (!updatePopulationCommunityList.isEmpty()) {
            log.info("执行数据库更新人口社区关系");
            comMngPopulationCommunityTagsService.updateBatchById(updatePopulationCommunityList);
            comMngPopulationCommunityTagsDAO.updateAll(updatePopulationCommunityList);
            log.info("数据库更新人口社区关系完成");
        }
        log.info("执行数据库导入完成");
@@ -2819,29 +2819,29 @@
                        populationDO.setLabel(Joiner.on(",").join(userTag));
                        populationDO.setCreateBy(userId);
                        savePopulationCommunityList.add(cpopulationCommunityTagsDO);
                    }
                } else {
                    // 实有人口存在于当前社区,则更新
                    ComMngPopulationCommunityTagsDO comMngPopulationCommunityTagsDO =
                        (ComMngPopulationCommunityTagsDO)populationCommunityMap.get(populationCommunityKey);
                    List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0])
                        .collect(Collectors.toList());
                    // 如果导入数据标签中有当前社区标签列表中不包含的标签,则删除
                    Iterator<String> iterator = userTag.iterator();
                    while (iterator.hasNext()) {
                        String s = iterator.next();
                        if (!labelList.contains(s))
                            iterator.remove();
                    }
                    comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag));
                    comMngPopulationCommunityTagsDO.setUpdateBy(userId);
                    updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO);
                    } else {
                        // 实有人口存在于当前社区,则更新
                        ComMngPopulationCommunityTagsDO comMngPopulationCommunityTagsDO =
                                (ComMngPopulationCommunityTagsDO)populationCommunityMap.get(populationCommunityKey);
                        List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0])
                                .collect(Collectors.toList());
                        // 如果导入数据标签中有当前社区标签列表中不包含的标签,则删除
                        Iterator<String> iterator = userTag.iterator();
                        while (iterator.hasNext()) {
                            String s = iterator.next();
                            if (!labelList.contains(s))
                                iterator.remove();
                        }
                        comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag));
                        comMngPopulationCommunityTagsDO.setUpdateBy(userId);
                        updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO);
                    ComMngPopulationSentenceMistakeExcelVO mistake = new ComMngPopulationSentenceMistakeExcelVO();
                    BeanUtils.copyProperties(vo, mistake);
                    setSentenceMistake(mistake, vo);
                    mistake.setMistake("该实有人口已存在于该社区,执行更新");
                    mistakes.add(mistake);
                        ComMngPopulationSentenceMistakeExcelVO mistake = new ComMngPopulationSentenceMistakeExcelVO();
                        BeanUtils.copyProperties(vo, mistake);
                        setSentenceMistake(mistake, vo);
                        mistake.setMistake("该实有人口已存在于该社区,执行更新");
                        mistakes.add(mistake);
                    }
                }
                log.info("查询实有人口存在社区信息完成");
            }
@@ -2879,7 +2879,7 @@
        }
        if (!updatePopulationCommunityList.isEmpty()) {
            log.info("执行数据库更新人口社区关系");
            comMngPopulationCommunityTagsService.updateBatchById(updatePopulationCommunityList);
            comMngPopulationCommunityTagsDAO.updateAll(updatePopulationCommunityList);
            log.info("数据库更新人口社区关系完成");
        }
        log.info("执行数据库导入完成");
@@ -3114,29 +3114,29 @@
                        populationDO.setLabel(Joiner.on(",").join(userTag));
                        populationDO.setCreateBy(userId);
                        savePopulationCommunityList.add(cpopulationCommunityTagsDO);
                    }
                } else {
                    // 实有人口存在于当前社区,则更新
                    ComMngPopulationCommunityTagsDO comMngPopulationCommunityTagsDO =
                        (ComMngPopulationCommunityTagsDO)populationCommunityMap.get(populationCommunityKey);
                    List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0])
                        .collect(Collectors.toList());
                    // 如果导入数据标签中有当前社区标签列表中不包含的标签,则删除
                    Iterator<String> iterator = userTag.iterator();
                    while (iterator.hasNext()) {
                        String s = iterator.next();
                        if (!labelList.contains(s))
                            iterator.remove();
                    }
                    comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag));
                    comMngPopulationCommunityTagsDO.setUpdateBy(userId);
                    updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO);
                    }else {
                        // 实有人口存在于当前社区,则更新
                        ComMngPopulationCommunityTagsDO comMngPopulationCommunityTagsDO =
                                (ComMngPopulationCommunityTagsDO)populationCommunityMap.get(populationCommunityKey);
                        List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0])
                                .collect(Collectors.toList());
                        // 如果导入数据标签中有当前社区标签列表中不包含的标签,则删除
                        Iterator<String> iterator = userTag.iterator();
                        while (iterator.hasNext()) {
                            String s = iterator.next();
                            if (!labelList.contains(s))
                                iterator.remove();
                        }
                        comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag));
                        comMngPopulationCommunityTagsDO.setUpdateBy(userId);
                        updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO);
                    ComMngPopulationVeteransMistakeExcelVO mistake = new ComMngPopulationVeteransMistakeExcelVO();
                    BeanUtils.copyProperties(vo, mistake);
                    setVeteransMistake(mistake, vo);
                    mistake.setMistake("该实有人口已存在于该社区,执行更新");
                    mistakes.add(mistake);
                        ComMngPopulationVeteransMistakeExcelVO mistake = new ComMngPopulationVeteransMistakeExcelVO();
                        BeanUtils.copyProperties(vo, mistake);
                        setVeteransMistake(mistake, vo);
                        mistake.setMistake("该实有人口已存在于该社区,执行更新");
                        mistakes.add(mistake);
                    }
                }
                log.info("查询实有人口存在社区信息完成");
            }
@@ -3174,7 +3174,7 @@
        }
        if (!updatePopulationCommunityList.isEmpty()) {
            log.info("执行数据库更新人口社区关系");
            comMngPopulationCommunityTagsService.updateBatchById(updatePopulationCommunityList);
            comMngPopulationCommunityTagsDAO.updateAll(updatePopulationCommunityList);
            log.info("数据库更新人口社区关系完成");
        }
        log.info("执行数据库导入完成");
@@ -3409,29 +3409,29 @@
                        populationDO.setLabel(Joiner.on(",").join(userTag));
                        populationDO.setCreateBy(userId);
                        savePopulationCommunityList.add(cpopulationCommunityTagsDO);
                    }
                } else {
                    // 实有人口存在于当前社区,则更新
                    ComMngPopulationCommunityTagsDO comMngPopulationCommunityTagsDO =
                        (ComMngPopulationCommunityTagsDO)populationCommunityMap.get(populationCommunityKey);
                    List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0])
                        .collect(Collectors.toList());
                    // 如果导入数据标签中有当前社区标签列表中不包含的标签,则删除
                    Iterator<String> iterator = userTag.iterator();
                    while (iterator.hasNext()) {
                        String s = iterator.next();
                        if (!labelList.contains(s))
                            iterator.remove();
                    }
                    comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag));
                    comMngPopulationCommunityTagsDO.setUpdateBy(userId);
                    updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO);
                    } else {
                        // 实有人口存在于当前社区,则更新
                        ComMngPopulationCommunityTagsDO comMngPopulationCommunityTagsDO =
                                (ComMngPopulationCommunityTagsDO)populationCommunityMap.get(populationCommunityKey);
                        List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0])
                                .collect(Collectors.toList());
                        // 如果导入数据标签中有当前社区标签列表中不包含的标签,则删除
                        Iterator<String> iterator = userTag.iterator();
                        while (iterator.hasNext()) {
                            String s = iterator.next();
                            if (!labelList.contains(s))
                                iterator.remove();
                        }
                        comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag));
                        comMngPopulationCommunityTagsDO.setUpdateBy(userId);
                        updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO);
                    ComMngPopulationDisabilityMistakeExcelVO mistake = new ComMngPopulationDisabilityMistakeExcelVO();
                    BeanUtils.copyProperties(vo, mistake);
                    setDisabilityMistake(mistake, vo);
                    mistake.setMistake("该实有人口已存在于该社区,执行更新");
                    mistakes.add(mistake);
                        ComMngPopulationDisabilityMistakeExcelVO mistake = new ComMngPopulationDisabilityMistakeExcelVO();
                        BeanUtils.copyProperties(vo, mistake);
                        setDisabilityMistake(mistake, vo);
                        mistake.setMistake("该实有人口已存在于该社区,执行更新");
                        mistakes.add(mistake);
                    }
                }
                log.info("查询实有人口存在社区信息完成");
            }
@@ -3469,7 +3469,7 @@
        }
        if (!updatePopulationCommunityList.isEmpty()) {
            log.info("执行数据库更新人口社区关系");
            comMngPopulationCommunityTagsService.updateBatchById(updatePopulationCommunityList);
            comMngPopulationCommunityTagsDAO.updateAll(updatePopulationCommunityList);
            log.info("数据库更新人口社区关系完成");
        }
        log.info("执行数据库导入完成");
@@ -3709,29 +3709,29 @@
                        populationDO.setLabel(Joiner.on(",").join(userTag));
                        populationDO.setCreateBy(userId);
                        savePopulationCommunityList.add(cpopulationCommunityTagsDO);
                    }
                } else {
                    // 实有人口存在于当前社区,则更新
                    ComMngPopulationCommunityTagsDO comMngPopulationCommunityTagsDO =
                        (ComMngPopulationCommunityTagsDO)populationCommunityMap.get(populationCommunityKey);
                    List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0])
                        .collect(Collectors.toList());
                    // 如果导入数据标签中有当前社区标签列表中不包含的标签,则删除
                    Iterator<String> iterator = userTag.iterator();
                    while (iterator.hasNext()) {
                        String s = iterator.next();
                        if (!labelList.contains(s))
                            iterator.remove();
                    }
                    comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag));
                    comMngPopulationCommunityTagsDO.setUpdateBy(userId);
                    updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO);
                    } else {
                        // 实有人口存在于当前社区,则更新
                        ComMngPopulationCommunityTagsDO comMngPopulationCommunityTagsDO =
                                (ComMngPopulationCommunityTagsDO)populationCommunityMap.get(populationCommunityKey);
                        List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0])
                                .collect(Collectors.toList());
                        // 如果导入数据标签中有当前社区标签列表中不包含的标签,则删除
                        Iterator<String> iterator = userTag.iterator();
                        while (iterator.hasNext()) {
                            String s = iterator.next();
                            if (!labelList.contains(s))
                                iterator.remove();
                        }
                        comMngPopulationCommunityTagsDO.setLabel(Joiner.on(",").join(userTag));
                        comMngPopulationCommunityTagsDO.setUpdateBy(userId);
                        updatePopulationCommunityList.add(comMngPopulationCommunityTagsDO);
                    ComMngPopulationLowSecurityMistakeExcelVO mistake = new ComMngPopulationLowSecurityMistakeExcelVO();
                    BeanUtils.copyProperties(vo, mistake);
                    setLowSecurityMistake(mistake, vo);
                    mistake.setMistake("该实有人口已存在于该社区,执行更新");
                    mistakes.add(mistake);
                        ComMngPopulationLowSecurityMistakeExcelVO mistake = new ComMngPopulationLowSecurityMistakeExcelVO();
                        BeanUtils.copyProperties(vo, mistake);
                        setLowSecurityMistake(mistake, vo);
                        mistake.setMistake("该实有人口已存在于该社区,执行更新");
                        mistakes.add(mistake);
                    }
                }
                log.info("查询实有人口存在社区信息完成");
            }
@@ -3769,7 +3769,7 @@
        }
        if (!updatePopulationCommunityList.isEmpty()) {
            log.info("执行数据库更新人口社区关系");
            comMngPopulationCommunityTagsService.updateBatchById(updatePopulationCommunityList);
            comMngPopulationCommunityTagsDAO.updateAll(updatePopulationCommunityList);
            log.info("数据库更新人口社区关系完成");
        }
        log.info("执行数据库导入完成");
@@ -5786,7 +5786,7 @@
            userTagList.forEach(userTag -> {
                if (userTag != null) {
                    if (userTag.getSysFlag().equals(0)) {
                        Integer count = comMngPopulationDAO.getSpecialStatisticsByLabel(userTag.getTagName());
                        Integer count = comMngPopulationDAO.getSpecialStatisticsByLabel(userTag.getTagName(),communityId);
                        otherSpecialVO.setSum(otherSpecialVO.getSum() + count);
                    } else {
                        if (StringUtils.isNotEmpty(userTag.getTagName())) {
@@ -5818,7 +5818,7 @@
                            } else {
                                IndexSpecialStatisticsVO specialStatisticsVO = new IndexSpecialStatisticsVO();
                                specialStatisticsVO.setTitle(userTag.getTagName());
                                Integer count = comMngPopulationDAO.getSpecialStatisticsByLabel(userTag.getTagName());
                                Integer count = comMngPopulationDAO.getSpecialStatisticsByLabel(userTag.getTagName(),communityId);
                                specialStatisticsVO.setSum(count);
                                specialStatisticsVOList.add(specialStatisticsVO);
                            }
@@ -5999,7 +5999,7 @@
            userTagList.forEach(userTag -> {
                if (userTag != null) {
                    if (userTag.getSysFlag().equals(0)) {
                        Integer count = comMngPopulationDAO.getSpecialStatisticsByLabel(userTag.getTagName());
                        Integer count = comMngPopulationDAO.getSpecialStatisticsByLabel(userTag.getTagName(),communityId);
                        otherSpecialVO.setSum(otherSpecialVO.getSum() + count);
                    } else {
                        if (StringUtils.isNotEmpty(userTag.getTagName())) {
@@ -6031,7 +6031,7 @@
                            } else {
                                IndexSpecialStatisticsVO specialStatisticsVO = new IndexSpecialStatisticsVO();
                                specialStatisticsVO.setTitle(userTag.getTagName());
                                Integer count = comMngPopulationDAO.getSpecialStatisticsByLabel(userTag.getTagName());
                                Integer count = comMngPopulationDAO.getSpecialStatisticsByLabel(userTag.getTagName(),communityId);
                                specialStatisticsVO.setSum(count);
                                specialStatisticsVOList.add(specialStatisticsVO);
                            }
@@ -6099,7 +6099,7 @@
            userTagList.forEach(userTag -> {
                if (userTag != null) {
                    if (userTag.getSysFlag().equals(0)) {
                        Integer count = comMngPopulationDAO.getSpecialStatisticsByLabel(userTag.getTagName());
                        Integer count = comMngPopulationDAO.getSpecialStatisticsByLabel(userTag.getTagName(),communityId);
                        otherSpecialVO.setSum(otherSpecialVO.getSum() + count);
                    } else {
                        if (StringUtils.isNotEmpty(userTag.getTagName())) {
@@ -6131,7 +6131,7 @@
                            } else {
                                IndexSpecialStatisticsVO specialStatisticsVO = new IndexSpecialStatisticsVO();
                                specialStatisticsVO.setTitle(userTag.getTagName());
                                Integer count = comMngPopulationDAO.getSpecialStatisticsByLabel(userTag.getTagName());
                                Integer count = comMngPopulationDAO.getSpecialStatisticsByLabel(userTag.getTagName(),communityId);
                                specialStatisticsVO.setSum(count);
                                specialStatisticsVOList.add(specialStatisticsVO);
                            }
@@ -6624,11 +6624,6 @@
            new Page(villagePopulationDTO.getPageNum(), villagePopulationDTO.getPageSize()), villagePopulationDTO));
    }
    @Override
    public void addPopuCommunity() {
    }
    private void setMistake(ComMngPopulationMistakeExcelVO mvo, ComMngPopulationServeExcelVO vo) {
        mvo.setPoliticalOutlook(PopulPoliticalOutlookEnum.getCnDescByName(vo.getPoliticalOutlook()));
        mvo.setIsRent(PopulHouseUseEnum.getCnDescByName(vo.getIsRent()));
@@ -6666,7 +6661,7 @@
        mvo.setHouseStatus(PopulHouseStatusEnum.getCnDescByName(vo.getHouseStatus()));
        mvo.setHousePurpose(PopulHousePurposeEnum.getCnDescByName(vo.getHousePurpose()));
        mvo.setControlStatus(PopulHouseControlStatusEnum.getCnDescByName(vo.getControlStatus()));
        mvo.setCultureLevel(PopulCultureLevelEnum.getCnDescByName(vo.getCultureLevel()));
//        mvo.setCultureLevel(PopulCultureLevelEnum.getCnDescByName(vo.getCultureLevel()));
        // mvo.setMarriage(PopulMarriageEnum.getCnDescByName(vo.getMarriage()));
        mvo.setOutOrLocal(PopulOutOrLocalEnum.getCnDescByName(vo.getOutOrLocal()));
        mvo.setIsCorrectGroup(PopulHouseUseEnum.getCnDescByName(vo.getIsCorrectGroup()));
@@ -6682,7 +6677,7 @@
    private void setMajorMistake(ComMngPopulationMajorMistakeExcelVO mvo, ComMngPopulationMajorExcelVO vo) {
        // mvo.setPoliticalOutlook(PopulPoliticalOutlookEnum.getCnDescByName(vo.getPoliticalOutlook()));
        mvo.setIsRent(PopulHouseUseEnum.getCnDescByName(vo.getIsRent()));
        mvo.setCustodyRelation(PopulRelationEnum.getCnDescByName(vo.getCustodyRelation()));
//        mvo.setCustodyRelation(PopulRelationEnum.getCnDescByName(vo.getCustodyRelation()));
        // mvo.setRelation(PopulRelationEnum.getCnDescByName(vo.getRelation()));
        mvo.setHouseStatus(PopulHouseStatusEnum.getCnDescByName(vo.getHouseStatus()));
        mvo.setHousePurpose(PopulHousePurposeEnum.getCnDescByName(vo.getHousePurpose()));
@@ -6716,7 +6711,7 @@
        ComMngPopulationRehabilitationExcelVO vo) {
        // mvo.setPoliticalOutlook(PopulPoliticalOutlookEnum.getCnDescByName(vo.getPoliticalOutlook()));
        mvo.setIsRent(PopulHouseUseEnum.getCnDescByName(vo.getIsRent()));
        mvo.setPatientRelation(PopulRelationEnum.getCnDescByName(vo.getPatientRelation()));
//        mvo.setPatientRelation(PopulRelationEnum.getCnDescByName(vo.getPatientRelation()));
        mvo.setHouseStatus(PopulHouseStatusEnum.getCnDescByName(vo.getHouseStatus()));
        mvo.setHousePurpose(PopulHousePurposeEnum.getCnDescByName(vo.getHousePurpose()));
        mvo.setControlStatus(PopulHouseControlStatusEnum.getCnDescByName(vo.getControlStatus()));
@@ -6764,7 +6759,7 @@
    }
    private void setVeteransMistake(ComMngPopulationVeteransMistakeExcelVO mvo, ComMngPopulationVeteransExcelVO vo) {
        mvo.setRegiterNature(PopulRegiterNatureEnum.getCnDescByName(vo.getRegiterNature()));
//        mvo.setRegiterNature(PopulRegiterNatureEnum.getCnDescByName(vo.getRegiterNature()));
        mvo.setPoliticalOutlook(PopulPoliticalOutlookEnum.getCnDescByName(vo.getPoliticalOutlook()));
        mvo.setIsRent(PopulHouseUseEnum.getCnDescByName(vo.getIsRent()));
        // mvo.setPatientRelation(PopulRelationEnum.getCnDescByName(vo.getPatientRelation()));