huanghongfa
2021-03-31 79ebda737b757f9d31c6634ef122883462361fe4
修改bug
5个文件已修改
85 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComMngPopulationServeExcelListen.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngPopulationServeExcelVO.java 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComMngPopulationDO.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComMngPopulationServeExcelListen.java
@@ -80,11 +80,11 @@
            for (Map<Integer, String> oneData : list) {
                ComMngPopulationServeExcelVO vo = new ComMngPopulationServeExcelVO();
                vo.setName(oneData.get(0));
                vo.setSex(Integer.valueOf(oneData.get(1)));
                vo.setSex(oneData.get(1));
                vo.setAge(Integer.valueOf(oneData.get(2)));
                vo.setIsRent(Integer.valueOf(oneData.get(3)));
                vo.setIsRent(oneData.get(3));
                vo.setRoad(oneData.get(4));
                vo.setDoorNo(Integer.valueOf(oneData.get(5)));
                vo.setDoorNo(oneData.get(5));
                vo.setFloor(Integer.valueOf(oneData.get(6)));
                vo.setUnitNo(Integer.valueOf(oneData.get(7)));
                vo.setHouseNo(Integer.valueOf(oneData.get(8)));
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngPopulationServeExcelVO.java
@@ -18,19 +18,19 @@
    private String name;
    @ExcelProperty(value = "性别(1.男 2.女 3.未知)", index = 1)
    private Integer sex;
    private String sex;
    @ExcelProperty(value = "年龄", index = 2)
    private Integer age;
    @ExcelProperty(value = "是否租住", index = 3)
    private Integer isRent;
    private String isRent;
    @ExcelProperty(value = "街路巷", index = 4)
    private String road;
    @ExcelProperty(value = "门牌号", index = 5)
    private Integer doorNo;
    private String doorNo;
    @ExcelProperty(value = "楼排号", index = 6)
    private Integer floor;
@@ -62,4 +62,22 @@
     * 扩展字段用逗号隔开
     */
    private List<String> userTagStr = Lists.newArrayList();
    public interface sex{
        String nan = "男";
        String nv = "女";
        String no = "未知";
    }
    public interface isOk{
        String yes = "是";
        String no = "否";
    }
    public interface politicalOutlook{
        String dang = "中共党员";
        String tuan = "共青团员";
        String wu = "无党派人员";
        String qun = "群众";
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java
@@ -114,7 +114,8 @@
            "cmp.remark,\n" +
            "cmv.alley,\n" +
            "cmp.native_place,\n" +
            "cmp.nation \n" +
            "cmp.nation, \n" +
            "cmp.label \n" +
            "FROM \n" +
            "com_mng_population AS cmp " +
            "LEFT JOIN com_mng_village AS cmv ON cmv.village_id = cmp.village_id " +
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComMngPopulationDO.java
@@ -126,4 +126,23 @@
        int no = 3;
    }
    /**
     * 是否租住
     */
    public interface isOk{
        int yes = 1;
        int no = 0;
    }
    /**
     * 政治面貌
     */
    public interface politicalOutlook{
        int dang = 1;
        int tuan = 3;
        int wu = 12;
        int qun = 13;
        int no = 13;
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java
@@ -27,6 +27,7 @@
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import javax.annotation.Resource;
import java.util.ArrayList;
@@ -249,6 +250,38 @@
            if (comMngVillageDO == null) {
                throw new ServiceException("街道巷:" + vo.getRoad() + "不存在!");
            }
            //性别判断
            if(!StringUtils.isEmpty(vo.getSex())){
                if(vo.getSex().equals(ComMngPopulationServeExcelVO.sex.nan)){
                    comMngPopulationDO.setSex(ComMngPopulationDO.sex.nan);
                }else if(vo.getSex().equals(ComMngPopulationServeExcelVO.sex.nv)){
                    comMngPopulationDO.setSex(ComMngPopulationDO.sex.nv);
                }else{
                    comMngPopulationDO.setSex(ComMngPopulationDO.sex.no);
                }
            }
            //是否租住判断
            if(!StringUtils.isEmpty(vo.getIsRent())){
                if(vo.getIsRent().equals(ComMngPopulationServeExcelVO.isOk.no)){
                    comMngPopulationDO.setIsRent(ComMngPopulationDO.isOk.no);
                }else{
                    comMngPopulationDO.setIsRent(ComMngPopulationDO.isOk.yes);
                }
            }
            //政治面貌判断
            if(!StringUtils.isEmpty(vo.getPoliticalOutlook())){
                if(vo.getPoliticalOutlook().equals(ComMngPopulationServeExcelVO.politicalOutlook.qun)){
                    comMngPopulationDO.setPoliticalOutlook(ComMngPopulationDO.politicalOutlook.qun);
                }else if(vo.getPoliticalOutlook().equals(ComMngPopulationServeExcelVO.politicalOutlook.tuan)){
                    comMngPopulationDO.setPoliticalOutlook(ComMngPopulationDO.politicalOutlook.tuan);
                }else if(vo.getPoliticalOutlook().equals(ComMngPopulationServeExcelVO.politicalOutlook.dang)){
                    comMngPopulationDO.setPoliticalOutlook(ComMngPopulationDO.politicalOutlook.dang);
                }else if(vo.getPoliticalOutlook().equals(ComMngPopulationServeExcelVO.politicalOutlook.wu)){
                    comMngPopulationDO.setPoliticalOutlook(ComMngPopulationDO.politicalOutlook.wu);
                }else{
                    comMngPopulationDO.setPoliticalOutlook(ComMngPopulationDO.politicalOutlook.no);
                }
            }
            comMngPopulationDO.setActId(comMngVillageDO.getVillageId());
            comMngPopulationDO.setActId(comActDO.getCommunityId());
            comMngPopulationDO.setStreetId(comActDO.getStreetId());