huanghongfa
2021-09-06 117b432ab279a1e198de63412919bb9a1c011fcf
Merge remote-tracking branch 'origin/test' into test
4个文件已修改
106 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActWorkGuideVO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActWorkGuideDAO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActWorkGuideServiceImpl.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java 87 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActWorkGuideVO.java
@@ -36,6 +36,9 @@
    @ApiModelProperty("所属分类")
    private Integer classify;
    @ApiModelProperty("所属分类名称")
    private String classifyName;
    @ApiModelProperty("办理时间")
    private String timeAt;
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActWorkGuideDAO.java
@@ -24,7 +24,7 @@
        + "<if test='pageActWorkGuideDTO.classify != null'>"
        + "and classify = #{pageActWorkGuideDTO.classify} " + " </if> "
        + "<if test='pageActWorkGuideDTO.title != null and pageActWorkGuideDTO.title.trim() != &quot;&quot;'>"
        + "and title like concat('%',#{pageActWorkGuideDTO.title},'%')" + " </if> " + " </where>" + "order by update_at asc"
        + "and title like concat('%',#{pageActWorkGuideDTO.title},'%')" + " </if> " + " </where>" + "order by update_at desc"
        + "</script>")
    IPage<ComActWorkGuideVO> pageWorkGuide(Page page,
        @Param("pageActWorkGuideDTO") PageActWorkGuideDTO pageActWorkGuideDTO);
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActWorkGuideServiceImpl.java
@@ -6,6 +6,10 @@
import javax.annotation.Resource;
import com.panzhihua.common.utlis.AgeUtils;
import com.panzhihua.common.utlis.StringUtils;
import com.panzhihua.service_community.dao.ComActWorkGuideClassifyDAO;
import com.panzhihua.service_community.model.dos.ComActWorkGuideClassifyDO;
import com.panzhihua.common.model.vos.community.ComActWorkGuideAppletsVO;
import com.panzhihua.common.model.vos.community.ComActWorkGuideDetailAppletsVO;
import com.panzhihua.service_community.dao.ComActWorkGuideClassifyDAO;
@@ -41,9 +45,9 @@
    @Resource
    ComActWorkGuideMaterialDAO workGuideMaterialDAO;
    @Resource
    ComActDAO comActDAO;
    @Resource
    private ComActWorkGuideClassifyDAO comActWorkGuideClassifyDAO;
    @Resource
    ComActDAO comActDAO;
    @Override
    public R addWorkGuide(ComActWorkGuideDTO workGuideDTO, Long userId) {
@@ -152,6 +156,12 @@
        page.setSize(pageSize);
        page.setCurrent(pageNum);
        IPage<ComActWorkGuideVO> iPage = this.baseMapper.pageWorkGuide(page, pageActWorkGuideDTO);
        if (!iPage.getRecords().isEmpty()) {
            iPage.getRecords().forEach(comActWorkGuideVO -> {
                ComActWorkGuideClassifyDO comActWorkGuideClassifyDO = comActWorkGuideClassifyDAO.selectById(comActWorkGuideVO.getClassify());
                comActWorkGuideVO.setClassifyName(comActWorkGuideClassifyDO.getClassifyName());
            });
        }
        return R.ok(iPage);
    }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java
@@ -7,6 +7,8 @@
import javax.annotation.Resource;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.segments.MergeSegments;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
@@ -122,6 +124,8 @@
    private ComElderAuthElderliesDAO comElderAuthElderliesDAO;
    @Resource
    private ComPensionAuthPensionerDAO comPensionAuthPensionerDAO;
    @Resource
    private ComEldersAuthStatisticsMapper comEldersAuthStatisticsMapper;
    @Value("${domain.aesKey:}")
    private String aesKey;
@@ -3994,7 +3998,7 @@
                    updateList.add(updatePopulationDO);
                } else {
                    // 不存在实有人口,则新增
                    populationDO = saveElderPopulationDO(vo, populationActVO, comMngVillageDO, userId);
                    populationDO = saveElderPopulationDO(vo, populationActVO, comMngVillageDO, userId,communityId);
                    saveList.add(populationDO);
                }
                log.info("开始查询实有人口是否已存在完成");
