huanghongfa
2021-07-22 7569b9671f219d535838e4b55414ac1c9813a52e
Merge remote-tracking branch 'origin/test' into test
6个文件已修改
77 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComMngPopulationServeExcelListen.java 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngPopulationServeExcelVO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationHouseDAO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComMngPopulationDO.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationHouseServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComMngPopulationServeExcelListen.java
@@ -350,13 +350,10 @@
                    vo.setResidence(PopulIsOkEnum.getCodeByName(oneData.get(27).trim()));
                }
                if(StringUtils.isNotEmpty(oneData.get(28))){
                    vo.setAddress(oneData.get(28).trim());
                }
                if(StringUtils.isNotEmpty(oneData.get(29))){
                    Integer isOk = PopulPersonTypeEnum.getCodeByName(oneData.get(29));
                    Integer isOk = PopulPersonTypeEnum.getCodeByName(oneData.get(28));
                    if(isOk.equals(-1)){
                        ComMngPopulationImportErrorVO importErrorVO = new ComMngPopulationImportErrorVO();
                        importErrorVO.setErrorPosition("第" + index + "行,第30列");
                        importErrorVO.setErrorPosition("第" + index + "行,第29列");
                        importErrorVO.setErrorMsg("您填写的人员类型有误");
                        populationImportErrorVOList.add(importErrorVO);
                        index++;
@@ -364,48 +361,48 @@
                    }
                    vo.setPersonType(isOk);
                }
                if(StringUtils.isNotEmpty(oneData.get(29))){
                    vo.setCountry(oneData.get(29).trim());
                }
                if(StringUtils.isNotEmpty(oneData.get(30))){
                    vo.setCountry(oneData.get(30).trim());
                    SimpleDateFormat simpleDateFormat = new SimpleDateFormat("YYYY-dd-MM HH:mm:ss");
                    vo.setDateOfDeparture(simpleDateFormat.parse(oneData.get(30)));
                }
                if(StringUtils.isNotEmpty(oneData.get(31))){
                    SimpleDateFormat simpleDateFormat = new SimpleDateFormat("YYYY-dd-MM HH:mm:ss");
                    vo.setDateOfDeparture(simpleDateFormat.parse(oneData.get(31)));
                    vo.setPersonStatus(oneData.get(31).trim());
                }
                if(StringUtils.isNotEmpty(oneData.get(32))){
                    vo.setPersonStatus(oneData.get(32).trim());
                    vo.setMonthlyIncome(oneData.get(32).trim());
                }
                if(StringUtils.isNotEmpty(oneData.get(33))){
                    vo.setMonthlyIncome(oneData.get(33).trim());
                    vo.setFamilyStatus(oneData.get(33).trim());
                }
                if(StringUtils.isNotEmpty(oneData.get(34))){
                    vo.setFamilyStatus(oneData.get(34).trim());
                    vo.setGoalInChina(oneData.get(34).trim());
                }
                if(StringUtils.isNotEmpty(oneData.get(35))){
                    vo.setGoalInChina(oneData.get(35).trim());
                    SimpleDateFormat simpleDateFormat = new SimpleDateFormat("YYYY-dd-MM HH:mm:ss");
                    vo.setDateOfArrival(simpleDateFormat.parse(oneData.get(35)));
                }
                if(StringUtils.isNotEmpty(oneData.get(36))){
                    SimpleDateFormat simpleDateFormat = new SimpleDateFormat("YYYY-dd-MM HH:mm:ss");
                    vo.setDateOfArrival(simpleDateFormat.parse(oneData.get(36)));
                }
                if(StringUtils.isNotEmpty(oneData.get(37))){
                    vo.setRemark(oneData.get(37).trim());
                    vo.setRemark(oneData.get(36).trim());
                }
                if(StringUtils.isNotEmpty(oneData.get(37))){
                    vo.setIdCardPositive(oneData.get(37).trim());
                }
                if(StringUtils.isNotEmpty(oneData.get(38))){
                    vo.setIdCardPositive(oneData.get(38).trim());
                    vo.setIdCardBack(oneData.get(38).trim());
                }
                if(StringUtils.isNotEmpty(oneData.get(39))){
                    vo.setIdCardBack(oneData.get(39).trim());
                    vo.setHouseHold(oneData.get(39).trim());
                }
                if(StringUtils.isNotEmpty(oneData.get(40))){
                    vo.setHouseHold(oneData.get(40).trim());
                }
                if(StringUtils.isEmpty(oneData.get(41))){
                if(StringUtils.isEmpty(oneData.get(40))){
                    vo.setDeath(0);
                }else{
                    vo.setDeath(PopulIsOkEnum.getCodeByName(oneData.get(41).trim()));
                    vo.setDeath(PopulIsOkEnum.getCodeByName(oneData.get(40).trim()));
                }
                for (int i = 42; i < headSize; i++) {
                for (int i = 41; i < headSize; i++) {
                    if (oneData.get(i) != null && oneData.get(i).equals("是")) {
                        vo.getUserTagStr().add(headData.get(i).substring(0,headData.get(i).indexOf("(")));
                    }
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngPopulationServeExcelVO.java
@@ -2,6 +2,8 @@
import com.alibaba.excel.annotation.ExcelProperty;
import com.google.common.collect.Lists;
import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass;
import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField;
import lombok.Data;
import java.io.Serializable;
@@ -13,12 +15,14 @@
 * @author: llming
 */
@Data
@EncryptDecryptClass
public class ComMngPopulationServeExcelVO implements Serializable {
    @ExcelProperty(value = "姓名", index = 0)
    private String name;
    @ExcelProperty(value = "身份证号码", index = 1)
    @EncryptDecryptField
    private String cardNo;
    @ExcelProperty(value = "民族", index = 2)
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationHouseDAO.java
@@ -33,7 +33,7 @@
    @Select("<script> " +
            "select id as houseId,cmv.alley from com_mng_population_house as cmph left join com_mng_village as cmv on cmv.village_id = cmph.village_id where cmph.community_id = #{communityId}" +
            "<if test='villageId != null'>" +
            "<if test='villageId != null and villageId != &quot;&quot;'>" +
            "and cmv.village_id = #{villageId}" +
            " </if> " +
            " </script>")
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComMngPopulationDO.java
@@ -219,6 +219,7 @@
    /**
     * 标签集合(多个标签以,隔开)
     */
    @TableField(fill = FieldFill.UPDATE)
    private String label;
    /**
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationHouseServiceImpl.java
@@ -85,7 +85,7 @@
                cascadeHouseVOList = cascadeHouseVOList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(o -> o.getAlley()))), ArrayList::new));
                cascadeHouseVOList.forEach(cascade -> {
                    cascade.setName(cascade.getAlley());
                });
                    });
                break;
            case 2:
                if(houseDO != null){
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java
@@ -431,7 +431,7 @@
//                if (vo.getIsRent() != null && vo.getIsRent().equals(PopulHouseUseEnum.SELF.getCode())) {
//                    populationDO = updatePopulationDO(vo, populationDO);
//                }
                populationDO = updatePopulationDO(vo, populationDO);
                populationDO = updatePopulationDO(vo, comActDO, populationDO);
            }
            //处理实有人口房屋居住信息
@@ -463,7 +463,7 @@
        return R.ok();
    }
    private ComMngPopulationDO updatePopulationDO(ComMngPopulationServeExcelVO vo, ComMngPopulationDO populationDO) throws Exception {
    private ComMngPopulationDO updatePopulationDO(ComMngPopulationServeExcelVO vo, ComActDO comActDO, ComMngPopulationDO populationDO) throws Exception {
        UpdateWrapper<ComMngPopulationDO> updateWrapper = new UpdateWrapper<>();
        updateWrapper.eq("id",populationDO.getId());
        ComMngPopulationDO update = new ComMngPopulationDO();
@@ -476,7 +476,24 @@
//        if (StringUtils.isNotEmpty(populationDO.getPhone())) {
//            update.setPhone(populationDO.getPhone());
//        }
        String cardNoAES = AESUtil.encrypt128(vo.getCardNo(), aesKey);
        BeanUtils.copyProperties(vo, update);
        List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList());
        //查询当前社区标签列表
        List<String> list = new ArrayList<>();
        List<ComMngUserTagDO> comMngUserTagDOS = comMngUserTagDAO.selectList(new QueryWrapper<ComMngUserTagDO>().eq("sys_flag", 1).or().eq("community_id", comActDO.getCommunityId()));
        if (!ObjectUtils.isEmpty(comMngUserTagDOS)) {
            list = comMngUserTagDOS.stream().map(comMngUserTagDO -> comMngUserTagDO.getTagName()).collect(Collectors.toList());
        }
        //如果导入数据标签中有当前社区标签列表中不包含的标签,则删除
        Iterator<String> iterator = userTag.iterator();
        while (iterator.hasNext()) {
            String s = iterator.next();
            if (!list.contains(s))
                iterator.remove();
        }
        update.setLabel(Joiner.on(",").join(userTag));
        update.setCardNo(cardNoAES);
        this.baseMapper.update(update,updateWrapper);
        return populationDO;
    }