From 50a450fe199cde6558001e7bc784a27600d041f8 Mon Sep 17 00:00:00 2001 From: 101captain <237651143@qq.com> Date: 星期三, 15 十二月 2021 16:23:41 +0800 Subject: [PATCH] 12/15 基础大屏数据修改 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java | 23 +++++++++++++++-------- 1 files changed, 15 insertions(+), 8 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 bf2bb41..44f8c99 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 @@ -6916,17 +6916,17 @@ 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); + ageStatisticsVO1.setPercent(ageMap.get("age16").intValue()*100/count); ageStatisticsVO2.setSum(ageMap.get("age27").intValue()); - ageStatisticsVO2.setPercent(ageMap.get("age27").intValue()/count); + ageStatisticsVO2.setPercent(ageMap.get("age27").intValue()*100/count); ageStatisticsVO3.setSum(ageMap.get("age35").intValue()); - ageStatisticsVO3.setPercent(ageMap.get("age35").intValue()/count); + ageStatisticsVO3.setPercent(ageMap.get("age35").intValue()*100/count); ageStatisticsVO4.setSum(ageMap.get("age45").intValue()); - ageStatisticsVO4.setPercent(ageMap.get("age45").intValue()/count); + ageStatisticsVO4.setPercent(ageMap.get("age45").intValue()*100/count); ageStatisticsVO5.setSum(ageMap.get("age55").intValue()); - ageStatisticsVO5.setPercent(ageMap.get("age55").intValue()/count); + ageStatisticsVO5.setPercent(ageMap.get("age55").intValue()*100/count); ageStatisticsVO6.setSum(ageMap.get("age55over").intValue()); - ageStatisticsVO6.setPercent(ageMap.get("age55over").intValue()/count); + ageStatisticsVO6.setPercent(ageMap.get("age55over").intValue()*100/count); } agePopulationList.add(ageStatisticsVO1); @@ -7736,14 +7736,14 @@ IndexSpecialStatisticsVO otherSpecialVO = new IndexSpecialStatisticsVO(); otherSpecialVO.setTitle("其他"); otherSpecialVO.setSum(0); - int countAll=comMngPopulationDAO.getSpecialStatisticsByLabel(communityId); + int countAll=comMngPopulationDAO.getSpecialStatistics(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); + otherSpecialVO.setPercent(otherSpecialVO.getSum()*100/countAll); } else { if (StringUtils.isNotEmpty(userTag.getTagName())) { if (userTag.getTagName().equals("特扶家庭")) { @@ -7790,6 +7790,13 @@ List<IndexGridStatisticsVO> gridStatisticsList = new ArrayList<>(); // 查询网格化事件数据 IndexGridEventStatisticsVO gridEventStatistics = comMngPopulationDAO.getGridEventStatisticsList(communityId); + int count=gridEventStatistics.getEventGGTotal()+gridEventStatistics.getEventBWDTotal()+gridEventStatistics.getEventMDTotal()+gridEventStatistics.getEventTFTotal()+gridEventStatistics.getEventTSTotal()+gridEventStatistics.getEventZATotal(); + gridEventStatistics.setGgPercent(gridEventStatistics.getEventGGTotal()*100/count); + gridEventStatistics.setBwdPercent(gridEventStatistics.getEventBWDTotal()*100/count); + gridEventStatistics.setMdPercent(gridEventStatistics.getEventMDTotal()*100/count); + gridEventStatistics.setTfPercent(gridEventStatistics.getEventTFTotal()*100/count); + gridEventStatistics.setTsPercent(gridEventStatistics.getEventTSTotal()*100/count); + gridEventStatistics.setZaPercent(gridEventStatistics.getEventZATotal()*100/count); eventGridStatisticsVO.setGridEventStatisticsList(gridEventStatistics); // 查询网格数据 List<EventGridDataVO> gridDataList = comMngPopulationDAO.getGridDataListByCommunityId(communityId); -- Gitblit v1.7.1