@@ -4440,7 +4444,7 @@
        Long communityId, Long userId) {
        BeanUtils.copyProperties(vo, populationDO);
        ComDrugPopulationDO comDrugPopulationDO = comDrugPopulationDAO.selectOne(new QueryWrapper<ComDrugPopulationDO>()
            .lambda().eq(ComDrugPopulationDO::getPopulationId, populationDO.getId()));
            .lambda().eq(ComDrugPopulationDO::getPopulationId, populationDO.getId()).eq(ComDrugPopulationDO::getCommunityId, communityId));
        // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr ->
        // userTagStr.split("\\(")[0]).collect(Collectors.toList());
        // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除
@@ -4470,7 +4474,7 @@
            BeanUtils.copyProperties(vo, comDrugPopulationDO);
            comDrugPopulationDO.setId(Snowflake.getId());
            comDrugPopulationDO.setPopulationId(populationDO.getId());
            comDrugPopulationDO.setCommunityId(populationDO.getActId());
            comDrugPopulationDO.setCommunityId(communityId);
            comDrugPopulationDO.setStreetId(populationDO.getStreetId());
            comDrugPopulationDAO.insert(comDrugPopulationDO);
        }
@@ -4482,7 +4486,7 @@
        BeanUtils.copyProperties(vo, populationDO);
        ComCorrectPopulationDO comCorrectPopulationDO =
            comCorrectPopulationDAO.selectOne(new QueryWrapper<ComCorrectPopulationDO>().lambda()
                .eq(ComCorrectPopulationDO::getPopulationId, populationDO.getId()));
                .eq(ComCorrectPopulationDO::getPopulationId, populationDO.getId()).eq(ComCorrectPopulationDO::getCommunityId, communityId));
        // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr ->
        // userTagStr.split("\\(")[0]).collect(Collectors.toList());
        // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除
@@ -4511,7 +4515,7 @@
            BeanUtils.copyProperties(vo, comCorrectPopulationDO);
            comCorrectPopulationDO.setId(Snowflake.getId());
            comCorrectPopulationDO.setPopulationId(populationDO.getId());
            comCorrectPopulationDO.setCommunityId(populationDO.getActId());
            comCorrectPopulationDO.setCommunityId(communityId);
            comCorrectPopulationDO.setStreetId(populationDO.getStreetId());
            comCorrectPopulationDAO.insert(comCorrectPopulationDO);
        }
@@ -4523,7 +4527,7 @@
        BeanUtils.copyProperties(vo, populationDO);
        ComMajorPopulationDO comMajorPopulationDO =
            comMajorPopulationDAO.selectOne(new QueryWrapper<ComMajorPopulationDO>().lambda()
                .eq(ComMajorPopulationDO::getPopulationId, populationDO.getId()));
                .eq(ComMajorPopulationDO::getPopulationId, populationDO.getId()).eq(ComMajorPopulationDO::getCommunityId, communityId));
        // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr ->
        // userTagStr.split("\\(")[0]).collect(Collectors.toList());
        // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除
@@ -4552,7 +4556,7 @@
            BeanUtils.copyProperties(vo, comMajorPopulationDO);
            comMajorPopulationDO.setId(Snowflake.getId());
            comMajorPopulationDO.setPopulationId(populationDO.getId());
            comMajorPopulationDO.setCommunityId(populationDO.getActId());
            comMajorPopulationDO.setCommunityId(communityId);
            comMajorPopulationDO.setStreetId(populationDO.getStreetId());
            comMajorPopulationDAO.insert(comMajorPopulationDO);
        }
@@ -4563,7 +4567,7 @@
        Long communityId, Long userId) {
        BeanUtils.copyProperties(vo, populationDO);
        ComCultPopulationDO comCultPopulationDO = comCultPopulationDAO.selectOne(new QueryWrapper<ComCultPopulationDO>()
            .lambda().eq(ComCultPopulationDO::getPopulationId, populationDO.getId()));
            .lambda().eq(ComCultPopulationDO::getPopulationId, populationDO.getId()).eq(ComCultPopulationDO::getCommunityId, communityId));
        // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr ->
        // userTagStr.split("\\(")[0]).collect(Collectors.toList());
        // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除
@@ -4592,7 +4596,7 @@
            BeanUtils.copyProperties(vo, comCultPopulationDO);
            comCultPopulationDO.setId(Snowflake.getId());
            comCultPopulationDO.setPopulationId(populationDO.getId());
            comCultPopulationDO.setCommunityId(populationDO.getActId());
            comCultPopulationDO.setCommunityId(communityId);
            comCultPopulationDO.setStreetId(populationDO.getStreetId());
            comCultPopulationDAO.insert(comCultPopulationDO);
        }
