huanghongfa
2021-12-09 9576bebcacea938771f6f5b51d958e6a4ac59df6
Merge remote-tracking branch 'origin/master'

# Conflicts:
# springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java
# springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComMngPopulationDOMapper.xml
8个文件已修改
72 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/civil/CivilVillageStatisticsVO.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/SensitiveUtil.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityConvenientApi.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/BigScreenServiceImpl.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComMngPopulationDOMapper.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/civil/CivilVillageStatisticsVO.java
@@ -3,9 +3,12 @@
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.panzhihua.common.model.vos.community.screen.index.IndexSpecialStatisticsVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
@ApiModel("民生统计小区列表返回参数")
@@ -66,4 +69,7 @@
    @ApiModelProperty("其他人员")
    private Integer otherPeopleNum;
    @ApiModelProperty("特殊人群统计模块数据")
    private List<IndexSpecialStatisticsVO> specialStatisticsList;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/SensitiveUtil.java
@@ -1,5 +1,8 @@
package com.panzhihua.common.utlis;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
 * @description: 身份证手机号脱敏处理
 * @author: Null
@@ -38,4 +41,16 @@
        return idNumber;
    }
    public static String replaceName(String str) {
        if(StringUtils.isNotEmpty(str)){
            if(str.length()==2){
                str=str.replace(str.substring(1),"*");
            }
            if(str.length()>2) {
                str=str.replace(str.substring(1,str.length()-1),"*");
            }
        }
        return str;
    }
}
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityConvenientApi.java
@@ -226,7 +226,7 @@
        try {
            SFTPUtil sftp = new SFTPUtil(userName, password, host, port);
            sftp.login();
            InputStream is = BaseUtils.base64StrToInputStream(file.getFile().replace("data:image/png;base64,","").replace("data:image/jpg;base64,",""));
            InputStream is = BaseUtils.base64StrToInputStream(file.getFile().replace("data:image/png;base64,","").replace("data:image/jpg;base64,","").replace("data:image/jpeg;base64,",""));
            sftp.uploadMore(FtpConstants.FTPFILEPATH_IDCARD, name, is);
            sftp.logout();
            return R.ok(url + "/idcard/" + name);
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java
@@ -366,7 +366,7 @@
    CivilPopulationStatisticsVO getCivilScreenPopulation(@Param("communityId") Long communityId,
        @Param("lastMonth") Date lastMonth);
    @Select("SELECT `NAME`, " + " user_sum, " + " lng, " + " lat, " + " village_images, " + " village_id  " + "FROM "
    @Select("SELECT `NAME`, " + "user_sum, " + " lng, " + " lat, " + " village_images, " + " village_id  " + "FROM "
        + " com_mng_village AS cmv  " + "WHERE " + " community_id = #{communityId}")
    List<CivilVillageStatisticsVO> getCivilScreenVillageList(@Param("communityId") Long communityId);
@@ -615,6 +615,14 @@
     */
    void updatePopulationUnit(@Param("villageId") Long villageId, @Param("floor") String floor,@Param("oldUnitNo") String oldUnitNo,@Param("newUnitNo") String newUnitNo);
    /**
     * 根据villageId查询特殊人群数
     * @param villageId
     * @param label
     * @return
     */
    Integer selectCountByVillageId(@Param("villageId") Long villageId,@Param("label")String label);
    CivilPartyStatisticsVO getCivilParty(@Param("communityId") Long communityId);
    CivilGovernmentStatisticsVO getCivilGovernment(@Param("communityId") Long communityId);
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/BigScreenServiceImpl.java
@@ -5,6 +5,8 @@
import javax.annotation.Resource;
import com.panzhihua.common.utlis.SensitiveUtil;
import com.panzhihua.common.utlis.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
@@ -86,6 +88,11 @@
                listRt = listRt.subList(0, 3);
            }
        }
        listRt.forEach(partyBuildingMemberVO -> {
            if(StringUtils.isNotEmpty(partyBuildingMemberVO.getName())){
                partyBuildingMemberVO.setName(SensitiveUtil.replaceName(partyBuildingMemberVO.getName()));
            }
        });
        return R.ok(listRt);
    }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java
