puhanshu
2021-12-29 0a5fbd57f81eef9169fa94afac9092c9e7dd1311
大屏分类修改
5个文件已修改
65 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/PageBaseDTO.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/BigScreenStatisticsServiceImpl.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActivityMapper.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActDynDOMapper.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActNeighborCircleDOMapper.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/PageBaseDTO.java
@@ -4,6 +4,8 @@
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
 * @title: PageBaseDTO
 * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
@@ -27,6 +29,9 @@
    @ApiModelProperty(value = "字符串类型查询参数", example = "10")
    private String param2;
    @ApiModelProperty(value = "社区id")
    @ApiModelProperty(value = "单个社区id")
    private Long communityId;
    @ApiModelProperty(value = "社区id列表")
    private List<Long> communityIds;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/BigScreenStatisticsServiceImpl.java
@@ -200,13 +200,34 @@
        //居民活动柱状统计
        List<StatisticsCommVO> residentActHistogram = comActActivityDAO.selectResidentActHistogramData(communityId, true);
        //居民活动新增数据
        List<StatisticsCommVO> actAddPolylineData = comActActivityDAO.getActAddPolylineData(communityId, true);
        for (int i = 1; i <= currentMon; i++) {
            String temp;
            if (i > 9) {
                temp = "" + i;
            } else {
                temp = "0" + i;
            }
            boolean isExist = actAddPolylineData.stream().anyMatch(e -> nonNull(e.getFiled()) &&
                    e.getFiled().endsWith(temp));
            if (!isExist) {
                StatisticsCommVO other = new StatisticsCommVO();
                other.setFiled(temp);
                other.setNum(0);
                actAddPolylineData.add(other);
            }
        }
        actAddPolylineData = actAddPolylineData.stream().filter(e -> nonNull(e.getFiled()))
                .sorted(Comparator.comparing(e -> e.getFiled())).collect(Collectors.toList());
        //居民活动发布总数
        int residentActTotalCount = 0;
        if (!residentActHistogram.isEmpty()) {
            residentActTotalCount = residentActHistogram.stream().map(StatisticsCommVO::getNum).mapToInt(Integer::intValue).sum();
        }
        statisticsVO.setResidentActTotalCount(residentActTotalCount);
        statisticsVO.setResidentActHistogram(residentActHistogram);
//        statisticsVO.setResidentActHistogram(residentActHistogram);
        statisticsVO.setResidentActHistogram(actAddPolylineData);
        //业主委员会党员占比
        List<StatisticsCommVO> committeePartyPercent = comActCommitteeDao.selectCommitteePartyPercent(communityId);
        statisticsVO.setCommitteePartyPercent(committeePartyPercent);
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActivityMapper.xml
@@ -213,7 +213,16 @@
    <select id="indexActList" resultType="com.panzhihua.common.model.vos.community.ComActActivityVO">
        SELECT id, `status`, activity_type, activity_name, cover
        FROM com_act_activity
        WHERE community_id = #{pageBaseDTO.communityId}
        WHERE 1=1
        <if test="pageBaseDTO.communityIds != null and pageBaseDTO.communityIds.size > 0">
            AND community_id IN
            <foreach collection="pageBaseDTO.communityIds" item="item" open="(" separator="," close=")">
                #{item}
            </foreach>
        </if>
        <if test="pageBaseDTO.communityIds == null">
            AND community_id = #{pageBaseDTO.communityId}
        </if>
        <if test="isResidentAct">
            AND volunteer_max = 0
        </if>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActDynDOMapper.xml
@@ -48,7 +48,17 @@
        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 = #{pageBaseDTO.communityId} AND t1.`status` = 1 AND t2.is_del = 2
        WHERE 1=1
        <if test="pageBaseDTO.communityIds != null and pageBaseDTO.communityIds.size > 0">
            AND t1.community_id IN
            <foreach collection="pageBaseDTO.communityIds" item="item" open="(" separator="," close=")">
                #{item}
            </foreach>
        </if>
        <if test="pageBaseDTO.communityIds == null">
            AND t1.community_id = #{pageBaseDTO.communityId}
        </if>
        AND t1.`status` = 1 AND t2.is_del = 2
        <if test="pageBaseDTO.paramId != null">
            AND t1.type = #{pageBaseDTO.paramId}
        </if>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActNeighborCircleDOMapper.xml
@@ -154,7 +154,17 @@
        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 = #{pageBaseDTO.communityId} AND t1.`status` IN (2,3) AND t1.is_del = 2 AND (t2.`status` = 1 OR t2.id IS NULL)
        WHERE 1=1
        <if test="pageBaseDTO.communityIds != null and pageBaseDTO.communityIds.size > 0">
            AND t1.community_id IN
            <foreach collection="pageBaseDTO.communityIds" item="item" open="(" separator="," close=")">
                #{item}
            </foreach>
        </if>
        <if test="pageBaseDTO.communityIds == null">
            AND t1.community_id = #{pageBaseDTO.communityId}
        </if>
        AND t1.`status` IN (2,3) AND t1.is_del = 2 AND (t2.`status` = 1 OR t2.id IS NULL)
        <if test="pageBaseDTO.paramId != null">
            AND t1.topic_id = #{pageBaseDTO.paramId}
        </if>