From 05a88f0a2ed6a2e107a744a58673decde79f91d1 Mon Sep 17 00:00:00 2001 From: 101captain <237651143@qq.com> Date: 星期二, 07 十二月 2021 09:34:22 +0800 Subject: [PATCH] 12/7 大屏相关 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 104 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 1a1de18..e5cf1a1 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 @@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.segments.MergeSegments; +import com.panzhihua.common.model.vos.community.bigscreen.*; import com.panzhihua.common.utlis.*; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Value; @@ -40,7 +41,6 @@ import com.panzhihua.common.model.helper.AESUtil; import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.community.*; -import com.panzhihua.common.model.vos.community.bigscreen.BigScreenStatisticPartyBuild; import com.panzhihua.common.model.vos.community.screen.civil.CivilPopulationStatisticsVO; import com.panzhihua.common.model.vos.community.screen.civil.CivilStatisticsVO; import com.panzhihua.common.model.vos.community.screen.civil.CivilVillageStatisticsVO; @@ -7699,6 +7699,109 @@ return R.ok(this.comMngPopulationDAO.specialInputUserExport(pageInputUserDTO)); } + @Override + public R indexInfo(Long communityId) { + IndexInfo indexInfo=new IndexInfo(); + //基础数据 + BaseInfo baseInfo=this.comMngPopulationDAO.baseInfo(communityId); + indexInfo.setBaseInfo(baseInfo); + // 查询实有人口统计模块 + IndexPopulationStatisticsVO populationStatisticsVO = new IndexPopulationStatisticsVO(); + // 查询实有人口性别统计 + List<IndexPopulationSexStatisticsVO> sexPopulationList = + comMngPopulationDAO.getScreenIndexByPopulationSex(communityId); + populationStatisticsVO.setSexPopulationList(sexPopulationList); + // 查询实有人口年龄统计 + List<IndexPopulationAgeStatisticsVO> agePopulationList = statisticsAge(communityId); + populationStatisticsVO.setAgePopulationList(agePopulationList); + indexInfo.setIndexPopulationStatisticsVO(populationStatisticsVO); + // 查询特殊人群统计 + 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(),communityId); + 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(),communityId); + specialStatisticsVO.setSum(count); + specialStatisticsVOList.add(specialStatisticsVO); + } + } + } + } + }); + } + specialStatisticsVOList.add(otherSpecialVO); + indexInfo.setSpecialStatisticsVOList(specialStatisticsVOList); + // 查询网格化治理 + IndexEventGridStatisticsVO eventGridStatisticsVO = new IndexEventGridStatisticsVO(); + List<IndexGridStatisticsVO> gridStatisticsList = new ArrayList<>(); + // 查询网格化事件数据 + IndexGridEventStatisticsVO gridEventStatistics = comMngPopulationDAO.getGridEventStatisticsList(communityId); + eventGridStatisticsVO.setGridEventStatisticsList(gridEventStatistics); + // 查询网格数据 + List<EventGridDataVO> gridDataList = comMngPopulationDAO.getGridDataListByCommunityId(communityId); + if (!gridDataList.isEmpty()) { + gridDataList.forEach(gridData -> { + if (gridData != null) { + IndexGridStatisticsVO gridStatisticsVO = new IndexGridStatisticsVO(); + gridStatisticsVO.setEventData(gridData.getGridName()); + // 根据网格id查询网格事件列表 + IndexGridEventStatisticsVO gridEventList = + comMngPopulationDAO.getGridEventByGirdId(gridData.getId()); + gridStatisticsVO.setGridEventStatisticsList(gridEventList); + gridStatisticsList.add(gridStatisticsVO); + } + }); + } + eventGridStatisticsVO.setGridStatisticsList(gridStatisticsList); + indexInfo.setEventGridStatisticsVO(eventGridStatisticsVO); + //首页业务统计 + IndexDynamic indexDynamic=this.populationDAO.indexDynamic(communityId); + indexInfo.setIndexDynamic(indexDynamic); + //返攀登记居家隔离数据统计 + IndexReserve indexReserve=new IndexReserve(); + + return null; + } + private void setMistake(ComMngPopulationMistakeExcelVO mvo, ComMngPopulationServeExcelVO vo) { mvo.setPoliticalOutlook(PopulPoliticalOutlookEnum.getCnDescByName(vo.getPoliticalOutlook())); mvo.setIsRent(PopulHouseUseEnum.getCnDescByName(vo.getIsRent())); -- Gitblit v1.7.1