@@ -4604,7 +4608,7 @@
        BeanUtils.copyProperties(vo, populationDO);
        ComRehabilitationPopulationDO comRehabilitationPopulationDO =
            comRehabilitationPopulationDAO.selectOne(new QueryWrapper<ComRehabilitationPopulationDO>().lambda()
                .eq(ComRehabilitationPopulationDO::getPopulationId, populationDO.getId()));
                .eq(ComRehabilitationPopulationDO::getPopulationId, populationDO.getId()).eq(ComRehabilitationPopulationDO::getCommunityId, communityId));
        // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr ->
        // userTagStr.split("\\(")[0]).collect(Collectors.toList());
        // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除
@@ -4633,7 +4637,7 @@
            BeanUtils.copyProperties(vo, comRehabilitationPopulationDO);
            comRehabilitationPopulationDO.setId(Snowflake.getId());
            comRehabilitationPopulationDO.setPopulationId(populationDO.getId());
            comRehabilitationPopulationDO.setCommunityId(populationDO.getActId());
            comRehabilitationPopulationDO.setCommunityId(communityId);
            comRehabilitationPopulationDO.setStreetId(populationDO.getStreetId());
            comRehabilitationPopulationDAO.insert(comRehabilitationPopulationDO);
        }
@@ -4645,7 +4649,7 @@
        Long communityId, Long userId) {
        BeanUtils.copyProperties(vo, populationDO);
        ComKeyPopulationDO comKeyPopulationDO = comKeyPopulationDAO.selectOne(new QueryWrapper<ComKeyPopulationDO>()
            .lambda().eq(ComKeyPopulationDO::getPopulationId, populationDO.getId()));
            .lambda().eq(ComKeyPopulationDO::getPopulationId, populationDO.getId()).eq(ComKeyPopulationDO::getCommunityId, communityId));
        // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr ->
        // userTagStr.split("\\(")[0]).collect(Collectors.toList());
        // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除
@@ -4674,7 +4678,7 @@
            BeanUtils.copyProperties(vo, comKeyPopulationDO);
            comKeyPopulationDO.setId(Snowflake.getId());
            comKeyPopulationDO.setPopulationId(populationDO.getId());
            comKeyPopulationDO.setCommunityId(populationDO.getActId());
            comKeyPopulationDO.setCommunityId(communityId);
            comKeyPopulationDO.setStreetId(populationDO.getStreetId());
            comKeyPopulationDAO.insert(comKeyPopulationDO);
        }
@@ -4686,7 +4690,7 @@
        BeanUtils.copyProperties(vo, populationDO);
        ComSentencePopulationDO comSentencePopulationDO =
            comSentencePopulationDAO.selectOne(new QueryWrapper<ComSentencePopulationDO>().lambda()
                .eq(ComSentencePopulationDO::getPopulationId, populationDO.getId()));
                .eq(ComSentencePopulationDO::getPopulationId, populationDO.getId()).eq(ComSentencePopulationDO::getCommunityId, communityId));
        // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr ->
        // userTagStr.split("\\(")[0]).collect(Collectors.toList());
        // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除
@@ -4715,7 +4719,7 @@
            BeanUtils.copyProperties(vo, comSentencePopulationDO);
            comSentencePopulationDO.setId(Snowflake.getId());
            comSentencePopulationDO.setPopulationId(populationDO.getId());
            comSentencePopulationDO.setCommunityId(populationDO.getActId());
            comSentencePopulationDO.setCommunityId(communityId);
            comSentencePopulationDO.setStreetId(populationDO.getStreetId());
            comSentencePopulationDAO.insert(comSentencePopulationDO);
        }
@@ -4727,7 +4731,7 @@
        BeanUtils.copyProperties(vo, populationDO);
        ComVeteransPopulationDO comVeteransPopulationDO =
            comVeteransPopulationDAO.selectOne(new QueryWrapper<ComVeteransPopulationDO>().lambda()
                .eq(ComVeteransPopulationDO::getPopulationId, populationDO.getId()));
                .eq(ComVeteransPopulationDO::getPopulationId, populationDO.getId()).eq(ComVeteransPopulationDO::getCommunityId, communityId));
        // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr ->
        // userTagStr.split("\\(")[0]).collect(Collectors.toList());
        // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除
