101captain
2021-12-07 e94307cfc3ffd44adcc7fd729f200e4222a97663
12/7 大屏相关
26个文件已添加
53个文件已修改
3879 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/auth/src/main/java/com/panzhihua/auth/service/impl/LoginServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/bigscreen/BigScreenEventDetailDTO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/LoginReturnVO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/StatisticsCommVO.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BaseInfo.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenActivityLine.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenActivityTop.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenCommunityStatisticsVO.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenDynStatisticsInfo.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenEasyPhotoStatisticsInfo.java 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenGridStaticsReturn.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenMerchantStatisticsInfo.java 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenMicroWishStatisticsInfo.java 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenNeighborStatisticsInfo.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenQuestionnaireStatisticsInfo.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenServiceData.java 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenServiceUser.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenStatisticPartyBuild.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigscreenGridsGovernanceStatisticsVO.java 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/GridsGovernanceStatisticsVO.java 110 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/IndexBackReserve.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/IndexDynamic.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/IndexHomeQuarantine.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/IndexInfo.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/IndexReserve.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/IndexReserveSub.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/ResidentAutonomyStatisticsVO.java 129 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/event/EventGridIncidentStatisticsVO.java 22 ●●●●● 补丁 | 查看 | 原始文档 | 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/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/common/src/main/java/com/panzhihua/common/model/vos/grid/EventGridCommunityAdminVO.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/screen/ScreenDrawEventPopulationTotalVO.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java 150 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/grid/GridService.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/BigScreenApi.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/BigScreenStatisticsApi.java 187 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/BigScreenApi.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/BigScreenStatisticsApi.java 179 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/BigScreenDAO.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDAO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDiscussDAO.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDynDAO.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActEasyPhotoDAO.java 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActMicroWishDAO.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleDAO.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActQuestnaireDAO.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActReserveMapper.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActWarehouseDonatesDao.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComPbMemberDAO.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComPropertyDao.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ConvenientMerchantDAO.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/BigScreenService.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/BigScreenStatisticsService.java 116 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActReserveService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComMngPopulationService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/BigScreenServiceImpl.java 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/BigScreenStatisticsServiceImpl.java 643 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActReserveServiceImpl.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java 197 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActDiscussDOMapper.xml 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActDynDOMapper.xml 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActEasyPhotoDOMapper.xml 183 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActMicroWishDOMapper.xml 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActNeighborCircleDOMapper.xml 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActQuestnaireDOMapper.xml 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActReserveMapper.xml 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActWarehouseDonatesMapper.xml 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComMngPopulationDOMapper.xml 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComPbMemberMapper.xml 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComPropertyMapper.xml 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ConvenientMerchantMapper.xml 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/api/BigScreenApi.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/dao/EventMapper.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/EventService.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java 176 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventMapper.xml 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/auth/src/main/java/com/panzhihua/auth/service/impl/LoginServiceImpl.java
@@ -111,6 +111,7 @@
        LoginReturnVO loginReturnVO = new LoginReturnVO();
        loginReturnVO.setToken(token);
        loginReturnVO.setRefreshToken(refeshToken);
        loginReturnVO.setCommunityId(loginUser.getCommunityId());
        return loginReturnVO;
    }
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/bigscreen/BigScreenEventDetailDTO.java
@@ -13,4 +13,7 @@
    @ApiModelProperty(value = "事件状态(1治安隐患、2公共服务、3矛盾纠纷、4不稳定因素、5突发事件、6特殊人群上报、7随手拍处理)", required = true)
    private Integer type;
    @ApiModelProperty("事件类型(1、网格事件 2、随手拍事件)")
    private Integer eventType;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/LoginReturnVO.java
@@ -17,4 +17,6 @@
    private String token;
    @ApiModelProperty("刷新token有效期长")
    private String refreshToken;
    @ApiModelProperty("communityId")
    private Long communityId;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/StatisticsCommVO.java
New file
@@ -0,0 +1,35 @@
package com.panzhihua.common.model.vos.community;
import java.math.BigDecimal;
import java.util.List;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @title: StatisticsCommVO
 * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
 * @description:
 * @author: hans
 * @date: 2021/12/06 10:51
 */