@@ -7041,7 +7041,7 @@
        // 查询特殊人群统计
        List<IndexSpecialStatisticsVO> specialStatisticsVOList = new ArrayList<>();
        // 查询特殊人群标签列表
        //查询特殊人群标签列表
        List<ComMngUserTagVO> userTagList = comMngPopulationDAO.getUserTagListByCommunityId(communityId);
        IndexSpecialStatisticsVO otherSpecialVO = new IndexSpecialStatisticsVO();
        otherSpecialVO.setTitle("其他");
@@ -7125,6 +7125,27 @@
        // 查询小区列表
        List<CivilVillageStatisticsVO> villageStatisticsList = this.baseMapper.getCivilScreenVillageList(communityId);
//        villageStatisticsList.forEach(civilVillageStatisticsVO -> {
//            civilVillageStatisticsVO.setUserSum(comMngPopulationDAO.selectCount(new QueryWrapper<ComMngPopulationDO>().lambda().eq(ComMngPopulationDO::getVillageId,civilVillageStatisticsVO.getVillageId())));
//            List<IndexSpecialStatisticsVO> specialStatisticsVOS = new ArrayList<>();
//            IndexSpecialStatisticsVO otherSpecial = new IndexSpecialStatisticsVO();
//            otherSpecial.setTitle("其他");
//            otherSpecial.setSum(0);
//            // 查询特殊人群标签列表
//            List<ComMngUserTagVO> userTagVOS = comMngPopulationDAO.getUserTagListByCommunityId(communityId);
//
//            userTagVOS.forEach(comMngUserTagVO -> {
//              Integer count=comMngPopulationDAO.selectCountByVillageId(civilVillageStatisticsVO.getVillageId(),comMngUserTagVO.getTagName());
//              IndexSpecialStatisticsVO indexSpecialStatisticsVO=new IndexSpecialStatisticsVO();
//              indexSpecialStatisticsVO.setTitle(comMngUserTagVO.getTagName());
//              indexSpecialStatisticsVO.setSum(count);
//              otherSpecial.setSum(otherSpecial.getSum()+count);
//              specialStatisticsVOS.add(indexSpecialStatisticsVO);
//            });
//            otherSpecial.setSum(civilVillageStatisticsVO.getUserSum()-otherSpecial.getSum());
//            specialStatisticsVOS.add(otherSpecial);
//            civilVillageStatisticsVO.setSpecialStatisticsList(specialStatisticsVOS);
//        });
        civilStatisticsVO.setVillageStatisticsList(villageStatisticsList);
        //查询党建引领数据
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComMngPopulationDOMapper.xml
@@ -638,6 +638,11 @@
        update com_mng_population set unit_no = #{newUnitNo} where village_id = #{villageId} and floor = #{floor} and unit_no = #{oldUnitNo}
    </update>
    <select id="selectCountByVillageId" resultType="Integer">
        select count(*) from com_mng_population t LEFT JOIN com_mng_population_community_tags t1 on t.id= t1.population_id
        where t.village_id=#{villageId} and t1.label like concat('%',#{label},'%')
    </select>
    <select id="getCivilParty" resultType="com.panzhihua.common.model.vos.community.screen.civil.CivilPartyStatisticsVO">
        SELECT
            count( id ) as committeeNum,
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventMapper.xml
@@ -1352,8 +1352,8 @@
        SELECT
            count( id ) as populationTotal,
            (select count(id) from com_mng_population where village_id = #{villageId} and out_or_local = 1) as localTotal,
            (select count(id) from com_mng_population where village_id = #{villageId} and out_or_local = 2) as localTotal,
            (select count(id) from com_mng_population_community_tags as cmpct left join com_mng_population as cmp on cmpct.population_id = cmp.id where cmp.village_id = #{villageId} and cmpct.label is not null) as specialTotal,
            (select count(id) from com_mng_population where village_id = #{villageId} and out_or_local = 2) as outTotal,
            (select count(cmp.id) from com_mng_population_community_tags as cmpct left join com_mng_population as cmp on cmpct.population_id = cmp.id where cmp.village_id = #{villageId} and cmpct.label is not null) as specialTotal,
            (select count(id) from com_mng_building where village_id = #{villageId}) as buildTotal
        FROM
            com_mng_population AS cmp