@@ -4756,7 +4760,7 @@
            BeanUtils.copyProperties(vo, comVeteransPopulationDO);
            comVeteransPopulationDO.setId(Snowflake.getId());
            comVeteransPopulationDO.setPopulationId(populationDO.getId());
            comVeteransPopulationDO.setCommunityId(populationDO.getActId());
            comVeteransPopulationDO.setCommunityId(communityId);
            comVeteransPopulationDO.setStreetId(populationDO.getStreetId());
            comVeteransPopulationDAO.insert(comVeteransPopulationDO);
        }
@@ -4768,7 +4772,7 @@
        BeanUtils.copyProperties(vo, populationDO);
        ComDisabilityPopulationDO comDisabilityPopulationDO =
            comDisabilityPopulationDAO.selectOne(new QueryWrapper<ComDisabilityPopulationDO>().lambda()
                .eq(ComDisabilityPopulationDO::getPopulationId, populationDO.getId()));
                .eq(ComDisabilityPopulationDO::getPopulationId, populationDO.getId()).eq(ComDisabilityPopulationDO::getCommunityId, communityId));
        // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr ->
        // userTagStr.split("\\(")[0]).collect(Collectors.toList());
        // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除
@@ -4797,7 +4801,7 @@
            BeanUtils.copyProperties(vo, comDisabilityPopulationDO);
            comDisabilityPopulationDO.setId(Snowflake.getId());
            comDisabilityPopulationDO.setPopulationId(populationDO.getId());
            comDisabilityPopulationDO.setCommunityId(populationDO.getActId());
            comDisabilityPopulationDO.setCommunityId(communityId);
            comDisabilityPopulationDO.setStreetId(populationDO.getStreetId());
            comDisabilityPopulationDAO.insert(comDisabilityPopulationDO);
        }
@@ -4809,7 +4813,7 @@
        BeanUtils.copyProperties(vo, populationDO);
        ComLowSecurityPopulationDO comLowSecurityPopulationDO =
            comLowSecurityPopulationDAO.selectOne(new QueryWrapper<ComLowSecurityPopulationDO>().lambda()
                .eq(ComLowSecurityPopulationDO::getPopulationId, populationDO.getId()));
                .eq(ComLowSecurityPopulationDO::getPopulationId, populationDO.getId()).eq(ComLowSecurityPopulationDO::getCommunityId, communityId));
        // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr ->
        // userTagStr.split("\\(")[0]).collect(Collectors.toList());
        // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除
@@ -4838,7 +4842,7 @@
            BeanUtils.copyProperties(vo, comLowSecurityPopulationDO);
            comLowSecurityPopulationDO.setId(Snowflake.getId());
            comLowSecurityPopulationDO.setPopulationId(populationDO.getId());
            comLowSecurityPopulationDO.setCommunityId(populationDO.getActId());
            comLowSecurityPopulationDO.setCommunityId(communityId);
            comLowSecurityPopulationDO.setStreetId(populationDO.getStreetId());
            comLowSecurityPopulationDAO.insert(comLowSecurityPopulationDO);
        }
@@ -4850,7 +4854,7 @@
        BeanUtils.copyProperties(vo, populationDO);
        ComElderAuthElderliesDO comElderAuthElderliesDO =
                comElderAuthElderliesDAO.selectOne(new QueryWrapper<ComElderAuthElderliesDO>().lambda()
                        .eq(ComElderAuthElderliesDO::getPopulationId, populationDO.getId()));
                        .eq(ComElderAuthElderliesDO::getPopulationId, populationDO.getId()).eq(ComElderAuthElderliesDO::getCommunityId, communityId));
        // List<String> userTag = vo.getUserTagStr().stream().map(userTagStr ->
        // userTagStr.split("\\(")[0]).collect(Collectors.toList());
        // //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除
