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
| | |
| | | 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("民生统计小区列表返回参数") |
| | |
| | | @ApiModelProperty("其他人员") |
| | | private Integer otherPeopleNum; |
| | | |
| | | @ApiModelProperty("特殊人群统计模块数据") |
| | | private List<IndexSpecialStatisticsVO> specialStatisticsList; |
| | | |
| | | } |
| | |
| | | package com.panzhihua.common.utlis; |
| | | |
| | | import java.util.regex.Matcher; |
| | | import java.util.regex.Pattern; |
| | | |
| | | /** |
| | | * @description: 身份证手机号脱敏处理 |
| | | * @author: Null |
| | |
| | | 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; |
| | | } |
| | | } |
| | |
| | | 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); |
| | |
| | | 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); |
| | | |
| | |
| | | */ |
| | | 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); |
| | |
| | | |
| | | 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; |
| | | |
| | |
| | | listRt = listRt.subList(0, 3); |
| | | } |
| | | } |
| | | listRt.forEach(partyBuildingMemberVO -> { |
| | | if(StringUtils.isNotEmpty(partyBuildingMemberVO.getName())){ |
| | | partyBuildingMemberVO.setName(SensitiveUtil.replaceName(partyBuildingMemberVO.getName())); |
| | | } |
| | | }); |
| | | return R.ok(listRt); |
| | | } |
| | | |
| | |
| | | // 查询特殊人群统计 |
| | | List<IndexSpecialStatisticsVO> specialStatisticsVOList = new ArrayList<>(); |
| | | |
| | | // 查询特殊人群标签列表 |
| | | //查询特殊人群标签列表 |
| | | List<ComMngUserTagVO> userTagList = comMngPopulationDAO.getUserTagListByCommunityId(communityId); |
| | | IndexSpecialStatisticsVO otherSpecialVO = new IndexSpecialStatisticsVO(); |
| | | otherSpecialVO.setTitle("其他"); |
| | |
| | | |
| | | // 查询小区列表 |
| | | 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); |
| | | |
| | | //查询党建引领数据 |
| | |
| | | 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, |
| | |
| | | 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 |