From 5a8a90c095280fbd2106869ecd2bad10e01a57a6 Mon Sep 17 00:00:00 2001 From: 101captain <237651143@qq.com> Date: 星期四, 23 十二月 2021 18:10:22 +0800 Subject: [PATCH] 12/23 大屏修改 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java | 41 +++++++++++++++++++---------------------- 1 files changed, 19 insertions(+), 22 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 50fb010..bbd5ca8 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 @@ -7833,36 +7833,18 @@ otherSpecialVO.setPercent(otherSpecialVO.getSum()*100/countAll); } else { if (StringUtils.isNotEmpty(userTag.getTagName())) { - if (userTag.getTagName().equals("特扶家庭")) { - IndexSpecialStatisticsVO specialStatisticsVO = new IndexSpecialStatisticsVO(); - specialStatisticsVO.setTitle(userTag.getTagName()); - specialStatisticsVO.setSum(22); - specialStatisticsVOList.add(specialStatisticsVO); - } else if (userTag.getTagName().equals("低保户")) { - IndexSpecialStatisticsVO specialStatisticsVO = new IndexSpecialStatisticsVO(); - specialStatisticsVO.setTitle(userTag.getTagName()); - specialStatisticsVO.setSum(94); - specialStatisticsVOList.add(specialStatisticsVO); - } else if (userTag.getTagName().equals("低收入人群")) { - IndexSpecialStatisticsVO specialStatisticsVO = new IndexSpecialStatisticsVO(); - specialStatisticsVO.setTitle(userTag.getTagName()); - specialStatisticsVO.setSum(2); - specialStatisticsVOList.add(specialStatisticsVO); - } else if (userTag.getTagName().equals("退役军人")) { - IndexSpecialStatisticsVO specialStatisticsVO = new IndexSpecialStatisticsVO(); - specialStatisticsVO.setTitle(userTag.getTagName()); - specialStatisticsVO.setSum(264); - specialStatisticsVOList.add(specialStatisticsVO); - } else if (userTag.getTagName().equals("高龄老人")) { + if (userTag.getTagName().equals("高龄老人")) { IndexSpecialStatisticsVO specialStatisticsVO = new IndexSpecialStatisticsVO(); specialStatisticsVO.setTitle(userTag.getTagName()); specialStatisticsVO.setSum(comMngPopulationDAO.getStatisticsCount(communityId)); + specialStatisticsVO.setPercent(specialStatisticsVO.getSum()*100/countAll); specialStatisticsVOList.add(specialStatisticsVO); } else { IndexSpecialStatisticsVO specialStatisticsVO = new IndexSpecialStatisticsVO(); specialStatisticsVO.setTitle(userTag.getTagName()); Integer count = comMngPopulationDAO.getSpecialStatisticsByLabel(userTag.getTagName(),communityId); specialStatisticsVO.setSum(count); + specialStatisticsVO.setPercent(specialStatisticsVO.getSum()*100/countAll); specialStatisticsVOList.add(specialStatisticsVO); } } @@ -7910,13 +7892,28 @@ IndexBackReserve indexBackReserve=new IndexBackReserve(); indexBackReserve.setCount(comActReserveMapper.indexBackReserve(communityId)); indexBackReserve.setIndexReserveSubList(comActReserveMapper.indexBackReserveSub(communityId)); + indexBackReserve.getIndexReserveSubList().forEach(indexReserveSub -> { + if(indexReserveSub.getAllCount()!=0){ + indexReserveSub.setPercent(indexReserveSub.getNum()*100/indexReserveSub.getAllCount()); + } + else { + indexReserveSub.setPercent(0); + } + }); IndexHomeQuarantine indexHomeQuarantine=new IndexHomeQuarantine(); indexHomeQuarantine.setCount(comActReserveMapper.indexHomeQuarantine(communityId)); indexHomeQuarantine.setIndexReserveSubList(comActReserveMapper.IndexHomeQuarantineSub(communityId)); + indexHomeQuarantine.getIndexReserveSubList().forEach(indexReserveSub -> { + if(indexReserveSub.getAllCount()!=0){ + indexReserveSub.setPercent(indexReserveSub.getNum()*100/indexReserveSub.getAllCount()); + } + else { + indexReserveSub.setPercent(0); + } + }); indexReserve.setIndexBackReserve(indexBackReserve); indexReserve.setIndexHomeQuarantine(indexHomeQuarantine); indexInfo.setIndexReserve(indexReserve); - BigscreenGridsGovernanceStatisticsVO bigscreenGridsGovernanceStatisticsVO=comActEasyPhotoDAO.selectBigscreenGridsGovern(communityId); indexInfo.setBigScreenGridStaticsReturn(setData(bigscreenGridsGovernanceStatisticsVO)); -- Gitblit v1.7.1