@@ -4884,13 +4888,26 @@
                    comElderAuthElderliesDO.setPersonnelCategory(ComElderAuthElderliesDO.personnelCategory.above100);
                }
            }
            if (!comElderAuthElderliesDO.getIsAlive().equals(1) || !comElderAuthElderliesDO.getIsRegister().equals(1)) {
                if (vo.getIsRegister().equals(1) && vo.getIsAlive().equals(1)) {
                    Calendar calendar = Calendar.getInstance();
                    // 获取当前年
                    int year = calendar.get(Calendar.YEAR);
                    // 获取当前月
                    int month = calendar.get(Calendar.MONTH) + 1;
                    ComEldersAuthStatisticsDO comEldersAuthStatisticsDO = comEldersAuthStatisticsMapper.selectOne(new QueryWrapper<ComEldersAuthStatisticsDO>()
                            .lambda().eq(ComEldersAuthStatisticsDO::getCommunityId, communityId).eq(ComEldersAuthStatisticsDO::getYear, year).eq(ComEldersAuthStatisticsDO::getMonth, month));
                    comEldersAuthStatisticsDO.setSum(comEldersAuthStatisticsDO.getSum() + 1);
                    comEldersAuthStatisticsMapper.updateById(comEldersAuthStatisticsDO);
                }
            }
            comElderAuthElderliesDAO.updateById(comElderAuthElderliesDO);
        } else {
            comElderAuthElderliesDO = new ComElderAuthElderliesDO();
            BeanUtils.copyProperties(vo, comElderAuthElderliesDO);
            comElderAuthElderliesDO.setId(Snowflake.getId());
            comElderAuthElderliesDO.setPopulationId(populationDO.getId());
            comElderAuthElderliesDO.setCommunityId(populationDO.getActId());
            comElderAuthElderliesDO.setCommunityId(communityId);
            comElderAuthElderliesDO.setStreetId(populationDO.getStreetId());
            comElderAuthElderliesDO.setIdCard(cardNoAES);
            comElderAuthElderliesDO.setAddress(vo.getNowAddress());
@@ -4903,6 +4920,17 @@
                }else if (age >= 100){
                    comElderAuthElderliesDO.setPersonnelCategory(ComElderAuthElderliesDO.personnelCategory.above100);
                }
            }
            if (vo.getIsRegister().equals(1) && vo.getIsAlive().equals(1)) {
                Calendar calendar = Calendar.getInstance();
                // 获取当前年
                int year = calendar.get(Calendar.YEAR);
                // 获取当前月
                int month = calendar.get(Calendar.MONTH) + 1;
                ComEldersAuthStatisticsDO comEldersAuthStatisticsDO = comEldersAuthStatisticsMapper.selectOne(new QueryWrapper<ComEldersAuthStatisticsDO>()
                        .lambda().eq(ComEldersAuthStatisticsDO::getCommunityId, communityId).eq(ComEldersAuthStatisticsDO::getYear, year).eq(ComEldersAuthStatisticsDO::getMonth, month));
                comEldersAuthStatisticsDO.setSum(comEldersAuthStatisticsDO.getSum() + 1);
                comEldersAuthStatisticsMapper.updateById(comEldersAuthStatisticsDO);
            }
            comElderAuthElderliesDAO.insert(comElderAuthElderliesDO);
        }
@@ -5507,7 +5535,7 @@
    }
    private ComMngPopulationDO saveElderPopulationDO(ComMngPopulationElderExcelVO vo,
                                                           ComPopulationActVO comActDO, ComMngVillageDO comMngVillageDO, Long userId) {
                                                           ComPopulationActVO comActDO, ComMngVillageDO comMngVillageDO, Long userId, Long communityId) {
        ComMngPopulationDO populationDO = new ComMngPopulationDO();
        ComElderAuthElderliesDO comElderAuthElderliesDO = new ComElderAuthElderliesDO();
        BeanUtils.copyProperties(vo, populationDO);
@@ -5565,6 +5593,17 @@
                comElderAuthElderliesDO.setPersonnelCategory(ComElderAuthElderliesDO.personnelCategory.above100);
            }
        }
        if (vo.getIsRegister().equals(1) && vo.getIsAlive().equals(1)) {
            Calendar calendar = Calendar.getInstance();
            // 获取当前年
            int year = calendar.get(Calendar.YEAR);
            // 获取当前月
            int month = calendar.get(Calendar.MONTH) + 1;
            ComEldersAuthStatisticsDO comEldersAuthStatisticsDO = comEldersAuthStatisticsMapper.selectOne(new QueryWrapper<ComEldersAuthStatisticsDO>()
                    .lambda().eq(ComEldersAuthStatisticsDO::getCommunityId, communityId).eq(ComEldersAuthStatisticsDO::getYear, year).eq(ComEldersAuthStatisticsDO::getMonth, month));
            comEldersAuthStatisticsDO.setSum(comEldersAuthStatisticsDO.getSum() + 1);
            comEldersAuthStatisticsMapper.updateById(comEldersAuthStatisticsDO);
        }
        comElderAuthElderliesDAO.insert(comElderAuthElderliesDO);
        return populationDO;
    }