| | |
| | | |
| | | //居民活动柱状统计 |
| | | List<StatisticsCommVO> residentActHistogram = comActActivityDAO.selectResidentActHistogramData(communityId, true); |
| | | //居民活动新增数据 |
| | | List<StatisticsCommVO> actAddPolylineData = comActActivityDAO.getActAddPolylineData(communityId, true); |
| | | for (int i = 1; i <= currentMon; i++) { |
| | | String temp; |
| | | if (i > 9) { |
| | | temp = "" + i; |
| | | } else { |
| | | temp = "0" + i; |
| | | } |
| | | boolean isExist = actAddPolylineData.stream().anyMatch(e -> nonNull(e.getFiled()) && |
| | | e.getFiled().endsWith(temp)); |
| | | if (!isExist) { |
| | | StatisticsCommVO other = new StatisticsCommVO(); |
| | | other.setFiled(temp); |
| | | other.setNum(0); |
| | | actAddPolylineData.add(other); |
| | | } |
| | | } |
| | | actAddPolylineData = actAddPolylineData.stream().filter(e -> nonNull(e.getFiled())) |
| | | .sorted(Comparator.comparing(e -> e.getFiled())).collect(Collectors.toList()); |
| | | //居民活动发布总数 |
| | | int residentActTotalCount = 0; |
| | | if (!residentActHistogram.isEmpty()) { |
| | | residentActTotalCount = residentActHistogram.stream().map(StatisticsCommVO::getNum).mapToInt(Integer::intValue).sum(); |
| | | } |
| | | statisticsVO.setResidentActTotalCount(residentActTotalCount); |
| | | statisticsVO.setResidentActHistogram(residentActHistogram); |
| | | // statisticsVO.setResidentActHistogram(residentActHistogram); |
| | | statisticsVO.setResidentActHistogram(actAddPolylineData); |
| | | //业主委员会党员占比 |
| | | List<StatisticsCommVO> committeePartyPercent = comActCommitteeDao.selectCommitteePartyPercent(communityId); |
| | | statisticsVO.setCommitteePartyPercent(committeePartyPercent); |