| | |
| | | IndexSpecialStatisticsVO otherSpecialVO = new IndexSpecialStatisticsVO(); |
| | | otherSpecialVO.setTitle("其他"); |
| | | otherSpecialVO.setSum(0); |
| | | int countAll=comMngPopulationDAO.getSpecialStatistics(communityId); |
| | | IndexSpecialStatisticsVO otherSpecialVO1 = new IndexSpecialStatisticsVO(); |
| | | otherSpecialVO1.setTitle("普通居民"); |
| | | otherSpecialVO1.setSum(0); |
| | | int countNormal=comMngPopulationDAO.getSpecialStatistics(communityId); |
| | | int countElder=comMngPopulationDAO.getStatisticsCount(communityId); |
| | | int countAll=countElder+countNormal; |
| | | if (!userTagList.isEmpty()) { |
| | | userTagList.forEach(userTag -> { |
| | | if (userTag != null) { |
| | | if (userTag.getSysFlag().equals(0)) { |
| | | Integer count = comMngPopulationDAO.getSpecialStatisticsByLabel(userTag.getTagName(),communityId); |
| | | IndexSpecialStatisticsVO specialStatisticsVO = new IndexSpecialStatisticsVO(); |
| | | otherSpecialVO.setSum(otherSpecialVO.getSum()+count); |
| | | specialStatisticsVO.setTitle(userTag.getTagName()); |
| | | specialStatisticsVO.setSum(count); |
| | | specialStatisticsVO.setPercent(BigDecimal.valueOf(specialStatisticsVO.getSum()*100d/countAll).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | specialStatisticsVOList.add(specialStatisticsVO); |
| | | } else { |
| | | if (StringUtils.isNotEmpty(userTag.getTagName())) { |
| | | if(userTag.getTagName().equals("高龄老人")||userTag.getTagName().equals("残疾人")||userTag.getTagName().equals("低保户")||userTag.getTagName().equals("退役军人")||userTag.getTagName().equals("养老金人员")||userTag.getTagName().equals("低保户")){ |
| | | IndexSpecialStatisticsVO specialStatisticsVO = new IndexSpecialStatisticsVO(); |
| | | specialStatisticsVO.setTitle(userTag.getTagName()); |
| | | Integer count = comMngPopulationDAO.getSpecialStatisticsByLabel(userTag.getTagName(),communityId); |
| | | otherSpecialVO.setSum(otherSpecialVO.getSum()+count); |
| | | Integer count =0; |
| | | if (userTag.getTagName().equals("高龄老人")) { |
| | | count=countElder; |
| | | } |
| | | else { |
| | | count= comMngPopulationDAO.getSpecialStatisticsByLabel(userTag.getTagName(),communityId); |
| | | } |
| | | specialStatisticsVO.setSum(count); |
| | | specialStatisticsVO.setPercent(BigDecimal.valueOf(specialStatisticsVO.getSum()*100d/countAll).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | otherSpecialVO1.setSum(otherSpecialVO1.getSum()+count); |
| | | specialStatisticsVOList.add(specialStatisticsVO); |
| | | } |
| | | else{ |
| | | Integer count = comMngPopulationDAO.getSpecialStatisticsByLabel(userTag.getTagName(),communityId); |
| | | otherSpecialVO.setSum(otherSpecialVO.getSum()+count); |
| | | otherSpecialVO1.setSum(otherSpecialVO1.getSum()+count); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | otherSpecialVO.setSum(countAll-otherSpecialVO.getSum()); |
| | | otherSpecialVO.setPercent(BigDecimal.valueOf(otherSpecialVO.getSum()*100d/countAll).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | specialStatisticsVOList.add(otherSpecialVO); |
| | | otherSpecialVO1.setSum(countAll-otherSpecialVO1.getSum()); |
| | | otherSpecialVO1.setPercent(BigDecimal.valueOf(otherSpecialVO1.getSum()*100d/countAll).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | specialStatisticsVOList.add(otherSpecialVO1); |
| | | indexInfo.setSpecialStatisticsVOList(specialStatisticsVOList); |
| | | // 查询网格化治理 |
| | | IndexEventGridStatisticsVO eventGridStatisticsVO = new IndexEventGridStatisticsVO(); |