| | |
| | | IndexPopulationAgeStatisticsVO ageStatisticsVO4 = new IndexPopulationAgeStatisticsVO(); |
| | | IndexPopulationAgeStatisticsVO ageStatisticsVO5 = new IndexPopulationAgeStatisticsVO(); |
| | | IndexPopulationAgeStatisticsVO ageStatisticsVO6 = new IndexPopulationAgeStatisticsVO(); |
| | | IndexPopulationAgeStatisticsVO ageStatisticsVO7 = new IndexPopulationAgeStatisticsVO(); |
| | | IndexPopulationAgeStatisticsVO ageStatisticsVO8 = new IndexPopulationAgeStatisticsVO(); |
| | | ageStatisticsVO1.setType(1); |
| | | ageStatisticsVO2.setType(2); |
| | | ageStatisticsVO3.setType(3); |
| | | ageStatisticsVO4.setType(4); |
| | | ageStatisticsVO5.setType(5); |
| | | ageStatisticsVO6.setType(6); |
| | | |
| | | ageStatisticsVO7.setType(7); |
| | | ageStatisticsVO8.setType(8); |
| | | if (ageMap.isEmpty()) { |
| | | ageStatisticsVO1.setSum(0); |
| | | ageStatisticsVO2.setSum(0); |
| | |
| | | ageStatisticsVO4.setSum(0); |
| | | ageStatisticsVO5.setSum(0); |
| | | ageStatisticsVO6.setSum(0); |
| | | ageStatisticsVO7.setSum(0); |
| | | ageStatisticsVO8.setSum(0); |
| | | } else { |
| | | int count=ageMap.get("age16").intValue()+ageMap.get("age27").intValue()+ageMap.get("age35").intValue() |
| | | +ageMap.get("age45").intValue()+ageMap.get("age55").intValue()+ageMap.get("age55over").intValue(); |
| | | +ageMap.get("age45").intValue()+ageMap.get("age55").intValue()+ageMap.get("age55over").intValue()+ageMap.get("age65").intValue()+ageMap.get("age75").intValue(); |
| | | ageStatisticsVO1.setSum(ageMap.get("age16").intValue()); |
| | | ageStatisticsVO1.setPercent(BigDecimal.valueOf(ageMap.get("age16").intValue()*100d/count).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | ageStatisticsVO2.setSum(ageMap.get("age27").intValue()); |
| | |
| | | ageStatisticsVO5.setPercent(BigDecimal.valueOf(ageMap.get("age55").intValue()*100d/count).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | ageStatisticsVO6.setSum(ageMap.get("age55over").intValue()); |
| | | ageStatisticsVO6.setPercent(BigDecimal.valueOf(ageMap.get("age55over").intValue()*100d/count).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | ageStatisticsVO7.setSum(ageMap.get("age65").intValue()); |
| | | ageStatisticsVO7.setPercent(BigDecimal.valueOf(ageMap.get("age65").intValue()*100d/count).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | ageStatisticsVO8.setSum(ageMap.get("age75").intValue()); |
| | | ageStatisticsVO8.setPercent(BigDecimal.valueOf(ageMap.get("age75").intValue()*100d/count).setScale(2,BigDecimal.ROUND_HALF_UP)); |
| | | } |
| | | |
| | | agePopulationList.add(ageStatisticsVO1); |
| | |
| | | agePopulationList.add(ageStatisticsVO4); |
| | | agePopulationList.add(ageStatisticsVO5); |
| | | agePopulationList.add(ageStatisticsVO6); |
| | | agePopulationList.add(ageStatisticsVO7); |
| | | agePopulationList.add(ageStatisticsVO8); |
| | | return agePopulationList; |
| | | } |
| | | |
| | |
| | | public R getScreenEventDetail(BigScreenEventDetailDTO eventDetailDTO) { |
| | | EventNewStatisticsVO statisticsVO = new EventNewStatisticsVO(); |
| | | Integer eventType = eventDetailDTO.getEventType(); |
| | | if (eventDetailDTO.getType().equals(7) || (nonNull(eventType) && eventType.equals(2))) {// 随手拍详情 |
| | | statisticsVO = this.baseMapper.getEventScreenSSPDateil(eventDetailDTO.getEventId()); |
| | | boolean isNewReq = nonNull(eventType) && eventType.equals(2); |
| | | if (eventDetailDTO.getType().equals(7) || isNewReq) {// 随手拍详情 |
| | | if (isNewReq) { |
| | | statisticsVO = this.baseMapper.getEventScreenSSPDateilNew(eventDetailDTO.getEventId()); |
| | | } else { |
| | | statisticsVO = this.baseMapper.getEventScreenSSPDateil(eventDetailDTO.getEventId()); |
| | | } |
| | | if (statisticsVO != null && StringUtils.isNotEmpty(statisticsVO.getPhotoPathList())) { |
| | | statisticsVO.setDangerLevel("0"); |
| | | statisticsVO.setMajor(false); |
| | |
| | | if (!userTagList.isEmpty()) { |
| | | userTagList.forEach(userTag -> { |
| | | if (userTag != null) { |
| | | if(userTag.getTagName().equals("高龄老人")||userTag.getTagName().equals("残疾人")||userTag.getTagName().equals("低保户")||userTag.getTagName().equals("退役军人")||userTag.getTagName().equals("养老金人员")||userTag.getTagName().equals("低收入")){ |
| | | 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 =0; |