From b22bc1a0d7931c9e91b96f1cd7c1c1855ff69ebf Mon Sep 17 00:00:00 2001 From: 101captain <237651143@qq.com> Date: 星期二, 18 一月 2022 13:46:11 +0800 Subject: [PATCH] Merge branch 'yibin' into test --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java | 26 +++++++++++++++++++++----- 1 files changed, 21 insertions(+), 5 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java index 06a7c66..32795fd 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java @@ -6904,13 +6904,16 @@ 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); @@ -6918,9 +6921,11 @@ 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()); @@ -6933,6 +6938,10 @@ 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); @@ -6941,6 +6950,8 @@ agePopulationList.add(ageStatisticsVO4); agePopulationList.add(ageStatisticsVO5); agePopulationList.add(ageStatisticsVO6); + agePopulationList.add(ageStatisticsVO7); + agePopulationList.add(ageStatisticsVO8); return agePopulationList; } @@ -7397,8 +7408,13 @@ 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); @@ -7832,7 +7848,7 @@ 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; -- Gitblit v1.7.1