From 3f78e5a92b54cfa64425e73611ae0ac7ba81bc52 Mon Sep 17 00:00:00 2001 From: 罗元桥 <2376770955@qq.com> Date: 星期一, 21 六月 2021 15:45:16 +0800 Subject: [PATCH] Merge branch 'test_screen' into 'master' --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java | 82 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 81 insertions(+), 1 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 f95a52b..36db8ba 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 @@ -878,6 +878,11 @@ specialStatisticsVO.setTitle(userTag.getTagName()); specialStatisticsVO.setSum(264); specialStatisticsVOList.add(specialStatisticsVO); + }else if(userTag.getTagName().equals("高龄老人")){ + IndexSpecialStatisticsVO specialStatisticsVO = new IndexSpecialStatisticsVO(); + specialStatisticsVO.setTitle(userTag.getTagName()); + specialStatisticsVO.setSum(comMngPopulationDAO.getStatisticsCount(communityId)); + specialStatisticsVOList.add(specialStatisticsVO); }else{ IndexSpecialStatisticsVO specialStatisticsVO = new IndexSpecialStatisticsVO(); specialStatisticsVO.setTitle(userTag.getTagName()); @@ -993,6 +998,10 @@ newStatisticsVO.setAudios(audioList); newStatisticsVO.setPics(picList); newStatisticsVO.setVideos(videoList); + + //查询事件流转记录 + List<EventTransferRecordVO> transferRecordList = this.baseMapper.getEventScreenEventTransList(newStatisticsVO.getId()); + newStatisticsVO.setTransferRecordList(transferRecordList); } statisticsVO.setNewStatisticsVO(newStatisticsVO); @@ -1052,6 +1061,11 @@ IndexSpecialStatisticsVO specialStatisticsVO = new IndexSpecialStatisticsVO(); specialStatisticsVO.setTitle(userTag.getTagName()); specialStatisticsVO.setSum(264); + specialStatisticsVOList.add(specialStatisticsVO); + }else if(userTag.getTagName().equals("高龄老人")){ + IndexSpecialStatisticsVO specialStatisticsVO = new IndexSpecialStatisticsVO(); + specialStatisticsVO.setTitle(userTag.getTagName()); + specialStatisticsVO.setSum(comMngPopulationDAO.getStatisticsCount(communityId)); specialStatisticsVOList.add(specialStatisticsVO); }else{ IndexSpecialStatisticsVO specialStatisticsVO = new IndexSpecialStatisticsVO(); @@ -1143,7 +1157,69 @@ comActPopulationScreenVO.setTotalNum(vo.getPopulationTotal() == null ? 0 : vo.getPopulationTotal()); comActPopulationScreenVO.setLocalNum(vo.getLocalTotal() == null ? 0 : vo.getLocalTotal().longValue()); comActPopulationScreenVO.setOutNum(vo.getOutTotal() == null ? 0 : vo.getOutTotal().longValue()); - comActPopulationScreenVO.setSpecialNum(vo.getSpecialTotal() == null ? 0 : vo.getSpecialTotal().longValue()); + + //查询特殊人群统计 + List<IndexSpecialStatisticsVO> specialStatisticsVOList = new ArrayList<>(); + + //查询特殊人群标签列表 + List<ComMngUserTagVO> userTagList = comMngPopulationDAO.getUserTagListByCommunityId(communityId); + IndexSpecialStatisticsVO otherSpecialVO = new IndexSpecialStatisticsVO(); + otherSpecialVO.setTitle("其他"); + otherSpecialVO.setSum(0); + if(!userTagList.isEmpty()){ + userTagList.forEach(userTag -> { + if(userTag != null){ + if(userTag.getSysFlag().equals(0)){ + Integer count = comMngPopulationDAO.getSpecialStatisticsByLabel(userTag.getTagName()); + otherSpecialVO.setSum(otherSpecialVO.getSum() + count); + }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("高龄老人")){ + IndexSpecialStatisticsVO specialStatisticsVO = new IndexSpecialStatisticsVO(); + specialStatisticsVO.setTitle(userTag.getTagName()); + specialStatisticsVO.setSum(comMngPopulationDAO.getStatisticsCount(communityId)); + specialStatisticsVOList.add(specialStatisticsVO); + }else{ + IndexSpecialStatisticsVO specialStatisticsVO = new IndexSpecialStatisticsVO(); + specialStatisticsVO.setTitle(userTag.getTagName()); + Integer count = comMngPopulationDAO.getSpecialStatisticsByLabel(userTag.getTagName()); + specialStatisticsVO.setSum(count); + specialStatisticsVOList.add(specialStatisticsVO); + } + } + } + } + }); + } + //计算特殊人群总数 + specialStatisticsVOList.add(otherSpecialVO); + Integer specialNum = 0; + if(!specialStatisticsVOList.isEmpty()){ + for (IndexSpecialStatisticsVO special:specialStatisticsVOList) { + specialNum += special.getSum(); + } + } + comActPopulationScreenVO.setSpecialNum(specialNum.longValue()); //统计已使用社区通人数 Long count = populationDAO.countUsedCommunityPopulation(communityId); comActPopulationScreenVO.setUsedCommunityNum(count == null ? 0 : count); @@ -1318,6 +1394,10 @@ statisticsVO.setAudios(audioList); statisticsVO.setPics(picList); statisticsVO.setVideos(videoList); + + //查询事件流转记录 + List<EventTransferRecordVO> transferRecordList = this.baseMapper.getEventScreenEventTransList(eventDetailDTO.getEventId()); + statisticsVO.setTransferRecordList(transferRecordList); } } return R.ok(statisticsVO); -- Gitblit v1.7.1