101captain
2021-12-15 50a450fe199cde6558001e7bc784a27600d041f8
12/15  基础大屏数据修改
5个文件已修改
50 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/IndexReserveSub.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/index/IndexGridEventStatisticsVO.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/index/IndexPopulationSexStatisticsVO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/IndexReserveSub.java
@@ -16,4 +16,10 @@
    private Integer num;
    @ApiModelProperty("总数")
    private Integer allCount;
    @ApiModelProperty("占比")
    private Integer percent;
    public Integer getPercent() {
        return  this.percent = num*100/allCount;
    }
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/index/IndexGridEventStatisticsVO.java
@@ -10,20 +10,29 @@
    @ApiModelProperty("突发事件数量")
    private Integer eventTFTotal;
    @ApiModelProperty("突发事件占比")
    private Integer tfPercent;
    @ApiModelProperty("治安隐患事件数量")
    private Integer eventZATotal;
    @ApiModelProperty("治安隐患事件占比")
    private Integer zaPercent;
    @ApiModelProperty("矛盾纠纷事件数量")
    private Integer eventMDTotal;
    @ApiModelProperty("矛盾纠纷事件占比")
    private Integer mdPercent;
    @ApiModelProperty("特殊人员上报数量")
    private Integer eventTSTotal;
    @ApiModelProperty("特殊人员上报占比")
    private Integer tsPercent;
    @ApiModelProperty("不稳定因素事件数量")
    private Integer eventBWDTotal;
    @ApiModelProperty("不稳定因素事件占比")
    private Integer bwdPercent;
    @ApiModelProperty("公共服务数量")
    private Integer eventGGTotal;
    @ApiModelProperty("公共服务占比")
    private Integer ggPercent;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/index/IndexPopulationSexStatisticsVO.java
@@ -15,6 +15,6 @@
    private Integer sum;
    @ApiModelProperty("占比")
    private Double percent;
    private Integer percent;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java
@@ -213,7 +213,7 @@
            " where cmpct.community_id = #{communityId}")
    IndexBasicsStatisticsVO getScreenIndexByBasics(@Param("communityId") Long communityId);
    @Select("SELECT    cmp.sex,    count( cmpct.id ) AS sum,  count( cmpct.id )/(select count(*) from com_mng_population_community_tags as cmpct  \n" +
    @Select("SELECT    cmp.sex as type,    count( cmpct.id ) AS sum,  count( cmpct.id )*100/(select count(*) from com_mng_population_community_tags as cmpct  \n" +
            "          left join com_mng_population  as cmp on cmpct.population_id = cmp.id   WHERE    cmpct.community_id = #{communityId} ) as percent    FROM \n" +
            "          com_mng_population_community_tags as cmpct  \n" +
            "          left join com_mng_population  as cmp on cmpct.population_id = cmp.id   WHERE cmp.sex is not null  and  cmpct.community_id = #{communityId} GROUP BY cmp.sex")
@@ -282,7 +282,7 @@
    @Select("SELECT " + " count( id )  " + "FROM " + " com_mng_population_community_tags  " + "WHERE "
            + " community_id = #{communityId} ")
    Integer getSpecialStatisticsByLabel(@Param("communityId") Long communityId);
    Integer getSpecialStatistics(@Param("communityId") Long communityId);
    @Select("<script> " + "SELECT " + " count( egd.id ) AS gridTotal, "
        + " ( select count(egmr.id) from event_grid_member_relation as egmr"
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);