puhanshu
2021-12-31 5a4a13ac1c20f78fce105f260b23fe309b26c905
大屏新增事件分页接口
9个文件已修改
107 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/GridsGovernanceStatisticsVO.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/BigScreenStatisticsApi.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/BigScreenStatisticsApi.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/BigScreenStatisticsService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/BigScreenStatisticsServiceImpl.java 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComMngPopulationDOMapper.xml 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/GridsGovernanceStatisticsVO.java
@@ -1,15 +1,15 @@
package com.panzhihua.common.model.vos.community.bigscreen;
import java.util.List;
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
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -7721,4 +7721,12 @@
     */
    @GetMapping("/screen/event/list")
    R getEventList(@RequestParam(value = "type") Integer type, @RequestParam(value = "communityId") Long communityId);
    /**
     * 清网治格-社区事件数据分页
     * @param pageBaseDTO
     * @return
     */
    @PostMapping("/screen/event/page")
    R pageEventList(@RequestBody PageBaseDTO pageBaseDTO);
}
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/BigScreenStatisticsApi.java
@@ -546,4 +546,13 @@
    public R getEventList(@RequestParam(value = "type") Integer type) {
        return communityService.getEventList(type, this.getCommunityId());
    }
    @ApiOperation(value = "清网治格-社区事件数据分页", response = EventGridIncidentStatisticsVO.class)
    @PostMapping("/event/page")
    public R pageEventList(@RequestBody PageBaseDTO pageBaseDTO) {
        if (isNull(pageBaseDTO.getCommunityId())) {
            pageBaseDTO.setCommunityId(this.getCommunityId());
        }
        return communityService.pageEventList(pageBaseDTO);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/BigScreenStatisticsApi.java
@@ -346,4 +346,14 @@
    public R getEventList(@RequestParam(value = "type") Integer type, @RequestParam(value = "communityId") Long communityId) {
        return bigScreenStatisticsService.getEventList(type, communityId);
    }
    /**
     * 清网治格-社区事件数据分页
     * @param pageBaseDTO
     * @return
     */
    @PostMapping("/event/page")
    public R pageEventList(@RequestBody PageBaseDTO pageBaseDTO) {
        return bigScreenStatisticsService.pageEventList(pageBaseDTO);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java
@@ -4,6 +4,7 @@
import java.util.List;
import java.util.Map;
import com.panzhihua.common.model.dtos.PageBaseDTO;
import com.panzhihua.common.model.dtos.community.CascadeHouseDTO;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.vos.community.*;
@@ -672,4 +673,12 @@
     * @return
     */
    List<EventGridIncidentStatisticsVO> getGridsGovernanceEventList(@Param("communityId") Long communityId);
    /**
     * 分页查询事件数据
     * @param page
     * @param pageBaseDTO
     * @return
     */
    IPage<EventGridIncidentStatisticsVO> pageEventList(@Param("page") Page page, @Param("pageBaseDTO") PageBaseDTO pageBaseDTO);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/BigScreenStatisticsService.java
@@ -159,4 +159,11 @@
     * @return
     */
    R getEventList(Integer type, Long communityId);
    /**
     * 清网治格-社区事件数据分页
     * @param pageBaseDTO
     * @return
     */
    R pageEventList(PageBaseDTO pageBaseDTO);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/BigScreenStatisticsServiceImpl.java
@@ -14,12 +14,9 @@
import javax.annotation.Resource;
import com.panzhihua.common.model.vos.community.bigscreen.BigScreenResidentActStatisticsInfo;
import com.panzhihua.common.model.vos.community.bigscreen.BigScreenVolunteerActStatisticsInfo;
import com.panzhihua.service_community.dao.ComActActivityDAO;
import com.panzhihua.service_community.dao.ComActCommitteeDao;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.common.model.dtos.PageBaseDTO;
import com.panzhihua.common.model.dtos.community.convenient.PagePopularMerchantDTO;
@@ -33,12 +30,16 @@
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.BigScreenResidentActStatisticsInfo;
import com.panzhihua.common.model.vos.community.bigscreen.BigScreenVolunteerActStatisticsInfo;
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.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.service_community.dao.ComActActivityDAO;
import com.panzhihua.service_community.dao.ComActCommitteeDao;
import com.panzhihua.service_community.dao.ComActDiscussDAO;
import com.panzhihua.service_community.dao.ComActDynDAO;
import com.panzhihua.service_community.dao.ComActEasyPhotoDAO;
@@ -845,6 +846,27 @@
        return R.ok(returnGridIncidentList);
    }
    /**
     * 清网治格-社区事件数据分页
     * @param pageBaseDTO
     * @return
     */
    @Override
    public R pageEventList(PageBaseDTO pageBaseDTO) {
        Page page = retrievePage(pageBaseDTO);
        IPage<EventGridIncidentStatisticsVO> iPage = comMngPopulationDAO.pageEventList(page, pageBaseDTO);
        List<EventGridIncidentStatisticsVO> gridIncidentList = iPage.getRecords();
        if (!gridIncidentList.isEmpty()) {
            gridIncidentList.forEach(e -> {
                if (e.getEventType().equals(2)) {
                    String[] lngLatString = e.getLatLng().split(",");
                    e.setLatLng(lngLatString[1] + "," + lngLatString[0]);
                }
            });
        }
        return R.ok(iPage);
    }
    private Page retrievePage(PageBaseDTO pageBaseDTO) {
        Long pageNum = pageBaseDTO.getPageNum();
        Long size = pageBaseDTO.getPageSize();
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComMngPopulationDOMapper.xml
@@ -1106,4 +1106,31 @@
        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 TO_DAYS(NOW()) - TO_DAYS(create_at) &lt;= 30
    </select>
    <select id="pageEventList"
            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 = ${pageBaseDTO.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 = ${pageBaseDTO.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_grid/src/main/java/com/panzhihua/service_grid/service/impl/EventServiceImpl.java
@@ -2671,7 +2671,6 @@
                }
            });
        }
        statisticsVO.setGridIncidentList(eventResultList);
        // 查询所有小区
        List<CivilVillageStatisticsVO> villageStatisticsList =
                this.baseMapper.getCivilScreenVillageList(eventListDTO.getCommunityId());