@Data
@ApiModel("统计通用信息")
public class StatisticsCommVO {
    @ApiModelProperty(value = "统计日期")
    private String statisticsDate;
    @ApiModelProperty(value = "统计项")
    private String filed;
    @ApiModelProperty(value = "数量")
    private Integer num;
    @ApiModelProperty("统计项占比")
    private BigDecimal percent;
    @ApiModelProperty("统计数据列表")
    private List<StatisticsCommVO> statisticsCommVOS;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BaseInfo.java
New file
@@ -0,0 +1,30 @@
package com.panzhihua.common.model.vos.community.bigscreen;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @author zzj
 */
@Data
@ApiModel("基础数据")
public class BaseInfo {
    @ApiModelProperty("人口数")
    private Integer population;
    @ApiModelProperty("注册用户量")
    private Integer user;
    @ApiModelProperty("入住小区")
    private Integer village;
    @ApiModelProperty("实有房屋")
    private Integer house;
    @ApiModelProperty("实有单位")
    private Integer company;
    @ApiModelProperty("党员数")
    private Integer partyMember;
    @ApiModelProperty("志愿者")
    private Integer volunteer;
    @ApiModelProperty("党组织")
    private Integer partyOrg;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenActivityLine.java
New file
@@ -0,0 +1,19 @@
package com.panzhihua.common.model.vos.community.bigscreen;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @author zzj
 */
@Data
@ApiModel("大屏党建活动折线图")
public class BigScreenActivityLine {
    @ApiModelProperty("月份")
    private String x;
    @ApiModelProperty("新增数")
    private Integer y;
    @ApiModelProperty("累计数")
    private Integer countY;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenActivityTop.java
New file
@@ -0,0 +1,21 @@
package com.panzhihua.common.model.vos.community.bigscreen;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @author zzj
 */
@Data
@ApiModel("党员积分排名")
public class BigScreenActivityTop {
    @ApiModelProperty("姓名")
    private String name;
    @ApiModelProperty("党组织名")
    private String orgName;
    @ApiModelProperty("党员分数")
    private Integer score;
    @ApiModelProperty("头像")
    private String url;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenCommunityStatisticsVO.java
New file
@@ -0,0 +1,32 @@
package com.panzhihua.common.model.vos.community.bigscreen;
import java.util.List;
import com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO;
import com.panzhihua.common.model.vos.community.screen.civil.CivilVillageStatisticsVO;
import com.panzhihua.common.model.vos.community.screen.event.EventGridStatisticsVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @title: BigScreenCommunityStatisticsVO
 * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
 * @description: 大屏社区服务统计信息
 * @author: hans
 * @date: 2021/12/10 13:16
 */
@Data
@ApiModel("大屏社区服务统计信息")
public class BigScreenCommunityStatisticsVO {
    @ApiModelProperty("大屏网格数据")
    private List<EventGridStatisticsVO> gridStatisticsList;
    @ApiModelProperty("小区列表数据")
    private List<CivilVillageStatisticsVO> villageStatisticsList;
    @ApiModelProperty("商家地图点位数据")
    private List<ConvenientMerchantVO> merchantMapDataList;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenDynStatisticsInfo.java
New file
@@ -0,0 +1,33 @@
package com.panzhihua.common.model.vos.community.bigscreen;
import java.util.List;
import com.panzhihua.common.model.vos.community.StatisticsCommVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @title: BigScreenDynStatisticsInfo
 * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
 * @description: 社区动态大屏统计数据
 * @author: hans
 * @date: 2021/12/17 10:19
 */
@Data
@ApiModel("社区动态大屏统计数据")
public class BigScreenDynStatisticsInfo {
    @ApiModelProperty("社区动态总数")
    private Integer dynNum = 0;
    @ApiModelProperty(value = "社区动态饼图数据")
    private List<StatisticsCommVO> dynCircleData;
    @ApiModelProperty(value = "社区动态新增折线数据")
    private List<StatisticsCommVO> dynAddPolylineData;
    @ApiModelProperty(value = "社区动态累计折线数据")
    private List<StatisticsCommVO> dynTotalPolylineData;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenEasyPhotoStatisticsInfo.java
New file
@@ -0,0 +1,51 @@
package com.panzhihua.common.model.vos.community.bigscreen;
import java.util.List;
import com.panzhihua.common.model.vos.community.StatisticsCommVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @title: BigScreenEasyPhotoStatisticsInfo
 * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
 * @description: 随手拍大屏统计数据
 * @author: hans
 * @date: 2021/12/16 13:31
 */
@Data
@ApiModel("随手拍大屏统计数据")
public class BigScreenEasyPhotoStatisticsInfo {
    @ApiModelProperty("随手拍累计解决数量")
    private Integer eventDealTotal = 0;
    @ApiModelProperty("突发事件报告解决数")
    private Integer eventTFDeal = 0;
    @ApiModelProperty("治安防控事件解决数")
    private Integer eventZADeal = 0;
    @ApiModelProperty("矛盾劝解事件解决数")
    private Integer eventMDDeal = 0;
    @ApiModelProperty("特殊人群服务事件解决数")
    private Integer eventTSDeal = 0;
    @ApiModelProperty("民生服务事件解决数")
    private Integer eventMSDeal = 0;
    @ApiModelProperty("防灾减灾事件解决数")
    private Integer eventFJDeal = 0;
    @ApiModelProperty("其他事件解决数")
    private Integer otherDeal = 0;
    @ApiModelProperty(value = "随手拍新增折线数据")
    private List<StatisticsCommVO> easyPhotoAddPolylineData;
    @ApiModelProperty(value = "随手拍累计折线数据")
    private List<StatisticsCommVO> easyPhotoTotalPolylineData;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenGridStaticsReturn.java
New file
@@ -0,0 +1,17 @@
package com.panzhihua.common.model.vos.community.bigscreen;
import lombok.Data;
import java.util.List;
/**
 * @author zzj
 */
@Data
public class BigScreenGridStaticsReturn {
    private Integer count;
    private Integer num;
    private Integer percent;
    private String title;
    private List<BigScreenGridStaticsReturn> bigScreenGridStaticsReturnList;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenMerchantStatisticsInfo.java
New file
@@ -0,0 +1,45 @@
package com.panzhihua.common.model.vos.community.bigscreen;
import java.util.List;
import com.panzhihua.common.model.vos.community.StatisticsCommVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @title: BigScreenMerchantStatisticsInfo
 * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
 * @description: 便民商家大屏统计数据
 * @author: hans
 * @date: 2021/12/17 15:05
 */
@Data
@ApiModel("便民商家大屏统计数据")
public class BigScreenMerchantStatisticsInfo {
    @ApiModelProperty("资源类型数")
    private Integer resourceTypeNum = 0;
    @ApiModelProperty("服务类型数")
    private Integer serviceTypeNum = 0;
    @ApiModelProperty("商家数量")
    private Integer merchantNum = 0;
    @ApiModelProperty("已提供服务次数")
    private Integer serviceTimes = 0;
    @ApiModelProperty(value = "资源类型饼图数据")
    private List<StatisticsCommVO> resourceTypeCircleData;
    @ApiModelProperty(value = "服务类型饼图数据")
    private List<StatisticsCommVO> serviceTypeCircleData;
    @ApiModelProperty(value = "服务量新增折线数据")
    private List<StatisticsCommVO> serviceTimesAddPolylineData;
    @ApiModelProperty(value = "服务量累计折线数据")
    private List<StatisticsCommVO> serviceTimesTotalPolylineData;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenMicroWishStatisticsInfo.java
New file
@@ -0,0 +1,40 @@
package com.panzhihua.common.model.vos.community.bigscreen;
import java.util.List;
import com.panzhihua.common.model.vos.community.ComActMicroWishVO;
import com.panzhihua.common.model.vos.community.StatisticsCommVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @title: BigScreenMicroWishStatisticsInfo
 * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
 * @description: 微心愿大屏统计数据
 * @author: hans
 * @date: 2021/12/15 16:56
 */
@Data
@ApiModel("微心愿大屏统计数据")
public class BigScreenMicroWishStatisticsInfo {
    @ApiModelProperty("心愿总数量")
    private Integer microWishTotal;
    @ApiModelProperty("心愿已实现数量")
    private Integer microWishRealized;
    @ApiModelProperty("心愿未实现数量")
    private Integer microWishUnrealized;
    @ApiModelProperty(value = "微心愿新增折线数据")
    private List<StatisticsCommVO> microWishAddPolylineData;
    @ApiModelProperty(value = "微心愿累计折线数据")
    private List<StatisticsCommVO> microWishTotalPolylineData;
    @ApiModelProperty(value = "微心愿展示列表")
    private List<ComActMicroWishVO> microWishDisplayList;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenNeighborStatisticsInfo.java
New file
@@ -0,0 +1,36 @@
package com.panzhihua.common.model.vos.community.bigscreen;
import java.util.List;
import com.panzhihua.common.model.vos.community.StatisticsCommVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @title: BigScreenNeighborStatisticsInfo
 * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
 * @description: 邻里圈大屏统计数据
 * @author: hans
 * @date: 2021/12/17 13:19
 */
@Data
@ApiModel("邻里圈大屏统计数据")
public class BigScreenNeighborStatisticsInfo {
    @ApiModelProperty("邻里圈发布内容数")
    private Integer publishContentNum = 0;
    @ApiModelProperty("邻里圈发布话题数")
    private Integer publishTopicNum = 0;
    @ApiModelProperty(value = "邻里圈饼图数据")
    private List<StatisticsCommVO> neighborCircleData;
    @ApiModelProperty(value = "邻里圈新增折线数据")
    private List<StatisticsCommVO> neighborAddPolylineData;
    @ApiModelProperty(value = "邻里圈累计折线数据")
    private List<StatisticsCommVO> neighborTotalPolylineData;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenQuestionnaireStatisticsInfo.java
New file
@@ -0,0 +1,37 @@
package com.panzhihua.common.model.vos.community.bigscreen;
import java.util.List;
import com.panzhihua.common.model.vos.community.ComActQuestnaireVO;
import com.panzhihua.common.model.vos.community.StatisticsCommVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @title: BigScreenQuestionnaireStatisticsInfo
 * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
 * @description: 社区问卷大屏统计数据
 * @author: hans
 * @date: 2021/12/16 16:11
 */
@Data
@ApiModel("社区问卷大屏统计数据")
public class BigScreenQuestionnaireStatisticsInfo {
    @ApiModelProperty("社区问卷发起总数")
    private Integer questionnaireNum = 0;
    @ApiModelProperty("社区问卷参与人数")
    private Integer joinNum = 0;
    @ApiModelProperty(value = "社区问卷新增折线数据")
    private List<StatisticsCommVO> questionnaireAddPolylineData;
    @ApiModelProperty(value = "社区问卷累计折线数据")
    private List<StatisticsCommVO> questionnaireTotalPolylineData;
    @ApiModelProperty(value = "社区问卷展示列表")
    private List<ComActQuestnaireVO> questionnaireDisplayList;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenServiceData.java
New file
@@ -0,0 +1,41 @@
package com.panzhihua.common.model.vos.community.bigscreen;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @author zzj
 */
@Data
@ApiModel("服务数据")
public class BigScreenServiceData {
    @ApiModelProperty("办事指南")
    private Integer guide;
    @ApiModelProperty("通知公告")
    private Integer announcement;
    @ApiModelProperty("高龄认证")
    private Integer eldersAuth;
    @ApiModelProperty("便民商家")
    private Integer convenient;
    @ApiModelProperty("房屋租赁")
    private Integer rentingHouse;
    @ApiModelProperty("一键服务")
    private Integer oneButton;
    @ApiModelProperty("社区工作者")
    private Integer socialWorker = 0;
    @ApiModelProperty("养老认证")
    private Integer pensionAuth;
    @ApiModelProperty("逝世申报")
    private Integer death=0;
    @ApiModelProperty("高龄补贴")
    private Integer eldersAllowance=0;
    @ApiModelProperty("服务咨询")
    private Integer serviceConsultation=0;
    @ApiModelProperty("政策文件")
    private Integer partyDyn;
    @ApiModelProperty("便民设施")
    private Integer equipment=0;
    @ApiModelProperty("物业公司")
    private Integer property;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenServiceUser.java
New file
@@ -0,0 +1,17 @@
package com.panzhihua.common.model.vos.community.bigscreen;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @author zzj
 */
@Data
@ApiModel("服务居民")
public class BigScreenServiceUser {
    @ApiModelProperty("小区名")
    private String villageName;
    @ApiModelProperty("人数")
    private Integer num;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenStatisticPartyBuild.java
@@ -21,5 +21,10 @@
    private Integer activityCount;
    @ApiModelProperty(value = "党建宣传数")
    private Integer dynCount;// 党建动态
    @ApiModelProperty(value = "社区党委")
    private Integer committeeCount;
    @ApiModelProperty("覆盖率")
    private Integer coverPercent=0;
    @ApiModelProperty("单位党组织")
    private Integer orgPartyCount=0;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigscreenGridsGovernanceStatisticsVO.java
New file
@@ -0,0 +1,55 @@
package com.panzhihua.common.model.vos.community.bigscreen;
import com.panzhihua.common.model.vos.community.StatisticsCommVO;
import com.panzhihua.common.model.vos.community.screen.civil.CivilVillageStatisticsVO;
import com.panzhihua.common.model.vos.community.screen.event.EventGridIncidentStatisticsVO;
import com.panzhihua.common.model.vos.community.screen.event.EventGridStatisticsVO;
import com.panzhihua.common.model.vos.screen.ScreenDrawEventPopulationTotalVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
 * @title: GridsGovernanceStatisticsVO
 * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
 * @description: 清网治格统计信息
 * @author: hans
 * @date: 2021/12/08 14:38
 */
@Data
@ApiModel("清网治格统计信息")
public class BigscreenGridsGovernanceStatisticsVO {
    @ApiModelProperty("事件总数")
    private Integer eventTotal = 0;
    @ApiModelProperty("突发事件报告总数")
    private Integer eventTFTotal = 0;
    @ApiModelProperty("治安防控事件总数")
    private Integer eventZATotal = 0;
    @ApiModelProperty("矛盾劝解事件总数")
    private Integer eventMDTotal = 0;
    @ApiModelProperty("特殊人群服务事件总数")
    private Integer eventTSTotal = 0;
    @ApiModelProperty("民生服务事件总数")
    private Integer eventMSTotal = 0;
    @ApiModelProperty("防灾减灾事件总数")
    private Integer eventFJTotal = 0;
    @ApiModelProperty("法规宣传事件总数")
    private Integer eventFGTotal = 0;
    @ApiModelProperty("安全巡查")
    private Integer safety=0;
    @ApiModelProperty("其他事件总数")
    private Integer otherTotal = 0;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/GridsGovernanceStatisticsVO.java
New file
@@ -0,0 +1,110 @@
package com.panzhihua.common.model.vos.community.bigscreen;
import com.panzhihua.common.model.vos.community.StatisticsCommVO;
import com.panzhihua.common.model.vos.community.screen.civil.CivilVillageStatisticsVO;
import com.panzhihua.common.model.vos.community.screen.event.EventGridIncidentStatisticsVO;
import com.panzhihua.common.model.vos.community.screen.event.EventGridStatisticsVO;
import com.panzhihua.common.model.vos.screen.ScreenDrawEventPopulationTotalVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
 * @title: GridsGovernanceStatisticsVO
 * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
 * @description: 清网治格统计信息
 * @author: hans
 * @date: 2021/12/08 14:38
 */
@Data
@ApiModel("清网治格统计信息")
public class GridsGovernanceStatisticsVO {
    @ApiModelProperty("事件总数")
    private Integer eventTotal = 0;
    @ApiModelProperty("已处理事件总数")
    private Integer dealTotal = 0;
    @ApiModelProperty("待处理事件总数")
    private Integer unDealTotal = 0;
    @ApiModelProperty("突发事件报告总数")
    private Integer eventTFTotal = 0;
    @ApiModelProperty("治安防控事件总数")
    private Integer eventZATotal = 0;
    @ApiModelProperty("矛盾劝解事件总数")
    private Integer eventMDTotal = 0;
    @ApiModelProperty("特殊人群服务事件总数")
    private Integer eventTSTotal = 0;
    @ApiModelProperty("民生服务事件总数")
    private Integer eventMSTotal = 0;
    @ApiModelProperty("防灾减灾事件总数")
    private Integer eventFJTotal = 0;
    @ApiModelProperty("其他事件总数")
    private Integer otherTotal = 0;
    @ApiModelProperty("突发事件报告完成数")
    private Integer eventTFDeal = 0;
    @ApiModelProperty("治安防控事件完成数")
    private Integer eventZADeal = 0;
    @ApiModelProperty("矛盾劝解事件完成数")
    private Integer eventMDDeal = 0;
    @ApiModelProperty("特殊人群服务事件完成数")
    private Integer eventTSDeal = 0;
    @ApiModelProperty("民生服务事件完成数")
    private Integer eventMSDeal = 0;
    @ApiModelProperty("防灾减灾事件完成数")
    private Integer eventFJDeal = 0;
    @ApiModelProperty("其他事件完成数")
    private Integer otherDeal = 0;
    @ApiModelProperty("网格数")
    private Integer gridTotal = 0;
    @ApiModelProperty("调解员")
    private Integer gridMemberTotal = 0;
    @ApiModelProperty("大屏网格数据")
    private List<EventGridStatisticsVO> gridStatisticsList;
    @ApiModelProperty("小区列表数据")
    private List<CivilVillageStatisticsVO> villageStatisticsList;
    @ApiModelProperty("社区事件数据")
    private List<EventGridIncidentStatisticsVO> gridIncidentList;
    @ApiModelProperty("人口统计")
    private ScreenDrawEventPopulationTotalVO drawEventPopulationTotalVO;
    @ApiModelProperty("年龄段统计")
    private List<StatisticsCommVO> ageGroupStatistics;
    @ApiModelProperty("事件分析新增折线数据")
    private List<StatisticsCommVO> eventAddPolylineData;
    @ApiModelProperty("事件分析累计折线数据")
    private List<StatisticsCommVO> eventTotalPolylineData;
    public void generateStatisticsData() {
        this.eventTotal = this.eventTFTotal + this.eventZATotal + this.eventMDTotal +
                this.eventTSTotal + this.eventMSTotal + this.eventFJTotal + this.otherTotal;
        this.dealTotal = this.eventTFDeal + this.eventZADeal + this.eventMDDeal +
                this.eventTSDeal + this.eventMSDeal + this.eventFJDeal + this.otherDeal;
        this.unDealTotal = this.eventTotal - this.dealTotal;
    }
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/IndexBackReserve.java
New file
@@ -0,0 +1,19 @@
package com.panzhihua.common.model.vos.community.bigscreen;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
 * @author zzj
 */
@Data
@ApiModel("返攀登记数据")
public class IndexBackReserve {
    @ApiModelProperty("总数")
    private Integer count;
    @ApiModelProperty("标题数量")
    private List<IndexReserveSub> indexReserveSubList;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/IndexDynamic.java
New file
@@ -0,0 +1,31 @@
package com.panzhihua.common.model.vos.community.bigscreen;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @author zzj
 */
@Data
@ApiModel("首页业务模块统计")
public class IndexDynamic {
    @ApiModelProperty("微心愿")
    private Integer microWish;
    @ApiModelProperty("随手拍")
    private Integer easyPhoto;
    @ApiModelProperty("居民活动")
    private Integer residentActivity=0;
    @ApiModelProperty("志愿服务")
    private Integer volunteerActivity=0;
    @ApiModelProperty("党员活动")
    private Integer partyActivity;
    @ApiModelProperty("社区问卷")
    private Integer questionnaire;
    @ApiModelProperty("社区动态")
    private Integer dynamic;
    @ApiModelProperty("邻里圈")
    private Integer neighbor;
    @ApiModelProperty("便民商家")
    private Integer convenient;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/IndexHomeQuarantine.java
New file
@@ -0,0 +1,19 @@
package com.panzhihua.common.model.vos.community.bigscreen;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
 * @author zzj
 */
@Data
@ApiModel("居家隔离数据")
public class IndexHomeQuarantine {
    @ApiModelProperty("总数")
    private Integer count;
    @ApiModelProperty("标题数量")
    private List<IndexReserveSub> indexReserveSubList;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/IndexInfo.java
New file
@@ -0,0 +1,32 @@
package com.panzhihua.common.model.vos.community.bigscreen;
import com.panzhihua.common.model.vos.community.screen.index.IndexEventGridStatisticsVO;
import com.panzhihua.common.model.vos.community.screen.index.IndexPopulationStatisticsVO;
import com.panzhihua.common.model.vos.community.screen.index.IndexSpecialStatisticsVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
 * @author zzj
 */
@Data
@ApiModel("大屏首页返回数据")
public class IndexInfo {
    @ApiModelProperty("基础数据")
    private BaseInfo baseInfo;
    @ApiModelProperty("实有人口数据")
    private IndexPopulationStatisticsVO indexPopulationStatisticsVO;
    @ApiModelProperty("特殊人群统计模块数据")
    private List<IndexSpecialStatisticsVO> specialStatisticsVOList;
    @ApiModelProperty("网格化治理模块数据")
    private IndexEventGridStatisticsVO eventGridStatisticsVO;
    @ApiModelProperty("返攀登记居家隔离数据统计")
    private IndexReserve indexReserve;
    @ApiModelProperty("业务统计")
    private IndexDynamic indexDynamic;
    @ApiModelProperty("杨戬要求修改")
    private BigScreenGridStaticsReturn bigScreenGridStaticsReturn;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/IndexReserve.java
New file
@@ -0,0 +1,17 @@
package com.panzhihua.common.model.vos.community.bigscreen;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @author zzj
 */
@Data
@ApiModel("返攀登记居家隔离数据")
public class IndexReserve {
    @ApiModelProperty("返攀登记数据")
    private IndexBackReserve indexBackReserve;
    @ApiModelProperty("居家隔离数据")
    private IndexHomeQuarantine indexHomeQuarantine;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/IndexReserveSub.java
New file
@@ -0,0 +1,25 @@
package com.panzhihua.common.model.vos.community.bigscreen;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @author zzj
 */
@Data
@ApiModel("返攀登记居家隔离数据标题数量")
public class IndexReserveSub {
    @ApiModelProperty("标题值")
    private Integer key;
    @ApiModelProperty("数量")
    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/bigscreen/ResidentAutonomyStatisticsVO.java
New file
@@ -0,0 +1,129 @@
package com.panzhihua.common.model.vos.community.bigscreen;
import java.math.BigDecimal;
import java.util.List;
import com.panzhihua.common.model.vos.community.StatisticsCommVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @title: ResidentAutonomyStatisticsVO
 * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
 * @description: 居民自治统计信息
 * @author: hans
 * @date: 2021/12/06 14:27
 */
@Data
@ApiModel("居民自治统计信息")
public class ResidentAutonomyStatisticsVO {
    @ApiModelProperty(value = "随手拍本月总数")
    private Integer easyPhotoCurrentMonCount;
    @ApiModelProperty(value = "随手拍总数")
    private Integer easyPhotoTotalCount;
    @ApiModelProperty(value = "随手拍分类柱状统计")
    private List<StatisticsCommVO> easyPhotoHistogram;
    @ApiModelProperty(value = "微心愿本月总数")
    private Integer microWishCurrentMonCount;
    @ApiModelProperty(value = "集心池")
    private Integer aimNum;
    @ApiModelProperty(value = "微心愿总数")
    private Integer microWishTotal;
    @ApiModelProperty(value = "微心愿待实现&已实现数目及占比")
    private List<StatisticsCommVO> microWishRealizePercent;
    @ApiModelProperty(value = "微心愿图片")
    private List<String> microWishImages;
    @ApiModelProperty(value = "业主委员会本月总数")
    private Integer committeeCurrentMonCount;
    @ApiModelProperty(value = "业主委员会总数")
    private Integer committeeTotal;
    @ApiModelProperty(value = "业主委员会小区覆盖率")
    private BigDecimal areaCoverPercent;
    @ApiModelProperty(value = "议事投票本月总数")
    private Integer discussCurrentMonCount;
    @ApiModelProperty(value = "议事投票总数")
    private Integer discussTotal;
    @ApiModelProperty(value = "议事参与人总数")
    private Integer discussCount;
    @ApiModelProperty(value = "投票参与人总数")
    private Integer voteCount;
    @ApiModelProperty(value = "议事标题")
    private List<String> discussTitles;
    @ApiModelProperty(value = "投票标题")
    private List<String> voteTitles;
    @ApiModelProperty(value = "议事投票类型占比")
    private List<StatisticsCommVO> discussTypePercent;
    @ApiModelProperty(value = "邻里圈本月总数")
    private Integer neighborCurrentMonCount;
    @ApiModelProperty(value = "邻里圈总数")
    private Integer neighborTotal;
    @ApiModelProperty(value = "邻里圈点赞量")
    private Integer neighborFabulousNum;
    @ApiModelProperty(value = "邻里圈分享量")
    private Integer neighborForwardNum;
    @ApiModelProperty(value = "邻里圈评论量")
    private Integer neighborCommentNum;
    @ApiModelProperty(value = "邻里圈图片")
    private List<String> neighborImages;
    @ApiModelProperty(value = "邻里圈文本内容")
    private List<String> neighborContents;
    @ApiModelProperty(value = "报事报修本月总数")
    private Integer repairCurrentMonCount;
    @ApiModelProperty(value = "报事报修总数")
    private Integer repairTotal;
    @ApiModelProperty(value = "报事报修新增折线数据")
    private List<StatisticsCommVO> repairAddPolylineData;
    @ApiModelProperty(value = "报事报修累计折线数据")
    private List<StatisticsCommVO> repairTotalPolylineData;
    @ApiModelProperty(value = "爱心义仓本月总数")
    private Integer warehouseCurrentMonCount;
    @ApiModelProperty(value = "爱心义仓总捐赠数")
    private Integer warehouseTotal;
    @ApiModelProperty(value = "爱心义仓剩余物品数")
    private Integer warehouseSurplusTotal;
    @ApiModelProperty(value = "爱心义仓已领取物品数")
    private Integer warehouseApplyTotal;
    @ApiModelProperty(value = "爱心义仓捐赠记录")
    private List<String> warehouseDonateRecords;
    @ApiModelProperty(value = "爱心义仓爱心传递")
    private List<String> warehouseLoveTransfer;
    @ApiModelProperty(value = "爱心义仓捐赠物品图片")
    private List<String> warehouseImages;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/event/EventGridIncidentStatisticsVO.java
@@ -7,6 +7,8 @@
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
@Data
@ApiModel("大屏网格下事件统计返回参数")
public class EventGridIncidentStatisticsVO {
@@ -15,13 +17,29 @@
    @JsonSerialize(using = ToStringSerializer.class)
    private Long eventId;
    @ApiModelProperty("事件状态(1治安隐患、2公共服务、3矛盾纠纷、4不稳定因素、5突发事件、6特殊人群上报、7随手拍处理)")
//    旧版参照@ApiModelProperty("事件状态(1治安隐患、2公共服务、3矛盾纠纷、4不稳定因素、5突发事件、6特殊人群上报、7随手拍处理)")
    /**
     * type不代表网格类型
     */
    @ApiModelProperty("事件状态(1治安防控、2民生服务、3矛盾劝解、4不稳定因素、5突发事件报告、6特殊人群服务、9防灾减灾、10其他)")
    private Integer type;
    @ApiModelProperty("事件类型(1、网格事件 2、随手拍事件)")
    private Integer eventType;
    @ApiModelProperty("事件发生经纬度")
    private String latLng;
    @ApiModelProperty("处理状态")
    @ApiModelProperty("事件内容")
    private String content;
    @ApiModelProperty("事件封面")
    private String cover;
    @ApiModelProperty("处理状态(1.已处理 2.待处理)")
    private Integer status;
    @ApiModelProperty("事件创建时间")
    private Date createAt;
}
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/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 Integer 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/common/src/main/java/com/panzhihua/common/model/vos/grid/EventGridCommunityAdminVO.java
@@ -14,6 +14,13 @@
    @ApiModelProperty(value = "社区id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long communityId;
    @ApiModelProperty(value = "社区名称")
    private String name;
    @ApiModelProperty(value = "经度")
    private String lng;
    @ApiModelProperty(value = "维度")
    private String lat;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/screen/ScreenDrawEventPopulationTotalVO.java
@@ -53,4 +53,46 @@
    @ApiModelProperty("网格员")
    private Integer WGYTotal = 6;
    @ApiModelProperty("总户数")
    private Integer houseTotal = 0;
    @ApiModelProperty("残疾人")
    private Integer disabilityTotal = 0;
    @ApiModelProperty("低保户")
    private Integer lowSecurityTotal = 0;
    @ApiModelProperty("高龄老人")
    private Integer elderTotal = 0;
    @ApiModelProperty("特殊情况")
    private Integer specialSituationTotal = 0;
    @ApiModelProperty("其他")
    private Integer otherTotal = 0;
    @ApiModelProperty("特扶家庭")
    private Integer specialHelpTotal = 0;
    @ApiModelProperty("退役军人")
    private Integer veteransTotal = 0;
    @ApiModelProperty("老年人")
    private Integer oldTotal = 0;
    @ApiModelProperty("养老人员")
    private Integer pensionTotal = 0;
    @ApiModelProperty("出租房源")
    private Integer rentingHouseTotal = 0;
    @ApiModelProperty("社会工作者")
    private Integer socialWorkerTotal = 0;
    @ApiModelProperty("志愿者")
    private Integer volunteerTotal = 0;
    @ApiModelProperty("平均年龄")
    private Integer averageAge = 0;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -7491,4 +7491,154 @@
    @GetMapping("/rentingHourseRegister/updateAllHouseUnionAppCode")
    @Async
    void updateAllHouseUnionAppCode();
    /**
     * 党员活动折线图
     * @param communityId
     * @return
     */
    @GetMapping("/bigscreen/party/partyActivityLine")
    R partyActivityLine(@RequestParam("communityId")Long communityId);
    /**
     * 党员积分前3
     * @param communityId
     * @return
     */
    @GetMapping("/bigscreen/party/partyActivityTop")
    R partyActivityTop(@RequestParam("communityId")Long communityId);
    /**
     * 社区服务大屏数据分析接口
     */
    @GetMapping("/screen/serviceData")
    R serviceData(@RequestParam("communityId")Long communityId);
    /**
     * 服务居民接口
     */
    @GetMapping("/screen/serviceUser")
    R serviceUser(@RequestParam("communityId") Long communityId);
    /**
     * 大数据分析平台-居民自治
     * @param communityId
     * @return
     */
    @GetMapping("/screen/resident/autonomy")
    R getResidentAutonomy(@RequestParam("communityId") Long communityId);
    /**
     * 大数据分析平台-清网治格
     * @param communityId
     * @return
     */
    @GetMapping("/screen/grids/governance")
    R getGridsGovernance(@RequestParam("communityId") Long communityId);
    /**
     * 大数据分析平台-社区服务
     * @param communityId
     * @return
     */
    @GetMapping("/screen/community/service")
    R getCommunityServiceStatistics(@RequestParam("communityId") Long communityId);
    /**
     * 分页获取热度排行商家
     * @param pagePopularMerchantDTO
     * @return
     */
    @PostMapping("/screen/merchant/popular")
    R getScreenPopularMerchants(@RequestBody PagePopularMerchantDTO pagePopularMerchantDTO);
    /**
     * 新版大屏首页接口
     */
    @GetMapping("/screen/indexInfo")
    R indexInfo(@RequestParam("communityId") Long communityId);
    /**
     * 首页二级页面-微心愿
     * @param communityId
     * @return
     */
    @GetMapping("/screen/index/microWish")
    R indexMicroWish(@RequestParam("communityId") Long communityId);
    /**
     * 首页二级页面-随手拍
     * @param communityId
     * @return
     */
    @GetMapping("/screen/index/easyPhoto")
    R indexEasyPhoto(@RequestParam("communityId") Long communityId);
    /**
     * 首页二级页面-随手拍展示列表
     * @param communityId
     * @param classifyId
     * @return
     */
    @GetMapping("/screen/index/easyPhotoList")
    R indexEasyPhotoList(@RequestParam("communityId") Long communityId, @RequestParam(value = "classifyId", required = false) Long classifyId);
    /**
     * 首页二级页面-社区问卷
     * @param communityId
     * @return
     */
    @GetMapping("/screen/index/questionnaire")
    R indexQuestionnaire(@RequestParam("communityId") Long communityId);
    /**
     * 首页二级页面-社区动态
     * @param communityId
     * @return
     */
    @GetMapping("/screen/index/dyn")
    R indexDyn(@RequestParam("communityId") Long communityId);
    /**
     * 首页二级页面-社区动态展示列表
     * @param communityId
     * @param type
     * @return
     */
    @GetMapping("/screen/index/dynList")
    R indexDynList(@RequestParam("communityId") Long communityId, @RequestParam(value = "type", required = false) Long type);
    /**
     * 首页二级页面-邻里圈
     * @param communityId
     * @return
     */
    @GetMapping("/screen/index/neighbor")
    R indexNeighbor(@RequestParam("communityId") Long communityId);
    /**
     * 首页二级页面-邻里圈展示列表
     * @param communityId
     * @param topicId
     * @return
     */
    @GetMapping("/screen/index/neighborList")
    R indexNeighborList(@RequestParam("communityId") Long communityId, @RequestParam(value = "topicId", required = false) Long topicId);
    /**
     * 首页二级页面-便民商家
     * @param communityId
     * @return
     */
    @GetMapping("/screen/index/merchant")
    R indexMerchant(@RequestParam("communityId") Long communityId);
    /**
     * 首页二级页面-商家展示列表
     * @param communityId
     * @param categoryId
     * @return
     */
    @GetMapping("/screen/index/merchantList")
    R indexMerchantList(@RequestParam("communityId") Long communityId, @RequestParam(value = "categoryId", required = false) Long categoryId);
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/grid/GridService.java
@@ -1320,6 +1320,14 @@
    R getCivilDrawList(@RequestBody ScreenDrawEventListDTO eventListDTO);
    /**
     * 新版绘制多边形统计数据
     * @param eventListDTO
     * @return
     */
    @PostMapping("/screen/getCivilDrawListNew")
    R getCivilDrawListNew(@RequestBody ScreenDrawEventListDTO eventListDTO);
    /**
     * 大屏-根据小区id查询小区统计人数
     * 
     * @param villageId
@@ -1353,4 +1361,14 @@
     */
    @GetMapping("/screen/member/trajectory")
    R getGridsMemberTrajectory(@RequestParam("communityId") Long communityId);
    /**
     * 大屏-新根据小区id查询小区统计人数
     *
     * @param villageId
     *            小区id
     * @return 小区统计数据
     */
    @GetMapping("/screen/village/statistics-new")
    R civilVillageStatisticsNew(@RequestParam("villageId") Long villageId);
}
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/BigScreenApi.java
@@ -134,4 +134,24 @@
        pagePartyOrganizationVO.setCommunityId(id);
        return partyBuildingService.pagePartyOrganization(pagePartyOrganizationVO);
    }
    /**
     * 党员活动折线图
     * @return
     */
    @ApiOperation(value = "党员活动折线图", response = BigScreenActivityLine.class)
    @GetMapping("/partyActivityLine")
    public R partyActivityLine(){
        return communityService.partyActivityLine(this.getCommunityId());
    }
    /**
     * 党员积分前3
     * @return
     */
    @ApiOperation(value = "党员积分前3", response = BigScreenActivityTop.class)
    @GetMapping("/partyActivityTop")
    public R partyActivityTop(){
        return communityService.partyActivityTop(this.getCommunityId());
    }
}
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/BigScreenStatisticsApi.java
@@ -1,14 +1,23 @@
package com.panzhihua.community_backstage.api;
import javax.annotation.Resource;
import javax.validation.Valid;
import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.panzhihua.common.constants.HttpConstant;
import com.panzhihua.common.model.dtos.community.convenient.PagePopularMerchantDTO;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.community.ComActDynVO;
import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO;
import com.panzhihua.common.model.vos.community.ComActQuestnaireVO;
import com.panzhihua.common.model.vos.community.bigscreen.*;
import com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO;
import com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleAdminVO;
import com.panzhihua.common.utlis.HttpClientUtil;
import com.panzhihua.common.utlis.HttpUtils;
import io.swagger.annotations.ApiImplicitParam;
import org.springframework.web.bind.annotation.*;
import com.panzhihua.common.controller.BaseController;
@@ -182,7 +191,185 @@
        return gridService.getGridsMemberTrajectory(communityId);
    }
    /**
     * 新版大屏首页接口
     */
    @ApiOperation(value = "新版大屏首页接口", response = IndexInfo.class)
    @GetMapping("/indexInfo")
    public R indexInfo(){
        return communityService.indexInfo(this.getCommunityId());
    }
    /**
     * 首页二级页面-微心愿
     */
    @ApiOperation(value = "首页二级页面-微心愿", response = BigScreenMicroWishStatisticsInfo.class)
    @GetMapping("/index/microWish")
    public R indexMicroWish() {
        return communityService.indexMicroWish(this.getCommunityId());
    }
    /**
     * 首页二级页面-随手拍
     */
    @ApiOperation(value = "首页二级页面-随手拍", response = BigScreenEasyPhotoStatisticsInfo.class)
    @GetMapping("/index/easyPhoto")
    public R indexEasyPhoto() {
        return communityService.indexEasyPhoto(this.getCommunityId());
    }
    /**
     * 首页二级页面-随手拍展示列表
     */
    @ApiOperation(value = "首页二级页面-随手拍展示列表", response = ComActEasyPhotoVO.class)
    @ApiImplicitParam(name = "classifyId", value = "随手拍分类id(全部则不传)", required = false)
    @GetMapping("/index/easyPhotoList")
    public R indexEasyPhotoList(@RequestParam(value = "classifyId", required = false) Long classifyId) {
        return communityService.indexEasyPhotoList(this.getCommunityId(), classifyId);
    }
    /**
     * 首页二级页面-社区问卷
     */
    @ApiOperation(value = "首页二级页面-社区问卷", response = BigScreenQuestionnaireStatisticsInfo.class)
    @GetMapping("/index/questionnaire")
    public R indexQuestionnaire() {
        return communityService.indexQuestionnaire(this.getCommunityId());
    }
    /**
     * 首页二级页面-社区动态
     */
    @ApiOperation(value = "首页二级页面-社区动态", response = BigScreenDynStatisticsInfo.class)
    @GetMapping("/index/dyn")
    public R indexDyn() {
        return communityService.indexDyn(this.getCommunityId());
    }
    /**
     * 首页二级页面-社区动态展示列表
     */
    @ApiOperation(value = "首页二级页面-社区动态展示列表", response = ComActDynVO.class)
    @ApiImplicitParam(name = "type", value = "社区动态分类id(全部则不传)", required = false)
    @GetMapping("/index/dynList")
    public R indexDynList(@RequestParam(value = "type", required = false) Long type) {
        return communityService.indexDynList(this.getCommunityId(), type);
    }
    /**
     * 首页二级页面-邻里圈
     */
    @ApiOperation(value = "首页二级页面-邻里圈", response = BigScreenNeighborStatisticsInfo.class)
    @GetMapping("/index/neighbor")
    public R indexNeighbor() {
        return communityService.indexNeighbor(this.getCommunityId());
    }
    /**
     * 首页二级页面-邻里圈展示列表
     */
    @ApiOperation(value = "首页二级页面-邻里圈展示列表", response = ComActNeighborCircleAdminVO.class)
    @ApiImplicitParam(name = "topicId", value = "邻里圈话题id(全部则不传)", required = false)
    @GetMapping("/index/neighborList")
    public R indexNeighborList(@RequestParam(value = "topicId", required = false) Long topicId) {
        return communityService.indexNeighborList(this.getCommunityId(), topicId);
    }
    /**
     * 首页二级页面-便民商家
     */
    @ApiOperation(value = "首页二级页面-便民商家", response = BigScreenMerchantStatisticsInfo.class)
    @GetMapping("/index/merchant")
    public R indexMerchant() {
        return communityService.indexMerchant(this.getCommunityId());
    }
    /**
     * 首页二级页面-商家展示列表
     */
    @ApiOperation(value = "首页二级页面-商家展示列表", response = ConvenientMerchantVO.class)
    @ApiImplicitParam(name = "categoryId", value = "服务分类id(全部则不传)", required = false)
    @GetMapping("/index/merchantList")
    public R indexMerchantList(@RequestParam(value = "categoryId", required = false) Long categoryId) {
        return communityService.indexMerchantList(this.getCommunityId(), categoryId);
    }
    /**
     * 社区服务大屏数据分析接口
     */
    @ApiOperation(value = "社区服务大屏数据分析接口", response = BigScreenServiceData.class)
    @GetMapping("/serviceData")
    public R serviceData(){
        return this.communityService.serviceData(this.getCommunityId());
    }
    /**
     * 服务居民接口
     */
    @ApiOperation(value = "社区服务大屏服务居民接口", response = BigScreenServiceUser.class)
    @GetMapping("/serviceUser")
    public R serviceUser(){
        return this.communityService.serviceUser(this.getCommunityId());
    }
    @ApiOperation(value = "大数据分析平台-居民自治", response = ResidentAutonomyStatisticsVO.class)
    @GetMapping("/resident/autonomy")
    public R getResidentAutonomy() {
        Long communityId = this.getCommunityId();
        if (communityId == null) {
            return R.fail(401, "请先登录");
        }
        return communityService.getResidentAutonomy(communityId);
    }
    @ApiOperation(value = "大数据分析平台-清网治格", response = GridsGovernanceStatisticsVO.class)
    @GetMapping("/grids/governance")
    public R getGridsGovernance() {
        Long communityId = this.getCommunityId();
        if (communityId == null) {
            return R.fail(401, "请先登录");
        }
        return communityService.getGridsGovernance(communityId);
    }
    @ApiOperation(value = "新版事件大屏画圈展示事件坐标点接口", response = GridsGovernanceStatisticsVO.class)
    @PostMapping("/civil/draw/list-new")
    public R civilDrawListNew(@RequestBody ScreenDrawEventListDTO eventListDTO) {
        Long id = this.getCommunityId();
        if (id == null) {
            return R.fail(401, "请先登录");
        }
        eventListDTO.setCommunityId(id);
        return gridService.getCivilDrawListNew(eventListDTO);
    }
    @ApiOperation(value = "新版根据小区id获取小区信息", response = GridsGovernanceStatisticsVO.class)
    @GetMapping("/civil/village/statistics-new")
    public R civilVillageStatisticsNew(@RequestParam("villageId") Long villageId) {
        if (villageId == null) {
            return R.fail("参数错误");
        }
        return gridService.civilVillageStatisticsNew(villageId);
    }
    @ApiOperation(value = "大数据分析平台-社区服务", response = BigScreenCommunityStatisticsVO.class)
    @GetMapping("/community/service")
    public R getCommunityServiceStatistics() {
        Long communityId = this.getCommunityId();
        if (communityId == null) {
            return R.fail(401, "请先登录");
        }
        return communityService.getCommunityServiceStatistics(communityId);
    }
    @ApiOperation(value = "分页获取热度排行商家", response = ConvenientMerchantVO.class)
    @PostMapping("/merchant/popular")
    public R getScreenPopularMerchants(@RequestBody PagePopularMerchantDTO pagePopularMerchantDTO) {
        Long communityId = this.getCommunityId();
        if (communityId == null) {
            return R.fail(401, "请先登录");
        }
        pagePopularMerchantDTO.setCommunityId(communityId);
        return communityService.getScreenPopularMerchants(pagePopularMerchantDTO);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/BigScreenApi.java
@@ -85,4 +85,24 @@
        bigscreenPartyactivity(@RequestBody BigScreenStatisticPartyActivityDTO bigScreenStatisticPartyActivityDTO) {
        return bigScreenService.bigscreenPartyactivity(bigScreenStatisticPartyActivityDTO);
    }
    /**
     * 党员活动折线图
     * @param communityId
     * @return
     */
    @GetMapping("/partyActivityLine")
    public R partyActivityLine(@RequestParam("communityId")Long communityId){
        return bigScreenService.partyActivityLine(communityId);
    }
    /**
     * 党员积分前3
     * @param communityId
     * @return
     */
    @GetMapping("/partyActivityTop")
    public R partyActivityTop(@RequestParam("communityId")Long communityId){
        return bigScreenService.partyActivityTop(communityId);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/BigScreenStatisticsApi.java
@@ -2,6 +2,9 @@
import javax.annotation.Resource;
import com.panzhihua.common.model.dtos.community.convenient.PagePopularMerchantDTO;
import com.panzhihua.service_community.service.BigScreenStatisticsService;
import com.panzhihua.service_community.service.BigScreenService;
import org.springframework.web.bind.annotation.*;
import com.panzhihua.common.model.dtos.community.bigscreen.BigScreenEventDTO;
@@ -18,6 +21,10 @@
    @Resource
    private ComMngPopulationService comMngPopulationService;
    @Resource
    private BigScreenService bigScreenService;
    @Resource
    private BigScreenStatisticsService bigScreenStatisticsService;
    /**
     * 首页大屏统计接口
@@ -79,4 +86,176 @@
        return R.ok(comMngPopulationService.getScreenEventDetail(eventDetailDTO));
    }
    /**
     * 新版大屏首页接口
     */
    @GetMapping("/indexInfo")
    public R indexInfo(@RequestParam("communityId") Long communityId){
        return comMngPopulationService.indexInfo(communityId);
    }
    /**
     * 首页二级页面-微心愿
     * @param communityId
     * @return
     */
    @GetMapping("/index/microWish")
    public R indexMicroWish(@RequestParam("communityId") Long communityId) {
        return bigScreenStatisticsService.indexMicroWish(communityId);
    }
    /**
     * 首页二级页面-随手拍
     * @param communityId
     * @return
     */
    @GetMapping("/index/easyPhoto")
    public R indexEasyPhoto(@RequestParam("communityId") Long communityId) {
        return bigScreenStatisticsService.indexEasyPhoto(communityId);
    }
    /**
     * 首页二级页面-随手拍展示列表
     * @param communityId
     * @param classifyId
     * @return
     */
    @GetMapping("/index/easyPhotoList")
    public R indexEasyPhotoList(@RequestParam("communityId") Long communityId,
                                @RequestParam(value = "classifyId", required = false) Long classifyId) {
        return bigScreenStatisticsService.indexEasyPhotoList(communityId, classifyId);
    }
    /**
     * 首页二级页面-社区问卷
     * @param communityId
     * @return
     */
    @GetMapping("/index/questionnaire")
    public R indexQuestionnaire(@RequestParam("communityId") Long communityId) {
        return bigScreenStatisticsService.indexQuestionnaire(communityId);
    }
    /**
     * 首页二级页面-社区动态
     * @param communityId
     * @return
     */
    @GetMapping("/index/dyn")
    public R indexDyn(@RequestParam("communityId") Long communityId) {
        return bigScreenStatisticsService.indexDyn(communityId);
    }
    /**
     * 首页二级页面-社区动态展示列表
     * @param communityId
     * @param type
     * @return
     */
    @GetMapping("/index/dynList")
    public R indexDynList(@RequestParam("communityId") Long communityId,
                          @RequestParam(value = "type", required = false) Long type) {
        return bigScreenStatisticsService.indexDynList(communityId, type);
    }
    /**
     * 首页二级页面-邻里圈
     * @param communityId
     * @return
     */
    @GetMapping("/index/neighbor")
    public R indexNeighbor(@RequestParam("communityId") Long communityId) {
        return bigScreenStatisticsService.indexNeighbor(communityId);
    }
    /**
     * 首页二级页面-邻里圈展示列表
     * @param communityId
     * @param topicId
     * @return
     */
    @GetMapping("/index/neighborList")
    public R indexNeighborList(@RequestParam("communityId") Long communityId,
                               @RequestParam(value = "topicId", required = false) Long topicId) {
        return bigScreenStatisticsService.indexNeighborList(communityId, topicId);
    }
    /**
     * 首页二级页面-便民商家
     * @param communityId
     * @return
     */
    @GetMapping("/index/merchant")
    public R indexMerchant(@RequestParam("communityId") Long communityId) {
        return bigScreenStatisticsService.indexMerchant(communityId);
    }
    /**
     * 首页二级页面-商家展示列表
     * @param communityId
     * @param categoryId
     * @return
     */
    @GetMapping("/index/merchantList")
    public R indexMerchantList(@RequestParam("communityId") Long communityId,
                               @RequestParam(value = "categoryId", required = false) Long categoryId) {
        return bigScreenStatisticsService.indexMerchantList(communityId, categoryId);
    }
    /**
     * 社区服务大屏数据分析接口
     */
    @GetMapping("/serviceData")
    public R serviceData(@RequestParam("communityId")Long communityId){
        return this.bigScreenService.serviceData(communityId);
    }
    /**
     * 服务居民接口
     */
    @GetMapping("/serviceUser")
    public R serviceUser(@RequestParam("communityId") Long communityId){
        return this.bigScreenService.serviceUser(communityId);
    }
    /**
     * 大数据分析平台-居民自治
     * @param communityId
     * @return
     */
    @GetMapping("/resident/autonomy")
    public R getResidentAutonomy(@RequestParam("communityId") Long communityId) {
        return bigScreenStatisticsService.getResidentAutonomy(communityId);
    }
    /**
     * 大数据分析平台-清网治格
     * @param communityId
     * @return
     */
    @GetMapping("/grids/governance")
    public R getGridsGovernance(@RequestParam("communityId") Long communityId) {
        return bigScreenStatisticsService.getGridsGovernance(communityId);
    }
    /**
     * 大数据分析平台-社区服务
     * @param communityId
     * @return
     */
    @GetMapping("/community/service")
    public R getCommunityServiceStatistics(@RequestParam("communityId") Long communityId) {
        return bigScreenStatisticsService.getCommunityServiceStatistics(communityId);
    }
    /**
     * 分页获取热度排行商家
     * @param pagePopularMerchantDTO
     * @return
     */
    @PostMapping("/merchant/popular")
    public R getScreenPopularMerchants(@RequestBody PagePopularMerchantDTO pagePopularMerchantDTO) {
        return bigScreenStatisticsService.getScreenPopularMerchants(pagePopularMerchantDTO);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/BigScreenDAO.java
@@ -60,7 +60,7 @@
    @Select("<script> " + "  SELECT   " + " SUM(CASE TYPE WHEN 1 THEN total ELSE 0 END) as 'orgCount',  "
        + " SUM(CASE TYPE WHEN 2 THEN total ELSE 0 END) as 'memberCount',  "
        + " SUM(CASE TYPE WHEN 3 THEN total ELSE 0 END) as 'activityCount',  "
        + " SUM(CASE TYPE WHEN 4 THEN total ELSE 0 END) as 'dynCount'  " + " FROM (  "
        + " SUM(CASE TYPE WHEN 4 THEN total ELSE 0 END) as 'dynCount',SUM(CASE TYPE WHEN 5 THEN total ELSE 0 END) as 'committeeCount'  " + " FROM (  "
        + " SELECT 1 AS TYPE , COUNT(id) total  " + " FROM com_pb_org org   "
        + " WHERE org.community_id  = #{communityId} AND STATUS=1  " + " UNION ALL   "
        + " SELECT 2 AS TYPE , COUNT(id) total  " + " FROM  com_pb_member   "
@@ -68,7 +68,9 @@
        + " SELECT 3 AS TYPE , COUNT(id) total  " + " FROM  com_pb_activity  "
        + " WHERE community_id  = #{communityId} AND STATUS IN (2,3,4,5)  " + " UNION ALL   "
        + " SELECT 4 AS TYPE , COUNT(id) total  " + " FROM  com_pb_dyn   "
        + " WHERE community_id  = #{communityId} AND TYPE = 1  " + ") t" + "</script>")
        + " WHERE community_id  = #{communityId} AND TYPE = 1  UNION ALL " +
            "select 5 AS TYPE,count(id) total      from com_pb_member_role " +
            "where community_id =#{communityId}" + ") t" + "</script>")
    BigScreenStatisticPartyBuild partybuild(@Param("communityId") Long communityId);
    @Select("<script> " + " SELECT pm.id, pm.member_id, pm.user_id, pm.name, " + " case "
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDAO.java
@@ -62,7 +62,7 @@
    void updateAccountPassword(@Param("password") String password, @Param("account") String account,
        @Param("communityId") Long communityId);
    @Select("select community_id,`name` from com_act where state = 0")
    @Select("select community_id,`name`,lng,lat from com_act where state = 0")
    List<EventGridCommunityAdminVO> getCommunityLists();
    @Select("select ca.`name`,cmsap.province_name,cmsac.city_name,cmsad.district_name,ca.street_id,ca.community_id,cs.`name` as streetName from com_act as ca \n"
@@ -91,6 +91,6 @@
            "HAVING distance >= 0 and distance <= #{communityDTO.distance}   ORDER BY    distance ASC")
    List<CommunitySwitchAllAppletsVO> getCommunityListByNearby(@Param("communityDTO") SearchCommunityDTO communityDTO);
    @Select("select community_id,name from com_act  where state = 0 and area_code = '510423' ")
    @Select("select community_id,name,lng,lat from com_act  where state = 0 and area_code = '510423' ")
    List<EventGridCommunityAdminVO> getWestCommunityLists();
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDiscussDAO.java
@@ -4,6 +4,7 @@
import java.util.List;
import java.util.Map;
import com.panzhihua.common.model.vos.community.StatisticsCommVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@@ -209,4 +210,20 @@
     * @return
     */
    int batchUpdateViewNum(@Param("needDealMap") HashMap<Long, Integer> needDealMap);
    /**
     * 居民自治-议事投票类型占比统计
     * @param communityId
     * @return
     */
    List<StatisticsCommVO> selectTypePercent(@Param("communityId") Long communityId);
    /**
     * 获取一起议标题
     * @param type
     * @param communityId
     * @param pageSize
     * @return
     */
    List<String> getTitles(@Param("type") int type, @Param("communityId") Long communityId, @Param("pageSize") Integer pageSize);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActDynDAO.java
@@ -1,7 +1,9 @@
package com.panzhihua.service_community.dao;
import java.util.List;
import java.util.Map;
import com.panzhihua.common.model.vos.community.StatisticsCommVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@@ -73,4 +75,12 @@
        + " FROM DUAL")
    DynamicWorkVO countByTime(@Param("start") String start, @Param("end") String end,
        @Param("communityId") Long communityId);
    List<StatisticsCommVO> getIndexDynBaseData(@Param("communityId") Long communityId);
    List<StatisticsCommVO> getDynAddPolylineData(@Param("communityId") Long communityId);
    StatisticsCommVO getDynTotalPolylineDate(@Param("communityId") Long communityId, @Param("date") String date);
    List<ComActDynVO> indexDynList(@Param("communityId") Long communityId, @Param("type") Long type, @Param("pageSize") Integer pageSize);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActEasyPhotoDAO.java
@@ -5,7 +5,12 @@
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.common.model.dtos.community.easyPhoto.ExportEasyPhotoDTO;
import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO;
import com.panzhihua.common.model.vos.community.StatisticsCommVO;
import com.panzhihua.common.model.vos.community.TodoEventsVO;
import com.panzhihua.common.model.vos.community.bigscreen.BigScreenEasyPhotoStatisticsInfo;
import com.panzhihua.common.model.vos.community.bigscreen.BigscreenGridsGovernanceStatisticsVO;
import com.panzhihua.common.model.vos.community.bigscreen.GridsGovernanceStatisticsVO;
import com.panzhihua.common.model.vos.community.bigscreen.ResidentAutonomyStatisticsVO;
import com.panzhihua.common.model.vos.community.easyPhoto.BannerVO;
import com.panzhihua.common.model.vos.community.easyPhoto.ComActEasyPhotoCountVO;
import com.panzhihua.common.model.vos.community.easyPhoto.ComActEasyPhotoStatisticsVO;
@@ -358,4 +363,50 @@
     * @return
     */
    List<BannerVO>  banner(@Param("communityId") Long communityId);
    /**
     * 获取随手拍居民自治统计数据
     * @param communityId
     * @return
     */
    List<ComActEasyPhotoVO> selectStatisticsList(@Param("communityId") Long communityId);
    /**
     * 获取居民自治统计数据
     * @param communityId
     * @return
     */
    ResidentAutonomyStatisticsVO selectResidentAutonomyStatistics(@Param("communityId") Long communityId);
    /**
     * 获取清网治格统计数据
     * @param communityId
     * @return
     */
    GridsGovernanceStatisticsVO selectGridsGovernance(@Param("communityId") Long communityId);
    /**
     * 首页大屏获取网格统计数据
     */
    BigscreenGridsGovernanceStatisticsVO selectBigscreenGridsGovern(@Param("communityId")Long communityId);
    /**
     * 首页二级页面-随手拍基础数据查询
     * @param communityId
     * @return
     */
    BigScreenEasyPhotoStatisticsInfo selectIndexEasyPhotoBaseData(@Param("communityId") Long communityId);
    List<StatisticsCommVO> getEasyPhotoAddPolylineData(@Param("communityId") Long communityId);
    StatisticsCommVO getEasyPhotoTotalPolylineDate(@Param("communityId") Long communityId, @Param("date") String date);
    /**
     * 首页二级页面-随手拍展示列表
     * @param communityId
     * @param classifyId
     * @param pageSize
     * @return
     */
    List<ComActEasyPhotoVO> indexEasyPhotoList(@Param("communityId") Long communityId, @Param("classifyId") Long classifyId, @Param("pageSize") Integer pageSize);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActMicroWishDAO.java
@@ -5,7 +5,9 @@
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenMicroListDTO;
import com.panzhihua.common.model.vos.community.ComActMicroWishVO;
import com.panzhihua.common.model.vos.community.StatisticsCommVO;
import com.panzhihua.common.model.vos.community.TodoEventsVO;
import com.panzhihua.common.model.vos.community.bigscreen.BigScreenMicroWishStatisticsInfo;
import com.panzhihua.common.model.vos.community.screen.work.MicroListVO;
import com.panzhihua.common.model.vos.user.SysUserVO;
import com.panzhihua.service_community.model.dos.ComActMicroWishDO;
@@ -246,4 +248,38 @@
    List<SysUserVO> getWishHandleListAdmin(@Param("type") Integer type,@Param("communityId") Long communityId);
    SysUserVO getUserByUserId(@Param("userId") Long userId);
    /**
     * 待实现&已实现数目及占比
     * @param communityId
     * @return
     */
    List<StatisticsCommVO> selectRealizePercent(@Param("communityId") Long communityId);
    /**
     * 获取通过的微心愿图片
     * @param communityId
     * @param pageSize
     * @return
     */
    List<String> getPassedAllImages(@Param("communityId") Long communityId, @Param("pageSize") Integer pageSize);
    /**
     * 首页二级页面-微心愿基础数据查询
     * @param communityId
     * @return
     */
    BigScreenMicroWishStatisticsInfo selectIndexMicroWishBaseData(@Param("communityId") Long communityId);
    List<StatisticsCommVO> getMicroWishAddPolylineData(@Param("communityId") Long communityId);
    StatisticsCommVO getMicroWishTotalPolylineDate(@Param("communityId") Long communityId, @Param("date") String date);
    /**
     * 微心愿大屏展示列表
     * @param communityId
     * @param pageSize
     * @return
     */
    List<ComActMicroWishVO> selectScreenDisplayList(@Param("communityId") Long communityId, @Param("pageSize") Integer pageSize);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleDAO.java
@@ -3,6 +3,7 @@
import java.util.List;
import java.util.Map;
import com.panzhihua.common.model.vos.community.StatisticsCommVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@@ -116,4 +117,28 @@
    void addHotNum(@Param("circleId") Long circleId,@Param("hotNum") Long hotNum);
    void addTopicHotNum(@Param("circleId") Long circleId,@Param("hotNum") Long hotNum);
    /**
     * 获取大屏邻里圈展示图片
     * @param communityId
     * @param pageSize
     * @return
     */
    List<String> getAllImages(@Param("communityId") Long communityId, @Param("pageSize") Integer pageSize);
    /**
     * 获取大屏邻里圈展示文本内容
     * @param communityId
     * @param pageSize
     * @return
     */
    List<String> getContents(@Param("communityId") Long communityId, @Param("pageSize") Integer pageSize);
    List<StatisticsCommVO> getIndexNeighborBaseData(@Param("communityId") Long communityId);
    List<StatisticsCommVO> getNeighborAddPolylineData(@Param("communityId") Long communityId);
    StatisticsCommVO getNeighborTotalPolylineDate(@Param("communityId") Long communityId, @Param("date") String date);
    List<ComActNeighborCircleAdminVO> indexNeighborList(@Param("communityId") Long communityId, @Param("topicId") Long topicId, @Param("pageSize") Integer pageSize);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActQuestnaireDAO.java
@@ -2,6 +2,9 @@
import java.util.List;
import com.panzhihua.common.model.vos.community.ComActQuestnaireVO;
import com.panzhihua.common.model.vos.community.StatisticsCommVO;
import com.panzhihua.common.model.vos.community.bigscreen.BigScreenQuestionnaireStatisticsInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@@ -125,4 +128,23 @@
        @Param("communityId") Long communityId);
    void addNoNotice(@Param("questId") Long questId, @Param("userId") Long userId);
    /**
     * 首页大屏二级页面-社区问卷基础数据
     * @param communityId
     * @return
     */
    BigScreenQuestionnaireStatisticsInfo getIndexQuestionnaireBaseData(@Param("communityId") Long communityId);
    List<StatisticsCommVO> getQuestionnaireAddPolylineData(@Param("communityId") Long communityId);
    StatisticsCommVO getQuestionnaireTotalPolylineDate(@Param("communityId") Long communityId, @Param("date") String date);
    /**
     * 大屏问卷展示列表
     * @param communityId
     * @param pageSize
     * @return
     */
    List<ComActQuestnaireVO> selectQuestionnaireDisplayList(@Param("communityId") Long communityId, @Param("pageSize") Integer pageSize);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActReserveMapper.java
@@ -5,6 +5,8 @@
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.common.model.dtos.community.reserve.ComActReserveMakeStatisticsDTO;
import com.panzhihua.common.model.dtos.community.reserve.PageReserveAdminDTO;
import com.panzhihua.common.model.vos.community.bigscreen.IndexReserve;
import com.panzhihua.common.model.vos.community.bigscreen.IndexReserveSub;
import com.panzhihua.common.model.vos.community.reserve.ComActReserveListAdminVO;
import com.panzhihua.common.model.vos.community.reserve.ComActReserveMakeLeftStatisticsAdminVO;
import com.panzhihua.common.model.vos.community.reserve.ComActReserveMakeRightStatisticsAdminVO;
@@ -94,4 +96,31 @@
     */
    List<ComActReserveIndexVo> getReserveIndexList(@Param("communityId") Long communityId);
    /**
     * 首页大屏返攀登记数据统计总数
     * @param communityId
     * @return
     */
    Integer indexBackReserve(@Param("communityId") Long communityId);
    /**
     * 首页大屏居家隔离数据统计总数
     * @param communityId
     * @return
     */
    Integer indexHomeQuarantine(@Param("communityId") Long communityId);
    /**
     * 首页大屏返攀登记数据统计选项
     * @param communityId
     * @return
     */
    List<IndexReserveSub> indexBackReserveSub(@Param("communityId") Long communityId);
    /**
     * 首页大屏居家隔离数据统计选项
     * @param communityId
     * @return
     */
    List<IndexReserveSub> IndexHomeQuarantineSub(@Param("communityId") Long communityId);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActWarehouseDonatesDao.java
@@ -70,4 +70,28 @@
     */
    DonatesStatisticsVO selectDonatesStatistics(@Param("communityId") Long communityId, @Param("currentYear") String currentYear,
                                                @Param("currentMonth") String currentMonth, @Param("today") String today);
    /**
     * 居民自治大屏-捐赠记录
     * @param communityId
     * @param pageSize
     * @return
     */
    List<String> getWarehouseDonateRecords(@Param("communityId") Long communityId, @Param("pageSize") Integer pageSize);
    /**
     * 居民自治大屏-爱心传递
     * @param communityId
     * @param pageSize
     * @return
     */
    List<String> getWarehouseLoveTransfer(@Param("communityId") Long communityId, @Param("pageSize") Integer pageSize);
    /**
     * 居民自治大屏-捐赠物品图片
     * @param communityId
     * @param pageSize
     * @return
     */
    List<String> getWarehouseImages(@Param("communityId") Long communityId, @Param("pageSize") Integer pageSize);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java
@@ -7,6 +7,8 @@
import com.panzhihua.common.model.dtos.community.CascadeHouseDTO;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.community.*;
import com.panzhihua.common.model.vos.community.bigscreen.BaseInfo;
import com.panzhihua.common.model.vos.community.bigscreen.IndexDynamic;
import com.panzhihua.service_community.model.dos.ComMngPopulationCommunityTagsDO;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
@@ -212,13 +214,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 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")
    List<IndexPopulationSexStatisticsVO> getScreenIndexByPopulationSex(@Param("communityId") Long communityId);
    @Select("SELECT " + " e.happen_time as createAt, " + " e.event_des, " + " e.event_deal_status  " + "FROM "
@@ -281,6 +280,10 @@
    @Select("SELECT " + " count( id )  " + "FROM " + " com_mng_population_community_tags  " + "WHERE "
        + " 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 getSpecialStatistics(@Param("communityId") Long communityId);
    @Select("<script> " + "SELECT " + " count( egd.id ) AS gridTotal, "
        + " ( select count(egmr.id) from event_grid_member_relation as egmr"
@@ -616,4 +619,25 @@
     * @param newUnitNo 新单元号
     */
    void updatePopulationUnit(@Param("villageId") Long villageId, @Param("floor") String floor,@Param("oldUnitNo") String oldUnitNo,@Param("newUnitNo") String newUnitNo);
    /**
     * 基础数据统计
     * @param communityId
     * @return
     */
    BaseInfo baseInfo(Long communityId);
    /**
     * 业务数据统计
     * @param communityId
     * @return
     */
    IndexDynamic indexDynamic(Long communityId);
    /**
     * 大屏事件数据
     * @param communityId
     * @return
     */
    List<EventGridIncidentStatisticsVO> getGridsGovernanceEventList(@Param("communityId") Long communityId);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComPbMemberDAO.java
@@ -3,6 +3,10 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.common.model.vos.community.bigscreen.BigScreenActivityLine;
import com.panzhihua.common.model.vos.community.bigscreen.BigScreenActivityTop;
import com.panzhihua.common.model.vos.community.bigscreen.BigScreenServiceData;
import com.panzhihua.common.model.vos.community.bigscreen.BigScreenServiceUser;
import com.panzhihua.common.model.vos.partybuilding.*;
import com.panzhihua.service_community.model.dos.ComPbMemberDO;
import org.apache.ibatis.annotations.Mapper;
@@ -26,4 +30,33 @@
     * @return
     */
    ComPbMemberVO selectById(String idCard);
    /**
     *根据社区id日期查询活动数
     * @param communityId
     * @param date
     * @return
     */
    BigScreenActivityLine selectActivityCountMonth(@Param("communityId")Long communityId, @Param("date")String date);
    /**
     * 查询党员积分前3
     * @param communityId
     * @return
     */
    List<BigScreenActivityTop> selectActivityTop(@Param("communityId") Long communityId);
    /**
     * 服务数据查询
     * @param communityId
     * @return
     */
    BigScreenServiceData bigScreenServiceData(@Param("communityId")Long communityId);
    /**
     * 服务居民
     * @param communityId
     * @return
     */
    List<BigScreenServiceUser> bigScreenServiceUser(@Param("communityId")Long communityId);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComPropertyDao.java
@@ -6,9 +6,12 @@
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.community.ComActSocialOrgVO;
import com.panzhihua.common.model.vos.community.ComPropertyVO;
import com.panzhihua.common.model.vos.community.StatisticsCommVO;
import org.apache.ibatis.annotations.Mapper;
import com.panzhihua.service_community.entity.ComProperty;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
 * (ComProperty)表数据库访问层
@@ -25,4 +28,23 @@
     * @return
     */
    IPage<ComPropertyVO> pageList(Page page, @Param("commonPage") CommonPage commonPage);
    /**
     * 居民自治大屏统计数据获取
     * @param communityId
     * @return
     */
    List<StatisticsCommVO> getRepairPolylineDate(@Param("communityId") Long communityId);
    /**
     * 报事报修date之前的累计数量
     * @param communityId
     * @param date
     * @return
     */
    StatisticsCommVO getRepairTotalPolylineDate(@Param("communityId") Long communityId, @Param("date") String date);
    List<StatisticsCommVO> getEventAddPolylineData(@Param("communityId") Long communityId);
    StatisticsCommVO getEventTotalPolylineDate(@Param("communityId") Long communityId, @Param("date") String date);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ConvenientMerchantDAO.java
@@ -5,7 +5,10 @@
import com.panzhihua.common.model.dtos.community.convenient.ExportMerchantDTO;
import com.panzhihua.common.model.dtos.community.convenient.PageClassifyMerchantDTO;
import com.panzhihua.common.model.dtos.community.convenient.PageConvenientMerchantDTO;
import com.panzhihua.common.model.dtos.community.convenient.PagePopularMerchantDTO;
import com.panzhihua.common.model.dtos.community.convenient.PageSearchDTO;
import com.panzhihua.common.model.vos.community.StatisticsCommVO;
import com.panzhihua.common.model.vos.community.bigscreen.BigScreenMerchantStatisticsInfo;
import com.panzhihua.common.model.vos.community.convenient.ConvenientConsultationStatisticsVO;
import com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO;
import com.panzhihua.common.model.vos.community.convenient.ConvenientViewStatisticsVO;
@@ -124,4 +127,29 @@
     * @return
     */
    int batchUpdateBusinessStatus(@Param("convenientMerchantDOList") List<ConvenientMerchantDO> convenientMerchantDOList, @Param("status") int status);
    /**
     * 社区商家
     * @param communityId
     * @return
     */
    List<ConvenientMerchantVO> selectMerchantListByCommunity(@Param("communityId") Long communityId);
    /**
     * 大屏分页获取热度排行商家
     * @param page
     * @param pagePopularMerchantDTO
     * @return
     */
    List<ConvenientMerchantVO> getScreenPopularMerchants(@Param("page") Page page, @Param("pagePopularMerchantDTO") PagePopularMerchantDTO pagePopularMerchantDTO);
    BigScreenMerchantStatisticsInfo getIndexMerchantBaseData(@Param("communityId") Long communityId);
    List<StatisticsCommVO> selectServiceTypeCircleData(@Param("communityId") Long communityId);
    List<StatisticsCommVO> getServiceTimesAddPolylineData(@Param("communityId") Long communityId);
    StatisticsCommVO getServiceTimesTotalPolylineDate(@Param("communityId") Long communityId, @Param("date") String date);
    List<ConvenientMerchantVO> indexMerchantList(@Param("communityId") Long communityId, @Param("categoryId") Long categoryId, @Param("pageSize") Integer pageSize);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/BigScreenService.java
@@ -10,6 +10,7 @@
import com.panzhihua.common.model.vos.community.bigscreen.BigScreenStatisticPartyActivity;
import com.panzhihua.common.model.vos.community.bigscreen.BigScreenStatisticPartyBuild;
import com.panzhihua.common.model.vos.community.bigscreen.PartyBuildingMemberVO;
import org.springframework.web.bind.annotation.RequestParam;
/**
 * @ClasssName BigScreenService
@@ -56,4 +57,32 @@
     */
    R<List<BigScreenStatisticPartyActivity>>
        bigscreenPartyactivity(BigScreenStatisticPartyActivityDTO bigScreenStatisticPartyActivityDTO);
    /**
     * 党员活动折线图
     * @param communityId
     * @return
     */
    R partyActivityLine(Long communityId);
    /**
     *查询党员积分前3
     * @param communityId
     * @return
     */
    R partyActivityTop(Long communityId);
    /**
     * 服务数据
     * @param communityId
     * @return
     */
    R serviceData(Long communityId);
    /**
     * 服务用户
     * @param communityId
     * @return
     */
    R serviceUser(Long communityId);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/BigScreenStatisticsService.java
New file
@@ -0,0 +1,116 @@
package com.panzhihua.service_community.service;
import com.panzhihua.common.model.dtos.community.convenient.PagePopularMerchantDTO;
import com.panzhihua.common.model.vos.R;
/**
 * @title: BigScreenStatisticsService
 * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
 * @description: 大屏统计服务类
 * @author: hans
 * @date: 2021/12/06 9:56
 */
public interface BigScreenStatisticsService {
    /**
     * 大数据分析平台-居民自治
     * @param communityId
     * @return
     */
    R getResidentAutonomy(Long communityId);
    /**
     * 大数据分析平台-清网治格
     * @param communityId
     * @return
     */
    R getGridsGovernance(Long communityId);
    /**
     * 大数据分析平台-社区服务
     * @param communityId
     * @return
     */
    R getCommunityServiceStatistics(Long communityId);
    /**
     * 分页获取热度排行商家
     * @param pagePopularMerchantDTO
     * @return
     */
    R getScreenPopularMerchants(PagePopularMerchantDTO pagePopularMerchantDTO);
    /**
     * 首页二级页面-微心愿
     * @param communityId
     * @return
     */
    R indexMicroWish(Long communityId);
    /**
     * 首页二级页面-随手拍
     * @param communityId
     * @return
     */
    R indexEasyPhoto(Long communityId);
    /**
     * 首页二级页面-随手拍展示列表
     * @param communityId
     * @param classifyId
     * @return
     */
    R indexEasyPhotoList(Long communityId, Long classifyId);
    /**
     * 首页二级页面-社区问卷
     * @param communityId
     * @return
     */
    R indexQuestionnaire(Long communityId);
    /**
     * 首页二级页面-社区动态
     * @param communityId
     * @return
     */
    R indexDyn(Long communityId);
    /**
     * 首页二级页面-社区动态展示列表
     * @param communityId
     * @param type
     * @return
     */
    R indexDynList(Long communityId, Long type);
    /**
     * 首页二级页面-邻里圈
     * @param communityId
     * @return
     */
    R indexNeighbor(Long communityId);
    /**
     * 首页二级页面-邻里圈展示列表
     * @param communityId
     * @param topicId
     * @return
     */
    R indexNeighborList(Long communityId, Long topicId);
    /**
     * 首页二级页面-便民商家
     * @param communityId
     * @return
     */
    R indexMerchant(Long communityId);
    /**
     * 首页二级页面-商家展示列表
     * @param communityId
     * @param categoryId
     * @return
     */
    R indexMerchantList(Long communityId, Long categoryId);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActReserveService.java
@@ -6,6 +6,7 @@
import com.panzhihua.common.model.dtos.community.PageUserReserveDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.ComActReserveCommitVO;
import com.panzhihua.common.model.vos.community.bigscreen.IndexReserve;
import com.panzhihua.service_community.model.dos.ComActReserveDO;
/**
@@ -119,4 +120,11 @@
     */
    R reserveListApplets(Long communityId);
    /**
     * 返攀登记居家隔离大屏数据
     * @param communityId
     * @return
     */
    IndexReserve indexReserve(Long communityId);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComMngPopulationService.java
@@ -521,4 +521,11 @@
     * @return
     */
    R specialInputUserExport(PageInputUserDTO PageInputUserDTO);
    /**
     * 新版大屏首页
     * @param communityId
     * @return
     */
    R indexInfo(Long communityId);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/BigScreenServiceImpl.java
@@ -5,6 +5,7 @@
import javax.annotation.Resource;
import com.panzhihua.service_community.dao.ComPbMemberDAO;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
@@ -32,6 +33,8 @@
public class BigScreenServiceImpl implements BigScreenService {
    @Resource
    private BigScreenDAO bigScreenDAO;
    @Resource
    private ComPbMemberDAO comPbMemberDAO;
    @Override
    public R partyOrgMembers(PageBigScreenStatisticPartyOrg pageBigScreenStatisticPartyOrg) {
@@ -101,4 +104,47 @@
        return R.ok(listR);
    }
    @Override
    public R partyActivityLine(Long communityId) {
        List<BigScreenActivityLine> bigScreenActivityLines=this.getPoints();
        bigScreenActivityLines.forEach(bigScreenActivityLine -> {
           BigScreenActivityLine bigScreenActivityLine1=comPbMemberDAO.selectActivityCountMonth(communityId,bigScreenActivityLine.getX());
           bigScreenActivityLine.setY(bigScreenActivityLine1.getY());
           bigScreenActivityLine.setCountY(bigScreenActivityLine1.getCountY());
        });
        return R.ok(bigScreenActivityLines);
    }
    @Override
    public R partyActivityTop(Long communityId) {
        return R.ok(this.comPbMemberDAO.selectActivityTop(communityId));
    }
    @Override
    public R serviceData(Long communityId) {
        return R.ok(this.comPbMemberDAO.bigScreenServiceData(communityId));
    }
    @Override
    public R serviceUser(Long communityId) {
        return R.ok(this.comPbMemberDAO.bigScreenServiceUser(communityId));
    }
    public List<BigScreenActivityLine> getPoints(){
        List<BigScreenActivityLine> bigScreenActivityLines=new ArrayList<>();
        for(int i=1;i<=12;i++){
            String aDate="";
            if(i<10){
                aDate = "0"+i;
            }
            else {
                aDate=i+"";
            }
            BigScreenActivityLine bigScreenActivityLine=new BigScreenActivityLine();
            bigScreenActivityLine.setX(aDate);
            bigScreenActivityLines.add(bigScreenActivityLine);
        }
        return bigScreenActivityLines;
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/BigScreenStatisticsServiceImpl.java
New file
@@ -0,0 +1,643 @@
package com.panzhihua.service_community.service.impl;
import static java.util.Objects.isNull;
import static java.util.Objects.nonNull;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.common.model.dtos.community.convenient.PagePopularMerchantDTO;
import com.panzhihua.common.model.vos.community.ComActDynVO;
import com.panzhihua.common.model.vos.community.ComActMicroWishVO;
import com.panzhihua.common.model.vos.community.ComActQuestnaireVO;
import com.panzhihua.common.model.vos.community.bigscreen.BigScreenCommunityStatisticsVO;
import com.panzhihua.common.model.vos.community.bigscreen.BigScreenDynStatisticsInfo;
import com.panzhihua.common.model.vos.community.bigscreen.BigScreenEasyPhotoStatisticsInfo;
import com.panzhihua.common.model.vos.community.bigscreen.BigScreenMerchantStatisticsInfo;
import com.panzhihua.common.model.vos.community.bigscreen.BigScreenMicroWishStatisticsInfo;
import com.panzhihua.common.model.vos.community.bigscreen.BigScreenNeighborStatisticsInfo;
import com.panzhihua.common.model.vos.community.bigscreen.BigScreenQuestionnaireStatisticsInfo;
import com.panzhihua.common.model.vos.community.bigscreen.GridsGovernanceStatisticsVO;
import com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO;
import com.panzhihua.common.model.vos.community.screen.civil.CivilVillageStatisticsVO;
import com.panzhihua.common.model.vos.community.screen.event.EventGridIncidentStatisticsVO;
import com.panzhihua.common.model.vos.community.screen.event.EventGridStatisticsVO;
import com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleAdminVO;
import com.panzhihua.service_community.dao.ComActDynDAO;
import com.panzhihua.service_community.dao.ComActQuestnaireDAO;
import com.panzhihua.service_community.dao.ComMngPopulationDAO;
import com.panzhihua.service_community.dao.ConvenientMerchantDAO;
import org.springframework.stereotype.Service;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO;
import com.panzhihua.common.model.vos.community.StatisticsCommVO;
import com.panzhihua.common.model.vos.community.bigscreen.ResidentAutonomyStatisticsVO;
import com.panzhihua.service_community.dao.ComActDiscussDAO;
import com.panzhihua.service_community.dao.ComActEasyPhotoDAO;
import com.panzhihua.service_community.dao.ComActMicroWishDAO;
import com.panzhihua.service_community.dao.ComActNeighborCircleDAO;
import com.panzhihua.service_community.dao.ComActWarehouseDonatesDao;
import com.panzhihua.service_community.dao.ComPropertyDao;
import com.panzhihua.service_community.service.BigScreenStatisticsService;
import lombok.extern.slf4j.Slf4j;
/**
 * @title: BigScreenStatisticsServiceImpl
 * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
 * @description: 大屏统计服务实现类
 * @author: hans
 * @date: 2021/12/06 9:56
 */
@Service
@Slf4j
public class BigScreenStatisticsServiceImpl implements BigScreenStatisticsService {
    private static final Integer pageSize = 100;
    @Resource
    private ComActEasyPhotoDAO comActEasyPhotoDAO;
    @Resource
    private ComActMicroWishDAO comActMicroWishDAO;
    @Resource
    private ComActDiscussDAO comActDiscussDAO;
    @Resource
    private ComActNeighborCircleDAO comActNeighborCircleDAO;
    @Resource
    private ComPropertyDao comPropertyDao;
    @Resource
    private ComActWarehouseDonatesDao comActWarehouseDonatesDao;
    @Resource
    private ComMngPopulationDAO comMngPopulationDAO;
    @Resource
    private ConvenientMerchantDAO convenientMerchantDAO;
    @Resource
    private ComActQuestnaireDAO comActQuestnaireDAO;
    @Resource
    private ComActDynDAO comActDynDAO;
    /**
     * 大数据分析平台-居民自治
     * @param communityId
     * @return
     */
    @Override
    public R getResidentAutonomy(Long communityId) {
        ResidentAutonomyStatisticsVO statisticsVO = comActEasyPhotoDAO.selectResidentAutonomyStatistics(communityId);
        if (isNull(statisticsVO)) {
            statisticsVO = new ResidentAutonomyStatisticsVO();
        }
        List<ComActEasyPhotoVO> easyPhotoVOList = comActEasyPhotoDAO.selectStatisticsList(communityId);
        //随手拍总数
        Integer easyPhotoTotalCount = 0;
        //随手拍柱状统计
        List<StatisticsCommVO> easyPhotoHistogram = new ArrayList<>();
        if (Objects.nonNull(easyPhotoVOList) && !easyPhotoVOList.isEmpty()) {
            Map<String, List<ComActEasyPhotoVO>> easyPhotoVOMap = easyPhotoVOList.stream().collect(Collectors.groupingBy(ComActEasyPhotoVO::getClassifyName));
            for (Map.Entry<String, List<ComActEasyPhotoVO>> entry : easyPhotoVOMap.entrySet()) {
                StatisticsCommVO commVO = new StatisticsCommVO();
                commVO.setFiled(entry.getKey());
                commVO.setNum(entry.getValue().size());
                easyPhotoHistogram.add(commVO);
            }
            easyPhotoTotalCount = easyPhotoVOList.size();
        }
        statisticsVO.setEasyPhotoTotalCount(easyPhotoTotalCount);
        statisticsVO.setEasyPhotoHistogram(easyPhotoHistogram);
        //待实现&已实现数目及占比
        List<StatisticsCommVO> microWishRealizePercent = comActMicroWishDAO.selectRealizePercent(communityId);
        statisticsVO.setMicroWishRealizePercent(microWishRealizePercent);
        //微心愿图片
        List<String> microWishImages = comActMicroWishDAO.getPassedAllImages(communityId, pageSize);
        statisticsVO.setMicroWishImages(microWishImages);
        //议事投票类型占比
        List<StatisticsCommVO> discussTypePercent = comActDiscussDAO.selectTypePercent(communityId);
        statisticsVO.setDiscussTypePercent(discussTypePercent);
        //议事标题
        List<String> discussTitles = comActDiscussDAO.getTitles(1, communityId, pageSize);
        statisticsVO.setDiscussTitles(discussTitles);
        //投票标题
        List<String> voteTitles = comActDiscussDAO.getTitles(2, communityId, pageSize);
        statisticsVO.setVoteTitles(voteTitles);
        //邻里圈图片
        List<String> neighborImages = comActNeighborCircleDAO.getAllImages(communityId, pageSize);
        statisticsVO.setNeighborImages(neighborImages);
        //邻里圈文本内容
        List<String> neighborContents = comActNeighborCircleDAO.getContents(communityId, pageSize);
        statisticsVO.setNeighborContents(neighborContents);
        //报事报修新增折线数据
        Date nowDate = new Date();
        List<StatisticsCommVO> repairAddPolylineData = comPropertyDao.getRepairPolylineDate(communityId);
        int currentMon = Integer.parseInt(new SimpleDateFormat("MM").format(nowDate));
        for (int i = 1; i <= currentMon; i++) {
            String temp;
            if (i > 9) {
                temp = "" + i;
            } else {
                temp = "0" + i;
            }
            boolean isExist = repairAddPolylineData.stream().anyMatch(e -> nonNull(e.getFiled()) &&
                    e.getFiled().endsWith(temp));
            if (!isExist) {
                StatisticsCommVO other = new StatisticsCommVO();
                other.setFiled(temp);
                other.setNum(0);
                repairAddPolylineData.add(other);
            }
        }
        repairAddPolylineData = repairAddPolylineData.stream().filter(e -> nonNull(e.getFiled()))
                .sorted(Comparator.comparing(e -> e.getFiled())).collect(Collectors.toList());
        statisticsVO.setRepairAddPolylineData(repairAddPolylineData);
        //报事报修累计折线数据
        List<StatisticsCommVO> repairTotalPolylineData = new ArrayList<>();
        String year = new SimpleDateFormat("yyyy").format(nowDate);
        repairAddPolylineData.forEach(e -> {
            StatisticsCommVO temp = comPropertyDao.getRepairTotalPolylineDate(communityId, year + e.getFiled());
            temp.setFiled(e.getFiled());
            repairTotalPolylineData.add(temp);
        });
        statisticsVO.setRepairTotalPolylineData(repairTotalPolylineData);
        //捐赠记录
        List<String> warehouseDonateRecords = comActWarehouseDonatesDao.getWarehouseDonateRecords(communityId, pageSize);
        statisticsVO.setWarehouseDonateRecords(warehouseDonateRecords);
        //爱心传递
        List<String> warehouseLoveTransfer = comActWarehouseDonatesDao.getWarehouseLoveTransfer(communityId, pageSize);
        statisticsVO.setWarehouseLoveTransfer(warehouseLoveTransfer);
        //捐赠图片
        List<String> warehouseImages = comActWarehouseDonatesDao.getWarehouseImages(communityId, pageSize);
        statisticsVO.setWarehouseImages(warehouseImages);
        return R.ok(statisticsVO);
    }
    /**
     * 大数据分析平台-清网治格
     * @param communityId
     * @return
     */
    @Override
    public R getGridsGovernance(Long communityId) {
        GridsGovernanceStatisticsVO statisticsVO = comActEasyPhotoDAO.selectGridsGovernance(communityId);
        if (isNull(statisticsVO)) {
            statisticsVO = new GridsGovernanceStatisticsVO();
        }
        // 查询网格数据
        List<EventGridStatisticsVO> gridStatisticsList = comMngPopulationDAO.getEventScreenGridData(communityId);
        statisticsVO.setGridStatisticsList(gridStatisticsList);
        // 查询小区列表
        List<CivilVillageStatisticsVO> villageStatisticsList = comMngPopulationDAO.getCivilScreenVillageList(communityId);
        if (!villageStatisticsList.isEmpty()) {
            villageStatisticsList.forEach(village -> {
                CivilVillageStatisticsVO villageStatisticsVO =
                        comMngPopulationDAO.getCivilScreenVillageStatistics(village.getVillageId());
                if (villageStatisticsVO != null) {
                    village.setPeopleNum(villageStatisticsVO.getPeopleNum());
                    village.setHouseNum(villageStatisticsVO.getHouseNum());
                    village.setRegisterNum(villageStatisticsVO.getRegisterNum());
                    village.setFlowNum(villageStatisticsVO.getFlowNum());
                    // BeanUtils.copyProperties(villageStatisticsVO,village);
                }
            });
        }
        statisticsVO.setVillageStatisticsList(villageStatisticsList);
        // 查询社区事件列表
        List<EventGridIncidentStatisticsVO> gridIncidentList = comMngPopulationDAO.getGridsGovernanceEventList(communityId);
        statisticsVO.setGridIncidentList(gridIncidentList);
        //事件分析新增折线数据
        Date nowDate = new Date();
        List<StatisticsCommVO> eventAddPolylineData = comPropertyDao.getEventAddPolylineData(communityId);
        int currentMon = Integer.parseInt(new SimpleDateFormat("MM").format(nowDate));
        for (int i = 1; i <= currentMon; i++) {
            String temp;
            if (i > 9) {
                temp = "" + i;
            } else {
                temp = "0" + i;
            }
            boolean isExist = eventAddPolylineData.stream().anyMatch(e -> nonNull(e.getFiled()) &&
                    e.getFiled().endsWith(temp));
            if (!isExist) {
                StatisticsCommVO other = new StatisticsCommVO();
                other.setFiled(temp);
                other.setNum(0);
                eventAddPolylineData.add(other);
            }
        }
        eventAddPolylineData = eventAddPolylineData.stream().filter(e -> nonNull(e.getFiled()))
                .sorted(Comparator.comparing(e -> e.getFiled())).collect(Collectors.toList());
        statisticsVO.setEventAddPolylineData(eventAddPolylineData);
        //事件分析累计折线数据
        List<StatisticsCommVO> eventTotalPolylineData = new ArrayList<>();
        String year = new SimpleDateFormat("yyyy").format(nowDate);
        eventAddPolylineData.forEach(e -> {
            StatisticsCommVO temp = comPropertyDao.getEventTotalPolylineDate(communityId, year + e.getFiled());
            temp.setFiled(e.getFiled());
            eventTotalPolylineData.add(temp);
        });
        statisticsVO.setEventTotalPolylineData(eventTotalPolylineData);
        statisticsVO.generateStatisticsData();
        return R.ok(statisticsVO);
    }
    /**
     * 大数据分析平台-社区服务
     * @param communityId
     * @return
     */
    @Override
    public R getCommunityServiceStatistics(Long communityId) {
        BigScreenCommunityStatisticsVO statisticsVO = new BigScreenCommunityStatisticsVO();
        // 查询网格数据
        List<EventGridStatisticsVO> gridStatisticsList = comMngPopulationDAO.getEventScreenGridData(communityId);
        statisticsVO.setGridStatisticsList(gridStatisticsList);
        // 查询小区列表
        List<CivilVillageStatisticsVO> villageStatisticsList = comMngPopulationDAO.getCivilScreenVillageList(communityId);
        if (!villageStatisticsList.isEmpty()) {
            villageStatisticsList.forEach(village -> {
                CivilVillageStatisticsVO villageStatisticsVO =
                        comMngPopulationDAO.getCivilScreenVillageStatistics(village.getVillageId());
                if (villageStatisticsVO != null) {
                    village.setPeopleNum(villageStatisticsVO.getPeopleNum());
                    village.setHouseNum(villageStatisticsVO.getHouseNum());
                    village.setRegisterNum(villageStatisticsVO.getRegisterNum());
                    village.setFlowNum(villageStatisticsVO.getFlowNum());
                }
            });
        }
        statisticsVO.setVillageStatisticsList(villageStatisticsList);
        //商家地图点位数据
        List<ConvenientMerchantVO> merchantVOList = convenientMerchantDAO.selectMerchantListByCommunity(communityId);
        statisticsVO.setMerchantMapDataList(merchantVOList);
        return R.ok(statisticsVO);
    }
    /**
     * 分页获取热度排行商家
     * @param pagePopularMerchantDTO
     * @return
     */
    @Override
    public R getScreenPopularMerchants(PagePopularMerchantDTO pagePopularMerchantDTO) {
        Page page = new Page<>();
        page.setSize(pagePopularMerchantDTO.getPageSize());
        page.setCurrent(pagePopularMerchantDTO.getPageNum());
        List<ConvenientMerchantVO> popularMerchants = convenientMerchantDAO.getScreenPopularMerchants(page, pagePopularMerchantDTO);
        return R.ok(popularMerchants);
    }
    /**
     * 首页二级页面-微心愿
     * @param communityId
     * @return
     */
    @Override
    public R indexMicroWish(Long communityId) {
        BigScreenMicroWishStatisticsInfo statisticsInfo = comActMicroWishDAO.selectIndexMicroWishBaseData(communityId);
        //微心愿新增折线数据
        Date nowDate = new Date();
        List<StatisticsCommVO> microWishAddPolylineData = comActMicroWishDAO.getMicroWishAddPolylineData(communityId);
        int currentMon = Integer.parseInt(new SimpleDateFormat("MM").format(nowDate));
        for (int i = 1; i <= currentMon; i++) {
            String temp;
            if (i > 9) {
                temp = "" + i;
            } else {
                temp = "0" + i;
            }
            boolean isExist = microWishAddPolylineData.stream().anyMatch(e -> nonNull(e.getFiled()) &&
                    e.getFiled().endsWith(temp));
            if (!isExist) {
                StatisticsCommVO other = new StatisticsCommVO();
                other.setFiled(temp);
                other.setNum(0);
                microWishAddPolylineData.add(other);
            }
        }
        microWishAddPolylineData = microWishAddPolylineData.stream().filter(e -> nonNull(e.getFiled()))
                .sorted(Comparator.comparing(e -> e.getFiled())).collect(Collectors.toList());
        statisticsInfo.setMicroWishAddPolylineData(microWishAddPolylineData);
        //微心愿累计折线数据
        List<StatisticsCommVO> microWishTotalPolylineData = new ArrayList<>();
        String year = new SimpleDateFormat("yyyy").format(nowDate);
        microWishAddPolylineData.forEach(e -> {
            StatisticsCommVO temp = comActMicroWishDAO.getMicroWishTotalPolylineDate(communityId, year + e.getFiled());
            temp.setFiled(e.getFiled());
            microWishTotalPolylineData.add(temp);
        });
        statisticsInfo.setMicroWishTotalPolylineData(microWishTotalPolylineData);
        //微心愿展示列表
        List<ComActMicroWishVO> microWishDisplayList = comActMicroWishDAO.selectScreenDisplayList(communityId, pageSize);
        statisticsInfo.setMicroWishDisplayList(microWishDisplayList);
        return R.ok(statisticsInfo);
    }
    /**
     * 首页二级页面-随手拍
     * @param communityId
     * @return
     */
    @Override
    public R indexEasyPhoto(Long communityId) {
        BigScreenEasyPhotoStatisticsInfo statisticsInfo = comActEasyPhotoDAO.selectIndexEasyPhotoBaseData(communityId);
        //随手拍新增折线数据
        Date nowDate = new Date();
        List<StatisticsCommVO> easyPhotoAddPolylineData = comActEasyPhotoDAO.getEasyPhotoAddPolylineData(communityId);
        int currentMon = Integer.parseInt(new SimpleDateFormat("MM").format(nowDate));
        for (int i = 1; i <= currentMon; i++) {
            String temp;
            if (i > 9) {
                temp = "" + i;
            } else {
                temp = "0" + i;
            }
            boolean isExist = easyPhotoAddPolylineData.stream().anyMatch(e -> nonNull(e.getFiled()) &&
                    e.getFiled().endsWith(temp));
            if (!isExist) {
                StatisticsCommVO other = new StatisticsCommVO();
                other.setFiled(temp);
                other.setNum(0);
                easyPhotoAddPolylineData.add(other);
            }
        }
        easyPhotoAddPolylineData = easyPhotoAddPolylineData.stream().filter(e -> nonNull(e.getFiled()))
                .sorted(Comparator.comparing(e -> e.getFiled())).collect(Collectors.toList());
        statisticsInfo.setEasyPhotoAddPolylineData(easyPhotoAddPolylineData);
        //随手拍累计折线数据
        List<StatisticsCommVO> easyPhotoTotalPolylineData = new ArrayList<>();
        String year = new SimpleDateFormat("yyyy").format(nowDate);
        easyPhotoAddPolylineData.forEach(e -> {
            StatisticsCommVO temp = comActEasyPhotoDAO.getEasyPhotoTotalPolylineDate(communityId, year + e.getFiled());
            temp.setFiled(e.getFiled());
            easyPhotoTotalPolylineData.add(temp);
        });
        statisticsInfo.setEasyPhotoTotalPolylineData(easyPhotoTotalPolylineData);
        return R.ok(statisticsInfo);
    }
    /**
     * 首页二级页面-随手拍展示列表
     * @param communityId
     * @param classifyId
     * @return
     */
    @Override
    public R indexEasyPhotoList(Long communityId, Long classifyId) {
        List<ComActEasyPhotoVO> easyPhotoVOList = comActEasyPhotoDAO.indexEasyPhotoList(communityId, classifyId, pageSize);
        return R.ok(easyPhotoVOList);
    }
    /**
     * 首页二级页面-社区问卷
     * @param communityId
     * @return
     */
    @Override
    public R indexQuestionnaire(Long communityId) {
        BigScreenQuestionnaireStatisticsInfo statisticsInfo = comActQuestnaireDAO.getIndexQuestionnaireBaseData(communityId);
        //社区问卷新增折线数据
        Date nowDate = new Date();
        List<StatisticsCommVO> questionnaireAddPolylineData = comActQuestnaireDAO.getQuestionnaireAddPolylineData(communityId);
        int currentMon = Integer.parseInt(new SimpleDateFormat("MM").format(nowDate));
        for (int i = 1; i <= currentMon; i++) {
            String temp;
            if (i > 9) {
                temp = "" + i;
            } else {
                temp = "0" + i;
            }
            boolean isExist = questionnaireAddPolylineData.stream().anyMatch(e -> nonNull(e.getFiled()) &&
                    e.getFiled().endsWith(temp));
            if (!isExist) {
                StatisticsCommVO other = new StatisticsCommVO();
                other.setFiled(temp);
                other.setNum(0);
                questionnaireAddPolylineData.add(other);
            }
        }
        questionnaireAddPolylineData = questionnaireAddPolylineData.stream().filter(e -> nonNull(e.getFiled()))
                .sorted(Comparator.comparing(e -> e.getFiled())).collect(Collectors.toList());
        statisticsInfo.setQuestionnaireAddPolylineData(questionnaireAddPolylineData);
        //社区问卷累计折线数据
        List<StatisticsCommVO> questionnaireTotalPolylineData = new ArrayList<>();
        String year = new SimpleDateFormat("yyyy").format(nowDate);
        questionnaireAddPolylineData.forEach(e -> {
            StatisticsCommVO temp = comActQuestnaireDAO.getQuestionnaireTotalPolylineDate(communityId, year + e.getFiled());
            temp.setFiled(e.getFiled());
            questionnaireTotalPolylineData.add(temp);
        });
        statisticsInfo.setQuestionnaireTotalPolylineData(questionnaireTotalPolylineData);
        //展示列表
        List<ComActQuestnaireVO> displayList = comActQuestnaireDAO.selectQuestionnaireDisplayList(communityId, pageSize);
        statisticsInfo.setQuestionnaireDisplayList(displayList);
        return R.ok(statisticsInfo);
    }
    /**
     * 首页二级页面-社区动态
     * @param communityId
     * @return
     */
    @Override
    public R indexDyn(Long communityId) {
        BigScreenDynStatisticsInfo statisticsInfo = new BigScreenDynStatisticsInfo();
        List<StatisticsCommVO> dynCircleData = comActDynDAO.getIndexDynBaseData(communityId);
        statisticsInfo.setDynCircleData(dynCircleData);
        if (!dynCircleData.isEmpty()) {
            statisticsInfo.setDynNum(dynCircleData.stream().map(StatisticsCommVO::getNum).mapToInt(Integer::intValue).sum());
        }
        //社区动态新增折线数据
        Date nowDate = new Date();
        List<StatisticsCommVO> dynAddPolylineData = comActDynDAO.getDynAddPolylineData(communityId);
        int currentMon = Integer.parseInt(new SimpleDateFormat("MM").format(nowDate));
        for (int i = 1; i <= currentMon; i++) {
            String temp;
            if (i > 9) {
                temp = "" + i;
            } else {
                temp = "0" + i;
            }
            boolean isExist = dynAddPolylineData.stream().anyMatch(e -> nonNull(e.getFiled()) &&
                    e.getFiled().endsWith(temp));
            if (!isExist) {
                StatisticsCommVO other = new StatisticsCommVO();
                other.setFiled(temp);
                other.setNum(0);
                dynAddPolylineData.add(other);
            }
        }
        dynAddPolylineData = dynAddPolylineData.stream().filter(e -> nonNull(e.getFiled()))
                .sorted(Comparator.comparing(e -> e.getFiled())).collect(Collectors.toList());
        statisticsInfo.setDynAddPolylineData(dynAddPolylineData);
        //社区动态累计折线数据
        List<StatisticsCommVO> dynTotalPolylineData = new ArrayList<>();
        String year = new SimpleDateFormat("yyyy").format(nowDate);
        dynAddPolylineData.forEach(e -> {
            StatisticsCommVO temp = comActDynDAO.getDynTotalPolylineDate(communityId, year + e.getFiled());
            temp.setFiled(e.getFiled());
            dynTotalPolylineData.add(temp);
        });
        statisticsInfo.setDynTotalPolylineData(dynTotalPolylineData);
        return R.ok(statisticsInfo);
    }
    /**
     * 首页二级页面-社区动态展示列表
     * @param communityId
     * @param type
     * @return
     */
    @Override
    public R indexDynList(Long communityId, Long type) {
        List<ComActDynVO> dynList = comActDynDAO.indexDynList(communityId, type, pageSize);
        return R.ok(dynList);
    }
    /**
     * 首页二级页面-邻里圈
     * @param communityId
     * @return
     */
    @Override
    public R indexNeighbor(Long communityId) {
        BigScreenNeighborStatisticsInfo statisticsInfo = new BigScreenNeighborStatisticsInfo();
        List<StatisticsCommVO> neighborCircleData = comActNeighborCircleDAO.getIndexNeighborBaseData(communityId);
        statisticsInfo.setNeighborCircleData(neighborCircleData);
        if (!neighborCircleData.isEmpty()) {
            statisticsInfo.setPublishContentNum(neighborCircleData.stream().map(StatisticsCommVO::getNum).mapToInt(Integer::intValue).sum());
            statisticsInfo.setPublishTopicNum(neighborCircleData.size());
        }
        //邻里圈新增折线数据
        Date nowDate = new Date();
        List<StatisticsCommVO> neighborAddPolylineData = comActNeighborCircleDAO.getNeighborAddPolylineData(communityId);
        int currentMon = Integer.parseInt(new SimpleDateFormat("MM").format(nowDate));
        for (int i = 1; i <= currentMon; i++) {
            String temp;
            if (i > 9) {
                temp = "" + i;
            } else {
                temp = "0" + i;
            }
            boolean isExist = neighborAddPolylineData.stream().anyMatch(e -> nonNull(e.getFiled()) &&
                    e.getFiled().endsWith(temp));
            if (!isExist) {
                StatisticsCommVO other = new StatisticsCommVO();
                other.setFiled(temp);
                other.setNum(0);
                neighborAddPolylineData.add(other);
            }
        }
        neighborAddPolylineData = neighborAddPolylineData.stream().filter(e -> nonNull(e.getFiled()))
                .sorted(Comparator.comparing(e -> e.getFiled())).collect(Collectors.toList());
        statisticsInfo.setNeighborAddPolylineData(neighborAddPolylineData);
        //邻里圈累计折线数据
        List<StatisticsCommVO> neighborTotalPolylineData = new ArrayList<>();
        String year = new SimpleDateFormat("yyyy").format(nowDate);
        neighborAddPolylineData.forEach(e -> {
            StatisticsCommVO temp = comActNeighborCircleDAO.getNeighborTotalPolylineDate(communityId, year + e.getFiled());
            temp.setFiled(e.getFiled());
            neighborTotalPolylineData.add(temp);
        });
        statisticsInfo.setNeighborTotalPolylineData(neighborTotalPolylineData);
        return R.ok(statisticsInfo);
    }
    /**
     * 首页二级页面-邻里圈展示列表
     * @param communityId
     * @param topicId
     * @return
     */
    @Override
    public R indexNeighborList(Long communityId, Long topicId) {
        List<ComActNeighborCircleAdminVO> neighborList = comActNeighborCircleDAO.indexNeighborList(communityId, topicId, pageSize);
        return R.ok(neighborList);
    }
    /**
     * 首页二级页面-便民商家
     * @param communityId
     * @return
     */
    @Override
    public R indexMerchant(Long communityId) {
        BigScreenMerchantStatisticsInfo statisticsInfo = convenientMerchantDAO.getIndexMerchantBaseData(communityId);
        //资源类型饼图数据(暂无)
//        List<StatisticsCommVO> resourceTypeCircleData;
        //服务类型饼图数据
        List<StatisticsCommVO> serviceTypeCircleData = convenientMerchantDAO.selectServiceTypeCircleData(communityId);
        statisticsInfo.setServiceTypeCircleData(serviceTypeCircleData);
        if (!serviceTypeCircleData.isEmpty()) {
            //服务类型数
            statisticsInfo.setServiceTypeNum(serviceTypeCircleData.size());
        }
        //服务次数(目前暂时使用浏览量)新增折线数据
        Date nowDate = new Date();
        List<StatisticsCommVO> serviceTimesAddPolylineData = convenientMerchantDAO.getServiceTimesAddPolylineData(communityId);
        int currentMon = Integer.parseInt(new SimpleDateFormat("MM").format(nowDate));
        for (int i = 1; i <= currentMon; i++) {
            String temp;
            if (i > 9) {
                temp = "" + i;
            } else {
                temp = "0" + i;
            }
            boolean isExist = serviceTimesAddPolylineData.stream().anyMatch(e -> nonNull(e.getFiled()) &&
                    e.getFiled().endsWith(temp));
            if (!isExist) {
                StatisticsCommVO other = new StatisticsCommVO();
                other.setFiled(temp);
                other.setNum(0);
                serviceTimesAddPolylineData.add(other);
            }
        }
        serviceTimesAddPolylineData = serviceTimesAddPolylineData.stream().filter(e -> nonNull(e.getFiled()))
                .sorted(Comparator.comparing(e -> e.getFiled())).collect(Collectors.toList());
        statisticsInfo.setServiceTimesAddPolylineData(serviceTimesAddPolylineData);
        //服务次数(目前暂时使用浏览量)累计折线数据
        List<StatisticsCommVO> serviceTimesTotalPolylineData = new ArrayList<>();
        String year = new SimpleDateFormat("yyyy").format(nowDate);
        serviceTimesAddPolylineData.forEach(e -> {
            StatisticsCommVO temp = convenientMerchantDAO.getServiceTimesTotalPolylineDate(communityId, year + e.getFiled());
            temp.setFiled(e.getFiled());
            serviceTimesTotalPolylineData.add(temp);
        });
        statisticsInfo.setServiceTimesTotalPolylineData(serviceTimesTotalPolylineData);
        return R.ok(statisticsInfo);
    }
    /**
     * 首页二级页面-商家展示列表
     * @param communityId
     * @param categoryId
     * @return
     */
    @Override
    public R indexMerchantList(Long communityId, Long categoryId) {
        List<ConvenientMerchantVO> merchantList = convenientMerchantDAO.indexMerchantList(communityId, categoryId, pageSize);
        return R.ok(merchantList);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActReserveServiceImpl.java
@@ -14,6 +14,8 @@
import com.panzhihua.common.model.dtos.community.reserve.*;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.ComActReserveIndexVo;
import com.panzhihua.common.model.vos.community.bigscreen.IndexBackReserve;
import com.panzhihua.common.model.vos.community.bigscreen.IndexReserve;
import com.panzhihua.common.model.vos.community.questnaire.QuestnaiteSubSelectionVO;
import com.panzhihua.common.model.vos.community.questnaire.QuestnaiteSubVO;
import com.panzhihua.common.model.vos.community.reserve.*;
@@ -762,6 +764,18 @@
        return R.ok(this.baseMapper.getReserveIndexList(communityId));
    }
    @Override
    public IndexReserve indexReserve(Long communityId) {
        List<ComActReserveDO> comActReserveDOS=this.comActReserveMapper.selectList(new QueryWrapper<ComActReserveDO>().lambda().eq(ComActReserveDO::getCommunityId,communityId).orderByDesc(ComActReserveDO::getCreateAt).like(ComActReserveDO::getTitle,"返攀登记").eq(ComActReserveDO::getStatus,ComActReserveDO.status.jxz));
        if(!comActReserveDOS.isEmpty()){
            IndexBackReserve indexBackReserve=new IndexBackReserve();
            indexBackReserve.setCount(this.comActReserveRecordMapper.selectCount(new QueryWrapper<ComActReserveRecordDO>().lambda().eq(ComActReserveRecordDO::getReserveId,comActReserveDOS.get(0).getId())));
        }
        return null;
    }
    public static void getFileByBytes(byte[] bytes, String filePath, String fileName) {
        BufferedOutputStream bos = null;
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;
@@ -62,6 +62,8 @@
import cn.hutool.core.util.IdcardUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestParam;
import static java.util.Objects.nonNull;
/**
 * 实有人口Service实现类
@@ -127,8 +129,12 @@
    private ComEldersAuthStatisticsMapper comEldersAuthStatisticsMapper;
    @Resource
    private ComPensionAuthStatisticsDAO comPensionAuthStatisticsDAO;
    @Resource
    private ComActReserveMapper comActReserveMapper;
    @Value("${domain.aesKey:}")
    private String aesKey;
    @Resource
    private ComActEasyPhotoDAO comActEasyPhotoDAO;
    /**
     * 新增实有人口
@@ -6909,12 +6915,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()*100/count);
            ageStatisticsVO2.setSum(ageMap.get("age27").intValue());
            ageStatisticsVO2.setPercent(ageMap.get("age27").intValue()*100/count);
            ageStatisticsVO3.setSum(ageMap.get("age35").intValue());
            ageStatisticsVO3.setPercent(ageMap.get("age35").intValue()*100/count);
            ageStatisticsVO4.setSum(ageMap.get("age45").intValue());
            ageStatisticsVO4.setPercent(ageMap.get("age45").intValue()*100/count);
            ageStatisticsVO5.setSum(ageMap.get("age55").intValue());
            ageStatisticsVO5.setPercent(ageMap.get("age55").intValue()*100/count);
            ageStatisticsVO6.setSum(ageMap.get("age55over").intValue());
            ageStatisticsVO6.setPercent(ageMap.get("age55over").intValue()*100/count);
        }
        agePopulationList.add(ageStatisticsVO1);
@@ -7337,7 +7351,8 @@
    @Override
    public R getScreenEventDetail(BigScreenEventDetailDTO eventDetailDTO) {
        EventNewStatisticsVO statisticsVO = new EventNewStatisticsVO();
        if (eventDetailDTO.getType().equals(7)) {// 随手拍详情
        Integer eventType = eventDetailDTO.getEventType();
        if (eventDetailDTO.getType().equals(7) || (nonNull(eventType) && eventType.equals(2))) {// 随手拍详情
            statisticsVO = this.baseMapper.getEventScreenSSPDateil(eventDetailDTO.getEventId());
            if (statisticsVO != null && StringUtils.isNotEmpty(statisticsVO.getPhotoPathList())) {
                statisticsVO.setDangerLevel("0");
@@ -7699,6 +7714,130 @@
        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);
        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()*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("高龄老人")) {
                                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);
        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);
        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();
        IndexBackReserve indexBackReserve=new IndexBackReserve();
        indexBackReserve.setCount(comActReserveMapper.indexBackReserve(communityId));
        indexBackReserve.setIndexReserveSubList(comActReserveMapper.indexBackReserveSub(communityId));
        IndexHomeQuarantine indexHomeQuarantine=new IndexHomeQuarantine();
        indexHomeQuarantine.setCount(comActReserveMapper.indexHomeQuarantine(communityId));
        indexHomeQuarantine.setIndexReserveSubList(comActReserveMapper.IndexHomeQuarantineSub(communityId));
        indexReserve.setIndexBackReserve(indexBackReserve);
        indexReserve.setIndexHomeQuarantine(indexHomeQuarantine);
        indexInfo.setIndexReserve(indexReserve);
        BigscreenGridsGovernanceStatisticsVO bigscreenGridsGovernanceStatisticsVO=comActEasyPhotoDAO.selectBigscreenGridsGovern(communityId);
        indexInfo.setBigScreenGridStaticsReturn(setData(bigscreenGridsGovernanceStatisticsVO));
        return R.ok(indexInfo);
    }
    private void setMistake(ComMngPopulationMistakeExcelVO mvo, ComMngPopulationServeExcelVO vo) {
        mvo.setPoliticalOutlook(PopulPoliticalOutlookEnum.getCnDescByName(vo.getPoliticalOutlook()));
        mvo.setIsRent(PopulHouseUseEnum.getCnDescByName(vo.getIsRent()));
@@ -7939,4 +8078,58 @@
        return ObjectUtils.isEmpty(hashMap.get(key));
    }
    private BigScreenGridStaticsReturn setData(BigscreenGridsGovernanceStatisticsVO bigscreenGridsGovernanceStatisticsVO){
        List<BigScreenGridStaticsReturn> bigScreenGridStaticsReturnList=new ArrayList<>();
        BigScreenGridStaticsReturn bigScreenGridStaticsReturn=new BigScreenGridStaticsReturn();
        bigScreenGridStaticsReturn.setCount(bigscreenGridsGovernanceStatisticsVO.getEventTotal()+bigscreenGridsGovernanceStatisticsVO.getOtherTotal()+bigscreenGridsGovernanceStatisticsVO.getSafety());
        BigScreenGridStaticsReturn bigScreenGridStaticsReturn1=new BigScreenGridStaticsReturn();
        bigScreenGridStaticsReturn1.setTitle("突发事件报告");
        bigScreenGridStaticsReturn1.setNum(bigscreenGridsGovernanceStatisticsVO.getEventTFTotal());
        bigScreenGridStaticsReturn1.setPercent(bigscreenGridsGovernanceStatisticsVO.getEventTFTotal()*100/bigScreenGridStaticsReturn.getCount());
        bigScreenGridStaticsReturnList.add(bigScreenGridStaticsReturn1);
        BigScreenGridStaticsReturn bigScreenGridStaticsReturn2=new BigScreenGridStaticsReturn();
        bigScreenGridStaticsReturn2.setTitle("特殊人群服务");
        bigScreenGridStaticsReturn2.setNum(bigscreenGridsGovernanceStatisticsVO.getEventTSTotal());
        bigScreenGridStaticsReturn2.setPercent(bigscreenGridsGovernanceStatisticsVO.getEventTSTotal()*100/bigScreenGridStaticsReturn.getCount());
        bigScreenGridStaticsReturnList.add(bigScreenGridStaticsReturn2);
        BigScreenGridStaticsReturn bigScreenGridStaticsReturn3=new BigScreenGridStaticsReturn();
        bigScreenGridStaticsReturn3.setTitle("治安防控");
        bigScreenGridStaticsReturn3.setNum(bigscreenGridsGovernanceStatisticsVO.getEventZATotal());
        bigScreenGridStaticsReturn3.setPercent(bigscreenGridsGovernanceStatisticsVO.getEventZATotal()*100/bigScreenGridStaticsReturn.getCount());
        bigScreenGridStaticsReturnList.add(bigScreenGridStaticsReturn3);
        BigScreenGridStaticsReturn bigScreenGridStaticsReturn4=new BigScreenGridStaticsReturn();
        bigScreenGridStaticsReturn4.setTitle("民生服务");
        bigScreenGridStaticsReturn4.setNum(bigscreenGridsGovernanceStatisticsVO.getEventMSTotal());
        bigScreenGridStaticsReturn4.setPercent(bigscreenGridsGovernanceStatisticsVO.getEventMSTotal()*100/bigScreenGridStaticsReturn.getCount());
        bigScreenGridStaticsReturnList.add(bigScreenGridStaticsReturn4);
        BigScreenGridStaticsReturn bigScreenGridStaticsReturn5=new BigScreenGridStaticsReturn();
        bigScreenGridStaticsReturn5.setTitle("矛盾劝解");
        bigScreenGridStaticsReturn5.setNum(bigscreenGridsGovernanceStatisticsVO.getEventMDTotal());
        bigScreenGridStaticsReturn5.setPercent(bigscreenGridsGovernanceStatisticsVO.getEventMDTotal()*100/bigScreenGridStaticsReturn.getCount());
        bigScreenGridStaticsReturnList.add(bigScreenGridStaticsReturn5);
        BigScreenGridStaticsReturn bigScreenGridStaticsReturn6=new BigScreenGridStaticsReturn();
        bigScreenGridStaticsReturn6.setTitle("防灾减灾");
        bigScreenGridStaticsReturn6.setNum(bigscreenGridsGovernanceStatisticsVO.getEventFJTotal());
        bigScreenGridStaticsReturn6.setPercent(bigscreenGridsGovernanceStatisticsVO.getEventFJTotal()*100/bigScreenGridStaticsReturn.getCount());
        bigScreenGridStaticsReturnList.add(bigScreenGridStaticsReturn6);
        BigScreenGridStaticsReturn bigScreenGridStaticsReturn7=new BigScreenGridStaticsReturn();
        bigScreenGridStaticsReturn7.setTitle("政策法规宣传");
        bigScreenGridStaticsReturn7.setNum(bigscreenGridsGovernanceStatisticsVO.getEventFGTotal());
        bigScreenGridStaticsReturn7.setPercent(bigscreenGridsGovernanceStatisticsVO.getEventFGTotal()*100/bigScreenGridStaticsReturn.getCount());
        bigScreenGridStaticsReturnList.add(bigScreenGridStaticsReturn7);
        BigScreenGridStaticsReturn bigScreenGridStaticsReturn8=new BigScreenGridStaticsReturn();
        bigScreenGridStaticsReturn8.setTitle("安全巡查");
        bigScreenGridStaticsReturn8.setNum(bigscreenGridsGovernanceStatisticsVO.getSafety());
        bigScreenGridStaticsReturn8.setPercent(bigscreenGridsGovernanceStatisticsVO.getSafety()*100/bigScreenGridStaticsReturn.getCount());
        bigScreenGridStaticsReturnList.add(bigScreenGridStaticsReturn8);
        BigScreenGridStaticsReturn bigScreenGridStaticsReturn9=new BigScreenGridStaticsReturn();
        bigScreenGridStaticsReturn9.setTitle("其他");
        bigScreenGridStaticsReturn9.setNum(bigscreenGridsGovernanceStatisticsVO.getOtherTotal());
        bigScreenGridStaticsReturn9.setPercent(bigscreenGridsGovernanceStatisticsVO.getOtherTotal()*100/bigScreenGridStaticsReturn.getCount());
        bigScreenGridStaticsReturnList.add(bigScreenGridStaticsReturn9);
        bigScreenGridStaticsReturn.setBigScreenGridStaticsReturnList(bigScreenGridStaticsReturnList);
        return bigScreenGridStaticsReturn;
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActDiscussDOMapper.xml
@@ -257,6 +257,16 @@
        order by cadc.create_at desc
        limit 10
    </select>
    <select id="selectTypePercent" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT t1.filed, t1.num, ROUND( t1.num / t2.sum * 100, 2 ) AS percent
        FROM
        (SELECT IF(`type` = 1,'议事','投票') AS filed, COUNT(id) AS num FROM com_act_discuss
        WHERE community_id = #{communityId} AND is_del = 2 GROUP BY filed) t1,
        (SELECT COUNT(id) AS sum FROM com_act_discuss WHERE community_id = #{communityId} AND is_del = 2) t2
    </select>
    <select id="getTitles" resultType="java.lang.String">
        SELECT discuss_subject FROM com_act_discuss WHERE community_id = #{communityId} AND `type` = #{type} AND is_del = 2 ORDER BY release_at DESC limit #{pageSize}
    </select>
    <select id="countByCommunityId" resultType="Map">
        SELECT
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActDynDOMapper.xml
New file
@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.panzhihua.service_community.dao.ComActDynDAO">
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComActDynDO">
        <id column="id" property="id" />
        <result column="title" property="title" />
        <result column="status" property="status" />
        <result column="is_topping" property="isTopping" />
        <result column="publish_at" property="publishAt" />
        <result column="create_at" property="createAt" />
        <result column="update_at" property="updateAt" />
        <result column="community_id" property="communityId" />
        <result column="content" property="content" />
        <result column="cover" property="cover" />
        <result column="type" property="type" />
        <result column="cover_mode" property="coverMode" />
        <result column="jump_url" property="jumpUrl" />
        <result column="jump_type" property="jumpType" />
    </resultMap>
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id
    </sql>
    <select id="getIndexDynBaseData" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT filed, num, ROUND(num/total,2) AS percent FROM
        (SELECT t2.`name` AS filed, COUNT(1) AS num FROM com_act_dyn t1
        LEFT JOIN com_act_dyn_type t2 ON t1.type = t2.id
        WHERE t1.community_id = #{communityId} AND t1.`status` = 1 GROUP BY filed) temp1,
        (SELECT COUNT(t1.id) AS total FROM com_act_dyn t1
        LEFT JOIN com_act_dyn_type t2 ON t1.type = t2.id
        WHERE t1.community_id = #{communityId} AND t1.`status` = 1) temp2
    </select>
    <select id="getDynAddPolylineData" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT DATE_FORMAT( create_at, '%m' ) AS filed, COUNT(id) AS num
        FROM com_act_dyn
        WHERE community_id = #{communityId} AND `status` = 1
        AND DATE_FORMAT( create_at, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed
    </select>
    <select id="getDynTotalPolylineDate"
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT COUNT(id) AS num FROM com_act_dyn
        WHERE community_id = #{communityId} AND `status` = 1 AND DATE_FORMAT( create_at, '%Y%m' ) &lt;= #{date}
    </select>
    <select id="indexDynList" resultType="com.panzhihua.common.model.vos.community.ComActDynVO">
        SELECT t1.id, t1.title, t1.cover, t2.`name` AS typeName
        FROM com_act_dyn t1
        LEFT JOIN com_act_dyn_type t2 ON t1.type = t2.id
        WHERE t1.community_id = #{communityId} AND t1.`status` = 1 AND t2.is_del = 2
        <if test="type != null">
            AND t1.type = #{type}
        </if>
        ORDER BY t1.id DESC LIMIT #{pageSize}
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActEasyPhotoDOMapper.xml
@@ -132,8 +132,8 @@
            (select count(id) from com_act_easy_photo where `status` in (2,4) AND community_id = #{communityId} and del_tag = 0 and activity_type = 3 and examine_at between timestamp(date_add(curdate(), interval - 0 day)) and now()) as ptDayTotal,
            (select count(id) from com_act_easy_photo where `status` in (2,4) AND community_id = #{communityId} and del_tag = 0 and activity_type = 4) as ybAllTotal,
            (select count(id) from com_act_easy_photo where `status` in (2,4) AND community_id = #{communityId} and del_tag = 0 and activity_type = 4 and examine_at between timestamp(date_add(curdate(), interval - 0 day)) and now()) as ybDayTotal,
            (select IFNULL(sum(activity_amount),0) from com_act_easy_photo where `status` in (2,4) AND community_id = 2 and del_tag = 0) as allRewardAmount,
            (select IFNULL(sum(activity_amount),0)  from com_act_easy_photo where `status` in (2,4) AND community_id = 2 and del_tag = 0 and examine_at between timestamp(date_add(curdate(), interval - 0 day)) and now()) as dayRewardAmount
            (select IFNULL(sum(activity_amount),0) from com_act_easy_photo where `status` in (2,4) AND community_id = #{communityId} and del_tag = 0) as allRewardAmount,
            (select IFNULL(sum(activity_amount),0)  from com_act_easy_photo where `status` in (2,4) AND community_id = #{communityId} and del_tag = 0 and examine_at between timestamp(date_add(curdate(), interval - 0 day)) and now()) as dayRewardAmount
        FROM
            com_act_easy_photo
        WHERE
@@ -278,5 +278,184 @@
        select id,logo as cover,release_at as show_time,7 as type,"" as   jump_url,"" as jump_type from com_act_easy_photo_activity  where status =2  and community_id =#{communityId}
        order by show_time desc limit 30
    </select>
    <select id="selectStatisticsList" resultType="com.panzhihua.common.model.vos.community.ComActEasyPhotoVO">
        SELECT t1.id, IF(`name` IS NULL,'其他',`name`) AS classifyName
        FROM com_act_easy_photo t1
        LEFT JOIN com_act_easy_photo_classify t2 ON t1.classify_id = t2.id
        WHERE t1.community_id = #{communityId} AND del_tag = 0
    </select>
    <select id="selectResidentAutonomyStatistics"
            resultType="com.panzhihua.common.model.vos.community.bigscreen.ResidentAutonomyStatisticsVO">
        SELECT * FROM
        (SELECT COUNT(id) AS easyPhotoCurrentMonCount FROM com_act_easy_photo WHERE community_id = #{communityId} AND del_tag = 0 AND DATE_FORMAT( create_at, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )) t1,
        (SELECT COUNT(id) AS microWishCurrentMonCount FROM com_act_micro_wish WHERE community_id = #{communityId} AND DATE_FORMAT( create_at, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )) t2,
        (SELECT IF(SUM(aim_num) IS NULL,0,SUM(aim_num)) AS aimNum FROM com_act_micro_wish WHERE community_id = #{communityId} AND `status` != 4) t3,
        (SELECT COUNT(id) AS microWishTotal FROM com_act_micro_wish WHERE community_id = #{communityId} AND `status` != 4) t4,
        (SELECT COUNT(id) AS committeeCurrentMonCount FROM com_act_committee WHERE community_id = #{communityId} AND DATE_FORMAT( create_time, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )) t5,
        (SELECT COUNT(id) AS committeeTotal FROM com_act_committee WHERE community_id = #{communityId}) t6,
        (SELECT ROUND( a.num / b.total * 100, 2 ) AS areaCoverPercent FROM
            (SELECT COUNT(DISTINCT(area_id)) AS num FROM com_act_committee WHERE community_id = #{communityId}) a,
            (SELECT COUNT(village_id) AS total FROM com_mng_village WHERE community_id = #{communityId}) b
        ) t7,
        (SELECT COUNT(id) AS discussCurrentMonCount FROM com_act_discuss WHERE community_id = #{communityId} AND is_del = 2 AND DATE_FORMAT( create_at, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )) t8,
        (SELECT COUNT(id) AS discussTotal FROM com_act_discuss WHERE community_id = #{communityId} AND is_del = 2) t9,
        (SELECT COUNT(id) AS neighborCurrentMonCount FROM com_act_neighbor_circle WHERE community_id = #{communityId} AND is_del = 2 AND DATE_FORMAT( create_at, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )) t10,
        (SELECT COUNT(id) AS neighborTotal, SUM(fabulous_num) AS neighborFabulousNum, SUM(forward_num) AS neighborForwardNum,
            SUM(comment_num) AS neighborCommentNum FROM com_act_neighbor_circle WHERE community_id = #{communityId} AND is_del = 2) t11,
        (SELECT COUNT(c1.id) AS repairCurrentMonCount FROM com_property_repair c1
            LEFT JOIN com_property c2 ON c1.property_id = c2.id
            WHERE c2.community_id = #{communityId} AND DATE_FORMAT( c1.create_time, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )) t12,
        (SELECT COUNT(c1.id) AS repairTotal FROM com_property_repair c1
            LEFT JOIN com_property c2 ON c1.property_id = c2.id
            WHERE c2.community_id = #{communityId}) t13,
        (SELECT IF(SUM(quantity) IS NULL,0,SUM(quantity)) AS warehouseCurrentMonCount FROM com_act_warehouse_donates WHERE community_id = #{communityId} AND `status` = 2 AND DATE_FORMAT( signing_at, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )) t14,
        (SELECT warehouseTotal, warehouseSurplusTotal, warehouseTotal - warehouseSurplusTotal AS warehouseApplyTotal FROM
            (SELECT IF(SUM(quantity) IS NULL,0,SUM(quantity)) AS warehouseTotal, IF(SUM(surplus_quantity) IS NULL,0,SUM(surplus_quantity)) AS warehouseSurplusTotal FROM com_act_warehouse_donates WHERE community_id = #{communityId} AND `status` = 2) temp) t15,
        (SELECT COUNT(DISTINCT d2.user_id) AS discussCount FROM com_act_discuss d1
            INNER JOIN com_act_discuss_comment d2 ON d1.id = d2.discuss_id
            WHERE d1.community_id = #{communityId} AND d1.is_del = 2 AND `type` = 1) t16,
        (SELECT COUNT(DISTINCT d2.user_id) AS voteCount FROM com_act_discuss d1
            INNER JOIN com_act_discuss_option_user d2 ON d1.id = d2.discuss_id
            WHERE d1.community_id = #{communityId} AND d1.is_del = 2 AND `type` = 2) t17
    </select>
    <select id="selectGridsGovernance"
            resultType="com.panzhihua.common.model.vos.community.bigscreen.GridsGovernanceStatisticsVO">
        SELECT
        IFNULL((SELECT  count( e.id ) FROM   `event` AS e
        LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id
        WHERE   e.event_category = 1   AND e.event_type = 5   AND e.event_status = 2    AND egd.grid_community_id = #{communityId}), 0) +
        IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
        WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 7), 0) AS eventTFTotal,
        IFNULL((   SELECT  count( e1.id )   FROM   `event` AS e1
        LEFT JOIN event_grid_data AS egd1 ON egd1.id = e1.grid_id     WHERE    event_category = 1     AND event_type = 1     AND event_status = 2      AND egd1.grid_community_id = #{communityId}     ),   0   ) +
        IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
        WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 4), 0) AS eventZATotal,
        IFNULL((   SELECT    count( e2.id )    FROM    `event` AS e2     LEFT JOIN event_grid_data AS egd2 ON egd2.id = e2.grid_id    WHERE    event_category = 1      AND event_type = 3     AND event_status = 2     AND egd2.grid_community_id = #{communityId}      ),   0   ) +
        IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
        WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 5), 0) AS eventMDTotal,
        IFNULL((   SELECT    count( e3.id )    FROM     `event` AS e3    LEFT JOIN event_grid_data AS egd3 ON egd3.id = e3.grid_id    WHERE     event_category = 1     AND event_type = 6     AND event_status = 2      AND egd3.grid_community_id = #{communityId}     ),   0   ) +
        IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
        WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 3), 0) AS eventTSTotal,
        IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
        WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 8), 0) AS eventFJTotal,
        IFNULL((   SELECT    count( e5.id )    FROM     `event` AS e5    LEFT JOIN event_grid_data AS egd5 ON egd5.id = e5.grid_id    WHERE     event_category = 1     AND event_type = 2     AND event_status = 2      AND egd5.grid_community_id = #{communityId}     ),   0   ) +
        IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
        WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 6), 0) AS eventMSTotal,
        IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
        WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 1), 0) AS otherTotal,
        IFNULL((SELECT  count( e.id ) FROM   `event` AS e
        LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id
        WHERE   e.event_category = 1   AND e.event_type = 5   AND e.event_deal_status = 4    AND egd.grid_community_id = #{communityId}), 0) +
        IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
        WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 7), 0) AS eventTFDeal,
        IFNULL((   SELECT  count( e1.id )   FROM   `event` AS e1
        LEFT JOIN event_grid_data AS egd1 ON egd1.id = e1.grid_id     WHERE    event_category = 1     AND event_type = 1     AND event_deal_status = 4      AND egd1.grid_community_id = #{communityId}     ),   0   ) +
        IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
        WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 4), 0) AS eventZADeal,
        IFNULL((   SELECT    count( e2.id )    FROM    `event` AS e2     LEFT JOIN event_grid_data AS egd2 ON egd2.id = e2.grid_id    WHERE    event_category = 1      AND event_type = 3     AND event_deal_status = 4     AND egd2.grid_community_id = #{communityId}      ),   0   ) +
        IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
        WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 5), 0) AS eventMDDeal,
        IFNULL((   SELECT    count( e3.id )    FROM     `event` AS e3    LEFT JOIN event_grid_data AS egd3 ON egd3.id = e3.grid_id    WHERE     event_category = 1     AND event_type = 6     AND event_deal_status = 4      AND egd3.grid_community_id = #{communityId}     ),   0   ) +
        IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
        WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 3), 0) AS eventTSDeal,
        IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
        WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 8), 0) AS eventFJDeal,
        IFNULL((   SELECT    count( e5.id )    FROM     `event` AS e5    LEFT JOIN event_grid_data AS egd5 ON egd5.id = e5.grid_id    WHERE     event_category = 1     AND event_type = 2     AND event_deal_status = 4      AND egd5.grid_community_id = #{communityId}     ),   0   ) +
        IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
        WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 6), 0) AS eventMSDeal,
        IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
        WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 1), 0) AS otherDeal,
        IFNULL((SELECT  count(id) FROM  event_grid_data WHERE  grid_community_id = #{communityId}), 0) AS gridTotal,
        IFNULL((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 = #{communityId}), 0) AS gridMemberTotal
    </select>
    <select id="selectIndexEasyPhotoBaseData"
            resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenEasyPhotoStatisticsInfo">
        SELECT
        (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id IN (1,3,4,5,6,7,8)) AS eventDealTotal,
        (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 7) AS eventTFDeal,
        (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 4) AS eventZADeal,
        (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 5) AS eventMDDeal,
        (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 3) AS eventTSDeal,
        (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 6) AS eventMSDeal,
        (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 8) AS eventFJDeal,
        (SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` = 4 AND del_tag = 0 AND classify_id = 1) AS otherDeal
    </select>
    <select id="getEasyPhotoAddPolylineData"
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT DATE_FORMAT( create_at, '%m' ) AS filed, COUNT(id) AS num
        FROM com_act_easy_photo
        WHERE community_id = #{communityId} AND del_tag = 0
        AND DATE_FORMAT( create_at, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed
    </select>
    <select id="getEasyPhotoTotalPolylineDate"
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT COUNT(id) AS num FROM com_act_easy_photo
        WHERE community_id = #{communityId} AND del_tag = 0
        AND DATE_FORMAT( create_at, '%Y%m' ) &lt;= #{date}
    </select>
    <select id="indexEasyPhotoList" resultType="com.panzhihua.common.model.vos.community.ComActEasyPhotoVO">
        SELECT t1.id, t1.detail, t1.photo_path_list, t1.`status`, t2.`name` AS classifyName
        FROM com_act_easy_photo t1
        LEFT JOIN com_act_easy_photo_classify t2 ON t1.classify_id = t2.id
        WHERE t1.community_id = #{communityId} AND t1.`status` = 4 AND t1.del_tag = 0
        <if test="classifyId != null">
            AND t1.classify_id = #{classifyId}
        </if>
        ORDER BY t1.id DESC LIMIT #{pageSize}
    </select>
    <select id="selectBigscreenGridsGovern" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigscreenGridsGovernanceStatisticsVO">
        SELECT
                IFNULL((SELECT  count( e.id ) FROM   `event` AS e
                                                         LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id
                        WHERE   e.event_category = 1   AND e.event_type = 5   AND e.event_status = 2    AND egd.grid_community_id = #{communityId}), 0) +
                IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
                        WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 7), 0) AS eventTFTotal,
                IFNULL((   SELECT  count( e1.id )   FROM   `event` AS e1
                                                               LEFT JOIN event_grid_data AS egd1 ON egd1.id = e1.grid_id     WHERE    event_category = 1     AND event_type = 1     AND event_status = 2      AND egd1.grid_community_id = #{communityId}     ),   0   ) +
                IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
                        WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 4), 0) AS eventZATotal,
                IFNULL((   SELECT    count( e2.id )    FROM    `event` AS e2     LEFT JOIN event_grid_data AS egd2 ON egd2.id = e2.grid_id    WHERE    event_category = 1      AND event_type = 3     AND event_status = 2     AND egd2.grid_community_id = #{communityId}      ),   0   ) +
                IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
                        WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 5), 0) AS eventMDTotal,
                IFNULL((   SELECT    count( e3.id )    FROM     `event` AS e3    LEFT JOIN event_grid_data AS egd3 ON egd3.id = e3.grid_id    WHERE     event_category = 1     AND event_type = 6     AND event_status = 2      AND egd3.grid_community_id = #{communityId}     ),   0   ) +
                IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
                        WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 3), 0) AS eventTSTotal,
                IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
                        WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 8), 0) AS eventFJTotal,
                IFNULL((   SELECT    count( e5.id )    FROM     `event` AS e5    LEFT JOIN event_grid_data AS egd5 ON egd5.id = e5.grid_id    WHERE     event_category = 1     AND event_type = 2     AND event_status = 2      AND egd5.grid_community_id = #{communityId}     ),   0   ) +
                IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
                        WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 6), 0) AS eventMSTotal,
                IFNULL((   SELECT    count( e5.id )    FROM     `event` AS e5    LEFT JOIN event_grid_data AS egd5 ON egd5.id = e5.grid_id    WHERE     event_category = 1     AND event_type = 8     AND event_status = 2      AND egd5.grid_community_id = #{communityId}     ),   0   ) +
                IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
                        WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 2), 0) AS eventFGTotal,
                IFNULL((SELECT COUNT(1) FROM com_act_easy_photo
                        WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id = 1), 0) AS otherTotal,
                IFNULL((SELECT  count( e.id ) FROM   `event` AS e
                                                         LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id
                        WHERE   e.event_category = 1     AND e.event_status = 2    AND egd.grid_community_id = #{communityId}), 0) AS eventTotal,
                IFNULL((SELECT  count(id) FROM  com_sw_patrol_record WHERE  community_id = #{communityId}), 0) AS safety
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActMicroWishDOMapper.xml
@@ -164,5 +164,41 @@
        ORDER BY  w.create_at desc
    </select>
    <select id="selectRealizePercent" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT t1.filed, t1.num, ROUND( t1.num / t2.sum * 100, 2 ) AS percent
        FROM
        (SELECT IF(`status` = 6,'已实现','待实现') AS filed, COUNT(`status`) AS num FROM com_act_micro_wish
        WHERE community_id = #{communityId} AND `status` NOT IN(1,4) GROUP BY filed) t1,
        (SELECT COUNT(id) AS sum FROM com_act_micro_wish WHERE community_id = #{communityId} AND  `status` NOT IN(1,4)) t2
    </select>
    <select id="getPassedAllImages" resultType="java.lang.String">
        SELECT photo_path_list FROM com_act_micro_wish
        WHERE community_id = #{communityId} AND (`status` =2 OR `status` = 3 OR `status` = 5 OR `status` = 6 OR `status` = 7)
        AND photo_path_list IS NOT NULL AND photo_path_list != ''
        ORDER BY create_at DESC limit #{pageSize}
    </select>
    <select id="selectIndexMicroWishBaseData"
            resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenMicroWishStatisticsInfo">
        SELECT
        (SELECT COUNT(id) FROM com_act_micro_wish WHERE community_id = #{communityId} AND `status` NOT IN(1,4)) AS microWishTotal,
        (SELECT COUNT(id) FROM com_act_micro_wish WHERE community_id = #{communityId} AND `status` = 6) AS microWishRealized,
        (SELECT COUNT(id) FROM com_act_micro_wish WHERE community_id = #{communityId} AND `status` NOT IN(1,4,6)) AS microWishUnrealized
    </select>
    <select id="getMicroWishAddPolylineData"
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT DATE_FORMAT( create_at, '%m' ) AS filed, COUNT(id) AS num FROM com_act_micro_wish
        WHERE community_id = #{communityId} AND `status` NOT IN(1,4) AND DATE_FORMAT( create_at, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed
    </select>
    <select id="getMicroWishTotalPolylineDate"
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT COUNT(id) AS num FROM com_act_micro_wish
        WHERE community_id = #{communityId} AND `status` NOT IN(1,4) AND DATE_FORMAT( create_at, '%Y%m' ) &lt;= #{date}
    </select>
    <select id="selectScreenDisplayList"
            resultType="com.panzhihua.common.model.vos.community.ComActMicroWishVO">
        SELECT id, `status`, detail, photo_path_list
        FROM com_act_micro_wish
        WHERE community_id = #{communityId} AND `status` NOT IN(1,4) ORDER BY create_at DESC LIMIT #{pageSize}
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActNeighborCircleDOMapper.xml
@@ -115,5 +115,50 @@
        case when nc.`status`=1 then 0 else 1 end,
        nc.`status` asc,nc.create_at desc
    </select>
    <select id="getAllImages" resultType="java.lang.String">
        SELECT release_images FROM com_act_neighbor_circle
        WHERE community_id = #{communityId} AND `status` = 2 AND release_images IS NOT NULL AND release_images != ''
        ORDER BY create_at DESC limit #{pageSize}
    </select>
    <select id="getContents" resultType="java.lang.String">
        SELECT release_content FROM com_act_neighbor_circle
        WHERE community_id = #{communityId} AND `status` = 2 AND release_content IS NOT NULL AND release_content != ''
        ORDER BY create_at DESC limit #{pageSize}
    </select>
    <select id="getIndexNeighborBaseData"
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT filed, sum, ROUND(sum/total,2) AS percent FROM
        (SELECT t2.`name` AS filed, COUNT(1) AS sum FROM com_act_neighbor_circle t1
        LEFT JOIN com_act_neighbor_circle_topic t2 ON t1.topic_id = t2.id
        WHERE t1.community_id = #{communityId} AND t1.`status` IN (2,3) AND t1.is_del = 2 AND t2.`status` = 1 GROUP BY filed) temp1,
        (SELECT COUNT(t1.id) AS total FROM com_act_neighbor_circle t1
        LEFT JOIN com_act_neighbor_circle_topic t2 ON t1.topic_id = t2.id
        WHERE t1.community_id = #{communityId} AND t1.`status` IN (2,3) AND t1.is_del = 2 AND t2.`status` = 1) temp2
    </select>
    <select id="getNeighborAddPolylineData"
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT DATE_FORMAT( t1.create_at, '%m' ) AS filed, COUNT(t1.id) AS num
        FROM com_act_neighbor_circle t1
        LEFT JOIN com_act_neighbor_circle_topic t2 ON t1.topic_id = t2.id
        WHERE t1.community_id = #{communityId} AND t1.`status` IN (2,3) AND t1.is_del = 2 AND t2.`status` = 1
        AND DATE_FORMAT( t1.create_at, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed
    </select>
    <select id="getNeighborTotalPolylineDate"
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT COUNT(t1.id) AS num FROM com_act_neighbor_circle t1
        LEFT JOIN com_act_neighbor_circle_topic t2 ON t1.topic_id = t2.id
        WHERE t1.community_id = #{communityId} AND t1.`status` IN (2,3) AND t1.is_del = 2 AND t2.`status` = 1 AND DATE_FORMAT( t1.create_at, '%Y%m' ) &lt;= #{date}
    </select>
    <select id="indexNeighborList"
            resultType="com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleAdminVO">
        SELECT t1.id, t1.release_content, t1.release_images, t1.comment_num, t1.fabulous_num, t2.`name` AS topicName
        FROM com_act_neighbor_circle t1
        LEFT JOIN com_act_neighbor_circle_topic t2 ON t1.topic_id = t2.id
        WHERE t1.community_id = #{communityId} AND t1.`status` IN (2,3) AND t1.is_del = 2 AND t2.`status` = 1
        <if test="topicId != null">
            AND t1.topic_id = #{topicId}
        </if>
        ORDER BY t1.id DESC LIMIT #{pageSize}
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActQuestnaireDOMapper.xml
@@ -211,6 +211,43 @@
            su.is_volunteer = 1
            AND caqua.questnaire_id = #{questId}
    </select>
    <select id="getIndexQuestionnaireBaseData"
            resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenQuestionnaireStatisticsInfo">
        SELECT COUNT(id) AS questionnaireNum, SUM(join_count) AS joinNum FROM com_act_questnaire WHERE community_id = #{communityId} AND state IN (2,3)
    </select>
    <select id="getQuestionnaireAddPolylineData"
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT DATE_FORMAT( create_at, '%m' ) AS filed, COUNT(id) AS num
        FROM com_act_questnaire
        WHERE community_id = #{communityId} AND state IN (2,3)
        AND DATE_FORMAT( create_at, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed
    </select>
    <select id="getQuestionnaireTotalPolylineDate"
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT COUNT(id) AS num FROM com_act_questnaire
        WHERE community_id = #{communityId} AND state IN (2,3) AND DATE_FORMAT( create_at, '%Y%m' ) &lt;= #{date}
    </select>
    <select id="selectQuestionnaireDisplayList"
            resultType="com.panzhihua.common.model.vos.community.ComActQuestnaireVO">
        SELECT id, title, `count`, view_num, join_count, is_cover, state FROM com_act_questnaire
        WHERE community_id = #{communityId} AND state IN (2,3) ORDER BY id DESC LIMIT #{pageSize}
    </select>
    <select id="getIndexQuestionnaireBaseData"
            resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenQuestionnaireStatisticsInfo">
        SELECT COUNT(id) AS questionnaireNum, SUM(join_count) AS joinNum FROM com_act_questnaire WHERE community_id = #{communityId}
    </select>
    <select id="getQuestionnaireAddPolylineData"
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT DATE_FORMAT( create_at, '%m' ) AS filed, COUNT(id) AS num
        FROM com_act_questnaire
        WHERE community_id = #{communityId}
        AND DATE_FORMAT( create_at, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed
    </select>
    <select id="getQuestionnaireTotalPolylineDate"
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT COUNT(id) AS num FROM com_act_questnaire
        WHERE community_id = #{communityId} AND DATE_FORMAT( create_at, '%Y%m' ) &lt;= #{date}
    </select>
    <insert id="addNoNotice">
        insert into com_act_questnaire_user(questnaire_id,user_id,create_at)
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActReserveMapper.xml
@@ -192,4 +192,34 @@
        select id,title,type,img_type,img_url,adver_position_top,adver_position_application from com_act_reserve where `status` = 2 and is_del = 2
        and community_id = #{communityId}
    </select>
    <select id="indexBackReserve" resultType="Integer">
        select count(*) from com_act_reserve t  LEFT JOIN com_act_reserve_record t3 on t.id=t3.reserve_id where t.community_id = #{communityId} and t.title like '%返攀登记%'
    </select>
    <select id="indexHomeQuarantine" resultType="Integer">
        select count(*) from com_act_reserve t  LEFT JOIN com_act_reserve_record t3 on t.id=t3.reserve_id where t.community_id = #{communityId} and t.title like '%居家隔离%'
    </select>
    <select id="indexBackReserveSub" resultType="com.panzhihua.common.model.vos.community.bigscreen.IndexReserveSub">
        select a.*,IFNULL(b.num,0) num from (select count(t2.id) as allCount,t1.key from com_act_reserve t
                                                                                             LEFT JOIN com_act_reserve_sub t1 on t.id = t1.reserve_id
                                                                                             LEFT JOIN com_act_reserve_answer_content t2 on t1.id = t2.reserve_sub_id
                                             where t.community_id = #{communityId} and t.title like '%返攀登记%' and t1.`key` in (1,2,3,17,19,26) group by t1.key) a LEFT JOIN
                                            (select count(t2.id) as num,t1.key from com_act_reserve t
                                                                                        LEFT JOIN com_act_reserve_sub t1 on t.id = t1.reserve_id
                                                                                        LEFT JOIN com_act_reserve_answer_content t2 on t1.id = t2.reserve_sub_id
                                             where t.community_id = #{communityId} and t.title like '%返攀登记%' and t1.`key` in (1,2,3,17,19,26) and t2.answer_content = '是' group by t1.key) b on a.key = b.key
    </select>
    <select id="IndexHomeQuarantineSub" resultType="com.panzhihua.common.model.vos.community.bigscreen.IndexReserveSub">
        select a.*,IFNULL(b.num,0) num from (select count(t2.id) as allCount,t1.key from com_act_reserve t
                                                                                             LEFT JOIN com_act_reserve_sub t1 on t.id = t1.reserve_id
                                                                                             LEFT JOIN com_act_reserve_answer_content t2 on t1.id = t2.reserve_sub_id
                                             where t.community_id = #{communityId} and t.title like '%居家隔离%' and t1.`key` in (12,14,16) group by t1.key) a LEFT JOIN
                                            (select count(t2.id) as num,t1.key from com_act_reserve t
                                                                                        LEFT JOIN com_act_reserve_sub t1 on t.id = t1.reserve_id
                                                                                        LEFT JOIN com_act_reserve_answer_content t2 on t1.id = t2.reserve_sub_id
                                             where t.community_id = #{communityId} and t.title like '%居家隔离%' and t1.`key` in (12,14,16) and t2.answer_content = '是' group by t1.key) b on a.key = b.key
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActWarehouseDonatesMapper.xml
@@ -115,5 +115,18 @@
            (SELECT IF(SUM(goods_num) IS NULL,0,SUM(goods_num)) FROM com_act_warehouse_apply WHERE community_id = #{communityId} AND `status` = 3 AND actual_time LIKE #{currentMonth}) as mothDec,
            (SELECT IF(SUM(goods_num) IS NULL,0,SUM(goods_num)) FROM com_act_warehouse_apply WHERE community_id = #{communityId} AND `status` = 3 AND actual_time LIKE #{today}) as dayDec
    </select>
    <select id="getWarehouseDonateRecords" resultType="java.lang.String">
        SELECT CONCAT('收到爱心人士捐赠的',item,'x', quantity)
        FROM com_act_warehouse_donates WHERE community_id = #{communityId} AND `status` = 2 ORDER BY signing_at DESC limit #{pageSize}
    </select>
    <select id="getWarehouseLoveTransfer" resultType="java.lang.String">
        SELECT t1.content FROM com_act_warehouse_operation t1
        LEFT JOIN com_act_warehouse_donates t2 ON t1.goods_id = t2.id
        WHERE t2.community_id = #{communityId} AND t1.`type` = 2 ORDER BY create_time DESC limit #{pageSize}
    </select>
    <select id="getWarehouseImages" resultType="java.lang.String">
        SELECT image FROM com_act_warehouse_donates
        WHERE community_id = #{communityId} AND `status` = 2 AND image IS NOT NULL AND image != '' ORDER BY signing_at DESC limit #{pageSize}
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComMngPopulationDOMapper.xml
@@ -638,4 +638,54 @@
    <update id="updatePopulationUnit">
        update com_mng_population set unit_no = #{newUnitNo} where village_id = #{villageId} and floor = #{floor} and unit_no = #{oldUnitNo}
    </update>
    <select id="baseInfo" resultType="com.panzhihua.common.model.vos.community.bigscreen.BaseInfo">
        select count(id) as population,
               IFNULL((select count(id) from com_mng_population_house where community_id = cmpct.community_id),0) as house,
               IFNULL((select count(id) from com_mng_real_company where community_id = cmpct.community_id),0) as company,
               IFNULL((select count(DISTINCT `name`) from com_mng_village where community_id = cmpct.community_id),0) as village,
               IFNULL((select count(user_id) from sys_user where community_id = cmpct.community_id and type=1),0) as user,
                        IFNULL((select count(id) from com_pb_member where community_id = cmpct.community_id ),0) as partyMember,
                        IFNULL((select count(user_id) from sys_user where community_id = cmpct.community_id and is_volunteer=1 and type=1),0) as volunteer,
                        IFNULL((select count(id) from com_pb_org where community_id = cmpct.community_id and parent_id = 0),0) as partyOrg
        from com_mng_population_community_tags AS cmpct
        where cmpct.community_id = #{communityId}
    </select>
    <select id="indexDynamic" resultType="com.panzhihua.common.model.vos.community.bigscreen.IndexDynamic">
        SELECT    count( id ) AS microWish,
                  IFNULL(( SELECT count( id ) FROM com_act_easy_photo WHERE status = 4 AND community_id = camw.community_id ),0) AS easyPhoto,
                  IFNULL(( SELECT count( id ) FROM com_pb_activity WHERE STATUS = 5 AND community_id = camw.community_id ),0) AS partyActivity,
                  IFNULL(( SELECT count( id ) FROM com_act_questnaire WHERE community_id = camw.community_id ),0) AS questionnaire,
                  IFNULL(( SELECT count( id ) FROM com_act_dyn WHERE community_id = camw.community_id AND STATUS = 1 ),0) AS dynamic,
                  IFNULL(( SELECT count( id ) FROM com_convenient_merchants WHERE community_id = camw.community_id AND is_del = 0 ),0) AS convenient,
                  IFNULL(( SELECT count( id ) FROM com_act_neighbor_circle WHERE community_id = camw.community_id AND is_del = 2 ),0) AS neighbor
                    FROM    com_act_micro_wish AS camw    WHERE    camw.STATUS = 6
                                                AND camw.community_id = #{communityId}
    </select>
    <select id="getGridsGovernanceEventList"
            resultType="com.panzhihua.common.model.vos.community.screen.event.EventGridIncidentStatisticsVO">
        SELECT event_type AS type, IFNULL( NULL, 1 ) AS eventType, e.id AS eventId, happent_lat_lng AS latLng, event_des AS content,
        (SELECT url FROM event_resource WHERE ref_id = e.id AND classification = 1 AND `type` = 1 LIMIT 1) AS cover, e.create_at,
        CASE
        WHEN event_deal_status = 4 THEN 1
        ELSE 2 END `status`
        FROM `event` AS e
        LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id
        WHERE e.event_category = 1 AND e.event_type IN ( 1, 2, 3, 5, 6 ) AND e.event_status = 2 AND egd.grid_community_id = #{communityId}
        UNION ALL SELECT
        CASE
        WHEN classify_id = 4 THEN 1
        WHEN classify_id = 6 THEN 2
        WHEN classify_id = 5 THEN 3
        WHEN classify_id = 7 THEN 5
        WHEN classify_id = 3 THEN 6
        WHEN classify_id = 8 THEN 9
        WHEN classify_id = 1 THEN 10
        END type, IFNULL( NULL, 2 ) AS eventType, id AS eventId, lng_lat AS latLng, detail AS content, substring_index(photo_path_list, ',', 1) AS cover, create_at,
        CASE
        WHEN handle_status = 2 THEN 1
        ELSE 2 END `status`
        FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id IN (1,3,4,5,6,7,8)
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComPbMemberMapper.xml
@@ -5,4 +5,34 @@
    <select id="selectById" resultType="com.panzhihua.common.model.vos.partybuilding.ComPbMemberVO">
        select t.*,t2.name as orgName from com_pb_member t left join com_mng_population t1 on t.id_card = t1.card_no_str left join com_pb_org t2 on t.org_id = t2.id where t1.card_no_str =#{idCard}
    </select>
    <select id="selectActivityCountMonth" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenActivityLine">
        select  ( select count(id) from com_pb_activity where status!=6 and community_id =#{communityId} and release_time >= DATE_FORMAT(  CONCAT(year(now()),'-',#{date},'-00'), '%Y-%m-00 00:00:00') and  DATE_FORMAT( LAST_DAY(CONCAT(year(now()),'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=release_time) y,
            (select count(id) from com_pb_activity where status!=6 and community_id =#{communityId} and DATE_FORMAT( LAST_DAY(CONCAT(year(now()),'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=release_time) countY
    </select>
    <select id="selectActivityTop" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenActivityTop">
        select t.name,t.photo_path as url,t1.name as orgName,t2.integral_available_party as score from com_pb_member t LEFT JOIN com_pb_org t1 on t.org_id= t1.id LEFT JOIN com_act_integral_user t2 on t.user_id = t2.user_id where t.community_id =#{communityId} and t2.status = 1  order by integral_available_party desc limit 3
    </select>
    <select id="bigScreenServiceData" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenServiceData">
        select (select count(*) from com_act_work_guide ) guide,
        (select count(*) from com_act_announcement where community_id = #{communityId}) announcement,
        (select count(*) from com_elder_auth_elderlies where community_id = #{communityId}) eldersAuth,
        (select count(*) from com_convenient_merchants where community_id = #{communityId} and is_del =0) convenient,
        (select count(*) from renting_hourse_register where community_id = #{communityId}) rentingHouse,
        (select count(*) from com_property_alarm where community_id = #{communityId}) oneButton,
        (select count(*) from com_pension_auth_pensioners where community_id = #{communityId} ) pensionAuth,
        (select count(*) from com_pb_dyn where community_id = #{communityId} and type = 2) partyDyn,
        (select count(*) from com_property where community_id = #{communityId} ) property
    </select>
    <select id="bigScreenServiceUser" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenServiceUser">
        select t.name AS villageName, IF(t1.num IS NULL,0,t1.num)
        from com_mng_village t left join (
            select count(*) num,village_id
            from com_mng_population
            where act_id = #{communityId} GROUP BY village_id
        ) t1 on t.village_id = t1.village_id where t.community_id = #{communityId}
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComPropertyMapper.xml
@@ -40,5 +40,40 @@
        </where>
        order by t.create_time desc
    </select>
    <select id="getRepairPolylineDate" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT DATE_FORMAT( p1.create_time, '%m' ) AS filed, COUNT(1) AS num FROM com_property_repair p1
        LEFT JOIN com_property p2 ON p1.property_id = p2.id
        WHERE p2.community_id = #{communityId} AND DATE_FORMAT( p1.create_time, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed
    </select>
    <select id="getRepairTotalPolylineDate"
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT COUNT(1) AS num FROM com_property_repair p1
        LEFT JOIN com_property p2 ON p1.property_id = p2.id
        WHERE p2.community_id = #{communityId} AND DATE_FORMAT( p1.create_time, '%Y%m' ) &lt;= #{date}
    </select>
    <select id="getEventAddPolylineData"
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT DATE_FORMAT( e.create_at, '%m' ) AS filed, COUNT(e.id) AS num
        FROM `event` AS e
        LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id
        WHERE e.event_category = 1 AND e.event_type IN ( 1, 2, 3, 5, 6 ) AND e.event_status = 2 AND egd.grid_community_id = #{communityId}
                AND DATE_FORMAT( e.create_at, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed
        UNION ALL SELECT
                DATE_FORMAT( create_at, '%m' ) AS filed,  COUNT(id) AS num
        FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id IN (1,3,4,5,6,7,8) AND DATE_FORMAT( create_at, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed
    </select>
    <select id="getEventTotalPolylineDate"
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT SUM(num) AS num FROM (
        SELECT COUNT(e.id) AS num
        FROM `event` AS e
        LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id
        WHERE e.event_category = 1 AND e.event_type IN ( 1, 2, 3, 5, 6 ) AND e.event_status = 2 AND egd.grid_community_id = #{communityId}
                AND DATE_FORMAT( e.create_at, '%Y%m' ) &lt;= #{date}
        UNION ALL SELECT
                COUNT(id) AS num
        FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id IN (1,3,4,5,6,7,8) AND DATE_FORMAT( create_at, '%Y%m' ) &lt;= #{date}
        ) temp
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ConvenientMerchantMapper.xml
@@ -202,6 +202,61 @@
            </foreach>
        GROUP BY ccm.id
    </select>
    <select id="selectMerchantListByCommunity"
            resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO">
        SELECT id, `name`, logo, lat, lon FROM com_convenient_merchants WHERE community_id = #{communityId} AND is_del = 0
    </select>
    <select id="getScreenPopularMerchants"
            resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO">
        SELECT * FROM (
        SELECT id, `name`, consultation_volume, view_num
        FROM com_convenient_merchants
        WHERE community_id = #{pagePopularMerchantDTO.communityId} AND is_del = 0 ORDER BY (consultation_volume + consultation_volume) DESC LIMIT 100
        ) temp
    </select>
    <select id="getIndexMerchantBaseData"
            resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenMerchantStatisticsInfo">
        SELECT
        (SELECT 0) AS resourceTypeNum,
        (SELECT COUNT(id) FROM com_convenient_merchants WHERE community_id = #{communityId} AND is_del = 0) AS merchantNum,
        (SELECT SUM(t1.consultation_volume)
        FROM com_convenient_consultation_statistics t1
        LEFT JOIN com_convenient_merchants t2 ON t1.merchant_id = t2.id
        WHERE t2.community_id = #{communityId}) AS serviceTimes
    </select>
    <select id="selectServiceTypeCircleData"
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT t1.`name` AS filed, COUNT(t3.id) AS num
        FROM com_convenient_service_categories t1
        LEFT JOIN com_convenient_service_scope t2 ON t1.id = t2.service_category_id
        LEFT JOIN com_convenient_merchants t3 ON t2.merchant_id = t3.id
        WHERE t3.community_id = #{communityId} AND t3.is_del = 0 GROUP BY t1.id
    </select>
    <select id="getServiceTimesAddPolylineData"
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT DATE_FORMAT( t1.statistic_date, '%m' ) AS filed, SUM(t1.consultation_volume) AS num
        FROM com_convenient_consultation_statistics t1
        LEFT JOIN com_convenient_merchants t2 ON t1.merchant_id = t2.id
        WHERE t2.community_id = #{communityId} AND DATE_FORMAT( t1.statistic_date, '%Y' ) = DATE_FORMAT( CURDATE( ) , '%Y' ) GROUP BY filed
    </select>
    <select id="getServiceTimesTotalPolylineDate"
            resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT SUM(t1.consultation_volume) AS num
        FROM com_convenient_consultation_statistics t1
        LEFT JOIN com_convenient_merchants t2 ON t1.merchant_id = t2.id
        WHERE t2.community_id = #{communityId} AND DATE_FORMAT( t1.statistic_date, '%Y%m' ) &lt;= #{date}
    </select>
    <select id="indexMerchantList"
            resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO">
        SELECT t1.id, t1.`name`, t1.logo, t1.introduction, GROUP_CONCAT(t2.`service_name`) serviceScope
        FROM com_convenient_merchants t1
        LEFT JOIN com_convenient_service_scope t2 ON t1.id = t2.merchant_id
        WHERE t1.community_id = #{communityId}
        <if test="categoryId != null">
            AND t2.service_category_id = #{categoryId}
        </if>
        GROUP BY t1.id ORDER BY t1.id DESC LIMIT #{pageSize}
    </select>
    <update id="deleteMerchantById">
        UPDATE com_convenient_merchants SET is_del = 1, updated_by = #{operator} WHERE id = #{merchantId}
    </update>
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/api/BigScreenApi.java
@@ -68,6 +68,16 @@
    }
    /**
     * 新版绘制多边形统计数据
     * @param eventListDTO
     * @return
     */
    @PostMapping("/getCivilDrawListNew")
    public R getCivilDrawListNew(@RequestBody ScreenDrawEventListDTO eventListDTO) {
        return eventService.getCivilDrawListNew(eventListDTO);
    }
    /**
     * 大屏-根据小区id查询小区统计人数
     * 
     * @param villageId
@@ -89,4 +99,16 @@
        return eventGridMemberRelationService.getGridsMemberTrajectory(communityId);
    }
    /**
     * 大屏-新根据小区id查询小区统计人数
     *
     * @param villageId
     *            小区id
     * @return 小区统计数据
     */
    @GetMapping("/village/statistics-new")
    public R civilVillageStatisticsNew(@RequestParam("villageId") Long villageId) {
        return eventService.civilVillageStatisticsNew(villageId);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/dao/EventMapper.java
@@ -3,6 +3,7 @@
import java.util.List;
import java.util.Map;
import com.panzhihua.common.model.vos.community.StatisticsCommVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -164,4 +165,10 @@
    List<Map<String, Object>> getMemberBuildName(@Param("userId") Long userId);
    Integer getPopulationByLabelCount(@Param("floor") String floor, @Param("villageId") Long villageId);
    List<EventGridIncidentStatisticsVO> getGridsGovernanceEventList(@Param("communityId") Long communityId);
    ScreenDrawEventPopulationTotalVO getVillagePopulationTotalNew(@Param("villageId") Long villageId);
    List<StatisticsCommVO> selectStatisticsForAge(@Param("villageIds") List<Long> villageIds);
}
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/EventService.java
@@ -335,6 +335,15 @@
    R getCivilDrawList(ScreenDrawEventListDTO eventListDTO);
    /**
     * 新版绘制多边形统计数据
     *
     * @param eventListDTO
     *            请求参数
     * @return 统计数据
     */
    R getCivilDrawListNew(ScreenDrawEventListDTO eventListDTO);
    /**
     * 大屏-根据小区id查询小区统计人数
     * 
     * @param villageId
@@ -351,4 +360,13 @@
     * @return 网格员工作汇总数据
     */
    R gridMemberStatisticsAll(MemberStatisticsAdminDTO statisticsAdminDTO);
    /**
     * 大屏-新根据小区id查询小区统计人数
     *
     * @param villageId
     *            小区id
     * @return 小区统计数据
     */
    R civilVillageStatisticsNew(Long villageId);
}
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java
@@ -2,9 +2,12 @@
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import com.panzhihua.common.model.vos.community.StatisticsCommVO;
import com.panzhihua.common.model.vos.community.bigscreen.GridsGovernanceStatisticsVO;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -2619,6 +2622,160 @@
        return R.ok(drawEventVO);
    }
    @Override
    public R getCivilDrawListNew(ScreenDrawEventListDTO eventListDTO) {
        GridsGovernanceStatisticsVO statisticsVO = new GridsGovernanceStatisticsVO();
        // 返回事件列表结果集
        List<EventGridIncidentStatisticsVO> eventResultList = new ArrayList<>();
        // 返回小区列表结果集
        List<CivilVillageStatisticsVO> villageResultList = new ArrayList<>();
        // 返回人口统计
        ScreenDrawEventPopulationTotalVO drawEventPopulationTotalVO = new ScreenDrawEventPopulationTotalVO();
        //年龄段统计
        List<StatisticsCommVO> ageGroupStatistics = new ArrayList<>();
        // 查询所有事件
        List<EventGridIncidentStatisticsVO> gridIncidentList =
                this.baseMapper.getGridsGovernanceEventList(eventListDTO.getCommunityId());
        if (!gridIncidentList.isEmpty()) {
            gridIncidentList.forEach(gridIncident -> {
                // 拆分事件经纬度
                Double lng = 0.0;// 经度
                Double lat = 0.0;// 纬度
                String[] lngLatString = gridIncident.getLatLng().split(",");
                if (gridIncident.getEventType().equals(1)) {
                    lat = Double.parseDouble(lngLatString[0]);
                    lng = Double.parseDouble(lngLatString[1]);
                } else {
                    lat = Double.parseDouble(lngLatString[1]);
                    lng = Double.parseDouble(lngLatString[0]);
                }
                // 判断绘制的图形类型
                if (eventListDTO.getType().equals(ScreenDrawEventListDTO.type.yx)) {
                    // 判断这个点是否在圆形范围内
                    if (GisPointUtil.isInCircle(eventListDTO.getCenterLng(), eventListDTO.getCenterLat(), lng, lat,
                            eventListDTO.getRadius())) {
                        if (eventResultList.size() <= eventListDTO.getCount()) {
                            eventResultList.add(gridIncident);
                        }
                        countGridIncidentData(statisticsVO, gridIncident);
                    }
                } else {// 多边形类型
                    if (GisPointUtil.isInPolygon(lng, lat, eventListDTO.getLngLatList())) {
                        if (eventResultList.size() <= eventListDTO.getCount()) {
                            eventResultList.add(gridIncident);
                        }
                        countGridIncidentData(statisticsVO, gridIncident);
                    }
                }
            });
        }
        statisticsVO.setGridIncidentList(eventResultList);
        // 查询所有小区
        List<CivilVillageStatisticsVO> villageStatisticsList =
                this.baseMapper.getCivilScreenVillageList(eventListDTO.getCommunityId());
        if (!villageStatisticsList.isEmpty()) {
            List<Long> villageIds = villageStatisticsList.stream().map(CivilVillageStatisticsVO::getVillageId).collect(Collectors.toList());
            ageGroupStatistics = this.baseMapper.selectStatisticsForAge(villageIds);
            villageStatisticsList.forEach(village -> {
                // 判断绘制的图形类型
                if (eventListDTO.getType().equals(ScreenDrawEventListDTO.type.yx)) {
                    // 判断这个点是否在圆形范围内
                    if (GisPointUtil.isInCircle(eventListDTO.getCenterLng(), eventListDTO.getCenterLat(),
                            Double.parseDouble(village.getLng()), Double.parseDouble(village.getLat()),
                            eventListDTO.getRadius())) {
                        fillVillageResultList(villageResultList, drawEventPopulationTotalVO, village);
                    }
                } else {// 多边形类型
                    if (GisPointUtil.isInPolygon(Double.parseDouble(village.getLng()),
                            Double.parseDouble(village.getLat()), eventListDTO.getLngLatList())) {
                        fillVillageResultList(villageResultList, drawEventPopulationTotalVO, village);
                    }
                }
            });
        }
        statisticsVO.setVillageStatisticsList(villageResultList);
        statisticsVO.setDrawEventPopulationTotalVO(drawEventPopulationTotalVO);
        statisticsVO.setAgeGroupStatistics(ageGroupStatistics);
        statisticsVO.generateStatisticsData();
        return R.ok(statisticsVO);
    }
    private void fillVillageResultList(List<CivilVillageStatisticsVO> villageResultList,
                                       ScreenDrawEventPopulationTotalVO drawEventPopulationTotalVO, CivilVillageStatisticsVO village) {
        villageResultList.add(village);
        ScreenDrawEventPopulationTotalVO populationTotalVO =
                this.baseMapper.getVillagePopulationTotalNew(village.getVillageId());
        if (populationTotalVO != null) {
            drawEventPopulationTotalVO.setVillageTotal(drawEventPopulationTotalVO.getVillageTotal() + 1);
            drawEventPopulationTotalVO.setPopulationTotal(drawEventPopulationTotalVO.getPopulationTotal() + populationTotalVO.getPopulationTotal());
            drawEventPopulationTotalVO.setBuildTotal(drawEventPopulationTotalVO.getBuildTotal() + populationTotalVO.getBuildTotal());
            drawEventPopulationTotalVO.setHouseTotal(drawEventPopulationTotalVO.getHouseTotal() + populationTotalVO.getHouseTotal());
            drawEventPopulationTotalVO.setLocalTotal(drawEventPopulationTotalVO.getLocalTotal() + populationTotalVO.getLocalTotal());
            drawEventPopulationTotalVO.setOutTotal(drawEventPopulationTotalVO.getOutTotal() + populationTotalVO.getOutTotal());
            drawEventPopulationTotalVO.setDisabilityTotal(drawEventPopulationTotalVO.getDisabilityTotal() + populationTotalVO.getDisabilityTotal());
            drawEventPopulationTotalVO.setLowSecurityTotal(drawEventPopulationTotalVO.getLowSecurityTotal() + populationTotalVO.getLowSecurityTotal());
            drawEventPopulationTotalVO.setElderTotal(drawEventPopulationTotalVO.getElderTotal() + populationTotalVO.getElderTotal());
            drawEventPopulationTotalVO.setSpecialSituationTotal(drawEventPopulationTotalVO.getSpecialSituationTotal() + populationTotalVO.getSpecialSituationTotal());
            drawEventPopulationTotalVO.setOtherTotal(drawEventPopulationTotalVO.getOtherTotal() + populationTotalVO.getOtherTotal());
            drawEventPopulationTotalVO.setSpecialHelpTotal(drawEventPopulationTotalVO.getSpecialHelpTotal() + populationTotalVO.getSpecialHelpTotal());
            drawEventPopulationTotalVO.setVeteransTotal(drawEventPopulationTotalVO.getVeteransTotal() + populationTotalVO.getVeteransTotal());
            drawEventPopulationTotalVO.setOldTotal(drawEventPopulationTotalVO.getOldTotal() + populationTotalVO.getOldTotal());
            drawEventPopulationTotalVO.setPensionTotal(drawEventPopulationTotalVO.getPensionTotal() + populationTotalVO.getPensionTotal());
            drawEventPopulationTotalVO.setRentingHouseTotal(drawEventPopulationTotalVO.getRentingHouseTotal() + populationTotalVO.getRentingHouseTotal());
            drawEventPopulationTotalVO.setVolunteerTotal(drawEventPopulationTotalVO.getVolunteerTotal() + populationTotalVO.getVolunteerTotal());
            drawEventPopulationTotalVO.setAverageAge(drawEventPopulationTotalVO.getAverageAge() + populationTotalVO.getAverageAge());
        }
    }
    private void countGridIncidentData(GridsGovernanceStatisticsVO statisticsVO, EventGridIncidentStatisticsVO gridIncident) {
        switch (gridIncident.getType()) {
            case 1:
                statisticsVO.setEventZATotal(statisticsVO.getEventZATotal() + 1);
                if (gridIncident.getStatus().equals(1)) {
                    statisticsVO.setEventZADeal(statisticsVO.getEventZADeal() + 1);
                }
                break;
            case 2:
                statisticsVO.setEventMSTotal(statisticsVO.getEventMSTotal() + 1);
                if (gridIncident.getStatus().equals(1)) {
                    statisticsVO.setEventMSDeal(statisticsVO.getEventMSDeal() + 1);
                }
                break;
            case 3:
                statisticsVO.setEventMDTotal(statisticsVO.getEventMDTotal() + 1);
                if (gridIncident.getStatus().equals(1)) {
                    statisticsVO.setEventMDDeal(statisticsVO.getEventMDDeal() + 1);
                }
                break;
            case 5:
                statisticsVO.setEventTFTotal(statisticsVO.getEventTFTotal() + 1);
                if (gridIncident.getStatus().equals(1)) {
                    statisticsVO.setEventTFDeal(statisticsVO.getEventTFDeal() + 1);
                }
                break;
            case 6:
                statisticsVO.setEventTSTotal(statisticsVO.getEventTSTotal() + 1);
                if (gridIncident.getStatus().equals(1)) {
                    statisticsVO.setEventTSDeal(statisticsVO.getEventTSDeal() + 1);
                }
                break;
            case 9:
                statisticsVO.setEventFJTotal(statisticsVO.getEventFJTotal() + 1);
                if (gridIncident.getStatus().equals(1)) {
                    statisticsVO.setEventFJDeal(statisticsVO.getEventFJDeal() + 1);
                }
                break;
            case 10:
                statisticsVO.setOtherTotal(statisticsVO.getOtherTotal() + 1);
                if (gridIncident.getStatus().equals(1)) {
                    statisticsVO.setOtherDeal(statisticsVO.getOtherDeal() + 1);
                }
                break;
            default:
                break;
        }
    }
    /**
     * 大屏-根据小区id查询小区统计人数
     * 
@@ -2644,4 +2801,23 @@
    public R gridMemberStatisticsAll(MemberStatisticsAdminDTO statisticsAdminDTO) {
        return R.ok(eventGridMemberRelationMapper.gridMemberStatisticsAll(statisticsAdminDTO));
    }
    /**
     * 大屏-新根据小区id查询小区统计人数
     *
     * @param villageId
     *            小区id
     * @return 小区统计数据
     */
    @Override
    public R civilVillageStatisticsNew(Long villageId) {
        GridsGovernanceStatisticsVO statisticsVO = new GridsGovernanceStatisticsVO();
        List<Long> villageIds = new ArrayList<>();
        villageIds.add(villageId);
        List<StatisticsCommVO> ageGroupStatistics = this.baseMapper.selectStatisticsForAge(villageIds);
        ScreenDrawEventPopulationTotalVO populationTotalVO = this.baseMapper.getVillagePopulationTotalNew(villageId);
        statisticsVO.setAgeGroupStatistics(ageGroupStatistics);
        statisticsVO.setDrawEventPopulationTotalVO(populationTotalVO);
        return R.ok(statisticsVO);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/resources/mapper/EventMapper.xml
@@ -1069,7 +1069,7 @@
            WHERE
                e3.event_status = 2
                AND e3.create_at LIKE CONCAT(#{nowDate},'%')) as currentNum,
                (select count(id) from com_act_easy_photo where community_id = 2 and del_tag = 0 and create_at LIKE CONCAT(#{nowDate},'%')) as sspCurrentNum
                (select count(id) from com_act_easy_photo where community_id = #{communityId} and del_tag = 0 and create_at LIKE CONCAT(#{nowDate},'%')) as sspCurrentNum
                FROM
                    `event` AS e
@@ -1377,5 +1377,100 @@
              left join com_mng_population AS cmp on cmp.id = cmpct.population_id
        where cmtct.label is not null and cmp.village_id = #{villageId} and floor = #{floor}
    </select>
    <select id="getGridsGovernanceEventList"
            resultType="com.panzhihua.common.model.vos.community.screen.event.EventGridIncidentStatisticsVO">
        SELECT event_type AS type, IFNULL( NULL, 1 ) AS eventType, e.id AS eventId, happent_lat_lng AS latLng, event_des AS content,
        (SELECT url FROM event_resource WHERE ref_id = e.id AND classification = 1 AND `type` = 1 LIMIT 1) AS cover, e.create_at,
        CASE
        WHEN event_deal_status = 4 THEN 1
        ELSE 2 END `status`
        FROM `event` AS e
        LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id
        WHERE e.event_category = 1 AND e.event_type IN ( 1, 2, 3, 5, 6 ) AND e.event_status = 2 AND egd.grid_community_id = #{communityId}
        UNION ALL SELECT
        CASE
        WHEN classify_id = 4 THEN 1
        WHEN classify_id = 6 THEN 2
        WHEN classify_id = 5 THEN 3
        WHEN classify_id = 7 THEN 5
        WHEN classify_id = 3 THEN 6
        WHEN classify_id = 8 THEN 9
        WHEN classify_id = 1 THEN 10
        END type, IFNULL( NULL, 2 ) AS eventType, id AS eventId, lng_lat AS latLng, detail AS content, substring_index(photo_path_list, ',', 1) AS cover, create_at,
        CASE
        WHEN handle_status = 2 THEN 1
        ELSE 2 END `status`
        FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id IN (1,3,4,5,6,7,8)
    </select>
    <select id="getVillagePopulationTotalNew"
            resultType="com.panzhihua.common.model.vos.screen.ScreenDrawEventPopulationTotalVO">
        SELECT
        (SELECT count(id) FROM com_mng_population WHERE village_id = #{villageId}) as populationTotal,
        (select count(id) from com_mng_building where village_id = #{villageId}) as buildTotal,
        (SELECT COUNT(DISTINCT CONCAT(road,door_no,floor,unit_no,house_no)) FROM com_mng_population WHERE village_id = #{villageId}) as houseTotal,
        (select count(id) from com_mng_population where village_id = #{villageId} and out_or_local = 1) as localTotal,
        (select count(id) from com_mng_population where village_id = #{villageId} and out_or_local = 2) as outTotal,
        (SELECT COUNT(t1.id) FROM com_disability_population t1 LEFT JOIN com_mng_population t2 ON t1.population_id = t2.id WHERE t2.village_id = #{villageId}) as disabilityTotal,
        (SELECT COUNT(t1.id) FROM com_low_security_population t1 LEFT JOIN com_mng_population t2 ON t1.population_id = t2.id WHERE t2.village_id = #{villageId}) as lowSecurityTotal,
        (SELECT COUNT(id) FROM com_mng_population WHERE village_id = #{villageId} AND TIMESTAMPDIFF(YEAR, SUBSTRING(card_no_str, 7, 8), NOW()) > 80) as elderTotal,
        (SELECT COUNT(t1.id) FROM com_mng_population t1 LEFT JOIN com_mng_population_community_tags t2 ON t1.id = t2.population_id WHERE t1.village_id = #{villageId} AND t2.label LIKE '%特殊情况%') as specialSituationTotal,
        (SELECT COUNT(id) FROM
        (SELECT t1.id FROM com_drug_population t1 LEFT JOIN com_mng_population t2 ON t1.population_id = t2.id WHERE t2.village_id = #{villageId}
        UNION ALL
        SELECT t1.id FROM com_correct_population t1 LEFT JOIN com_mng_population t2 ON t1.population_id = t2.id WHERE t2.village_id = #{villageId}
        UNION ALL
        SELECT t1.id FROM com_cult_population t1 LEFT JOIN com_mng_population t2 ON t1.population_id = t2.id WHERE t2.village_id = #{villageId}
        UNION ALL
        SELECT t1.id FROM com_rehabilitation_population t1 LEFT JOIN com_mng_population t2 ON t1.population_id = t2.id WHERE t2.village_id = #{villageId}
        UNION ALL
        SELECT t1.id FROM com_key_population t1 LEFT JOIN com_mng_population t2 ON t1.population_id = t2.id WHERE t2.village_id = #{villageId}
        UNION ALL
        SELECT t1.id FROM com_major_population t1 LEFT JOIN com_mng_population t2 ON t1.population_id = t2.id WHERE t2.village_id = #{villageId}
        ) temp) as otherTotal,
        (SELECT COUNT(t1.id) FROM com_mng_population t1 LEFT JOIN com_mng_population_community_tags t2 ON t1.id = t2.population_id WHERE t1.village_id = #{villageId} AND t2.label LIKE '%特扶家庭%') as specialHelpTotal,
        (SELECT COUNT(t1.id) FROM com_veterans_population t1 LEFT JOIN com_mng_population t2 ON t1.population_id = t2.id WHERE t2.village_id = #{villageId}) as veteransTotal,
        (SELECT COUNT(id) FROM com_mng_population WHERE village_id = #{villageId} AND TIMESTAMPDIFF(YEAR, SUBSTRING(card_no_str, 7, 8), NOW()) > 60) as oldTotal,
        (SELECT COUNT(t1.id) FROM com_pension_auth_pensioners t1 LEFT JOIN com_mng_population t2 ON t1.population_id = t2.id WHERE t2.village_id = #{villageId}) as pensionTotal,
        (SELECT COUNT(id) FROM renting_hourse_register WHERE village_id = #{villageId} AND auth_status = 2) as rentingHouseTotal,
        (SELECT COUNT(id) FROM com_mng_population t1 LEFT JOIN sys_user t2 ON t1.card_no_str = t2.id_card WHERE t1.village_id = #{villageId} AND t2.is_volunteer = 1) as volunteerTotal,
        (SELECT ROUND(AVG(TIMESTAMPDIFF(YEAR, SUBSTRING(card_no_str, 7, 8), NOW()))) FROM com_mng_population) as averageAge
    </select>
    <select id="selectStatisticsForAge" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO">
        SELECT filed, SUM(num) AS num FROM (
            SELECT filed, COUNT(filed) AS num FROM (
            SELECT
            CASE
            WHEN TIMESTAMPDIFF(YEAR, SUBSTRING(card_no_str, 7, 8), NOW()) BETWEEN 0 AND 18 THEN '0-18岁'
            WHEN TIMESTAMPDIFF(YEAR, SUBSTRING(card_no_str, 7, 8), NOW()) BETWEEN 19 AND 30 THEN '19-30岁'
            WHEN TIMESTAMPDIFF(YEAR, SUBSTRING(card_no_str, 7, 8), NOW()) BETWEEN 31 AND 40 THEN '31-40岁'
            WHEN TIMESTAMPDIFF(YEAR, SUBSTRING(card_no_str, 7, 8), NOW()) BETWEEN 41 AND 50 THEN '41-50岁'
            WHEN TIMESTAMPDIFF(YEAR, SUBSTRING(card_no_str, 7, 8), NOW()) BETWEEN 51 AND 60 THEN '51-60岁'
            WHEN TIMESTAMPDIFF(YEAR, SUBSTRING(card_no_str, 7, 8), NOW()) BETWEEN 61 AND 79 THEN '61-79岁'
            WHEN TIMESTAMPDIFF(YEAR, SUBSTRING(card_no_str, 7, 8), NOW()) BETWEEN 80 AND 89 THEN '80-89岁'
            WHEN TIMESTAMPDIFF(YEAR, SUBSTRING(card_no_str, 7, 8), NOW()) > 89 THEN '89岁以上'
            END filed
            FROM com_mng_population WHERE village_id IN
            <foreach collection="villageIds" index="index" item="item" open="(" separator="," close=")">
                #{item}
            </foreach>
            ) temp GROUP BY filed
            UNION ALL
            (SELECT '0-18岁' AS filed, 0 AS num)
            UNION ALL
            (SELECT '19-30岁' AS filed, 0 AS num)
            UNION ALL
            (SELECT '31-40岁' AS filed, 0 AS num)
            UNION ALL
            (SELECT '41-50岁' AS filed, 0 AS num)
            UNION ALL
            (SELECT '51-60岁' AS filed, 0 AS num)
            UNION ALL
            (SELECT '61-79岁' AS filed, 0 AS num)
            UNION ALL
            (SELECT '80-89岁' AS filed, 0 AS num)
            UNION ALL
            (SELECT '89岁以上' AS filed, 0 AS num)
        ) t GROUP BY filed
    </select>
</mapper>