From e92b046141c800b46782cf0db5bbecb26701e06c Mon Sep 17 00:00:00 2001 From: 101captain <237651143@qq.com> Date: 星期三, 15 十二月 2021 11:22:07 +0800 Subject: [PATCH] 12/15 西区大屏首页接口修改 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 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 69e1dec..bf2bb41 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 @@ -6913,12 +6913,20 @@ ageStatisticsVO5.setSum(0); ageStatisticsVO6.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(); ageStatisticsVO1.setSum(ageMap.get("age16").intValue()); + ageStatisticsVO1.setPercent(ageMap.get("age16").intValue()/count); ageStatisticsVO2.setSum(ageMap.get("age27").intValue()); + ageStatisticsVO2.setPercent(ageMap.get("age27").intValue()/count); ageStatisticsVO3.setSum(ageMap.get("age35").intValue()); + ageStatisticsVO3.setPercent(ageMap.get("age35").intValue()/count); ageStatisticsVO4.setSum(ageMap.get("age45").intValue()); + ageStatisticsVO4.setPercent(ageMap.get("age45").intValue()/count); ageStatisticsVO5.setSum(ageMap.get("age55").intValue()); + ageStatisticsVO5.setPercent(ageMap.get("age55").intValue()/count); ageStatisticsVO6.setSum(ageMap.get("age55over").intValue()); + ageStatisticsVO6.setPercent(ageMap.get("age55over").intValue()/count); } agePopulationList.add(ageStatisticsVO1); @@ -7728,12 +7736,14 @@ IndexSpecialStatisticsVO otherSpecialVO = new IndexSpecialStatisticsVO(); otherSpecialVO.setTitle("其他"); otherSpecialVO.setSum(0); + int countAll=comMngPopulationDAO.getSpecialStatisticsByLabel(communityId); if (!userTagList.isEmpty()) { userTagList.forEach(userTag -> { if (userTag != null) { if (userTag.getSysFlag().equals(0)) { Integer count = comMngPopulationDAO.getSpecialStatisticsByLabel(userTag.getTagName(),communityId); otherSpecialVO.setSum(otherSpecialVO.getSum() + count); + otherSpecialVO.setPercent(otherSpecialVO.getSum()/countAll); } else { if (StringUtils.isNotEmpty(userTag.getTagName())) { if (userTag.getTagName().equals("特扶家庭")) { -- Gitblit v1.7.1