101captain
2021-12-15 e92b046141c800b46782cf0db5bbecb26701e06c
12/15  西区大屏首页接口修改
5个文件已修改
34 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/index/IndexPopulationAgeStatisticsVO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/index/IndexPopulationSexStatisticsVO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/index/IndexSpecialStatisticsVO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/index/IndexPopulationAgeStatisticsVO.java
@@ -14,4 +14,7 @@
    @ApiModelProperty("数量")
    private Integer sum = 0;
    @ApiModelProperty("占比")
    private Integer percent;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/index/IndexPopulationSexStatisticsVO.java
@@ -14,4 +14,7 @@
    @ApiModelProperty("数量")
    private Integer sum;
    @ApiModelProperty("占比")
    private Double percent;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/index/IndexSpecialStatisticsVO.java
@@ -14,4 +14,7 @@
    @ApiModelProperty("人口数量")
    private Integer sum;
    @ApiModelProperty("占比")
    private Integer percent;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java
@@ -213,13 +213,10 @@
            " where cmpct.community_id = #{communityId}")
    IndexBasicsStatisticsVO getScreenIndexByBasics(@Param("communityId") Long communityId);
    @Select("SELECT " + " IFNULL( NULL, 1 ) AS type, " + " count( cmpct.id ) AS sum  " + "FROM "
        + " com_mng_population_community_tags as cmpct  "
        + " left join com_mng_population  as cmp on cmpct.population_id = cmp.id " + "WHERE " + " cmp.sex = 1  "
        + " AND cmpct.community_id = #{communityId} UNION ALL " + "SELECT " + " IFNULL( NULL, 2 ) AS type, "
        + " count( cmpct.id ) AS sum  " + "FROM " + " com_mng_population_community_tags as cmpct  "
        + " left join com_mng_population  as cmp on cmpct.population_id = cmp.id " + "WHERE " + " cmp.sex = 2  "
        + " AND cmpct.community_id = #{communityId}")
    @Select("SELECT    cmp.sex,    count( cmpct.id ) AS sum,  count( cmpct.id )/(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")
    List<IndexPopulationSexStatisticsVO> getScreenIndexByPopulationSex(@Param("communityId") Long communityId);
    @Select("SELECT " + " e.happen_time as createAt, " + " e.event_des, " + " e.event_deal_status  " + "FROM "
@@ -283,6 +280,10 @@
        + " community_id = #{communityId} and label like concat('%',#{label},'%')")
    Integer getSpecialStatisticsByLabel(@Param("label") String label,@Param("communityId") Long communityId);
    @Select("SELECT " + " count( id )  " + "FROM " + " com_mng_population_community_tags  " + "WHERE "
            + " community_id = #{communityId} ")
    Integer getSpecialStatisticsByLabel(@Param("communityId") Long communityId);
    @Select("<script> " + "SELECT " + " count( egd.id ) AS gridTotal, "
        + " ( select count(egmr.id) from event_grid_member_relation as egmr"
        + " left join event_grid_data as egd1 on egd1.id = egmr.grid_id where egd1.grid_community_id = egd.grid_community_id ) AS gridMemberTotal, "
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java
@@ -6913,12 +6913,20 @@
            ageStatisticsVO5.setSum(0);
            ageStatisticsVO6.setSum(0);
        } else {
            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);
            ageStatisticsVO2.setSum(ageMap.get("age27").intValue());
            ageStatisticsVO2.setPercent(ageMap.get("age27").intValue()/count);
            ageStatisticsVO3.setSum(ageMap.get("age35").intValue());
            ageStatisticsVO3.setPercent(ageMap.get("age35").intValue()/count);
            ageStatisticsVO4.setSum(ageMap.get("age45").intValue());
            ageStatisticsVO4.setPercent(ageMap.get("age45").intValue()/count);
            ageStatisticsVO5.setSum(ageMap.get("age55").intValue());
            ageStatisticsVO5.setPercent(ageMap.get("age55").intValue()/count);
            ageStatisticsVO6.setSum(ageMap.get("age55over").intValue());
            ageStatisticsVO6.setPercent(ageMap.get("age55over").intValue()/count);
        }
        agePopulationList.add(ageStatisticsVO1);
@@ -7728,12 +7736,14 @@
        IndexSpecialStatisticsVO otherSpecialVO = new IndexSpecialStatisticsVO();
        otherSpecialVO.setTitle("其他");
        otherSpecialVO.setSum(0);
        int countAll=comMngPopulationDAO.getSpecialStatisticsByLabel(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);
                    } else {
                        if (StringUtils.isNotEmpty(userTag.getTagName())) {
                            if (userTag.getTagName().equals("特扶家庭")) {