| | |
| | | @ApiModelProperty("小区列表数据") |
| | | private List<CivilVillageStatisticsVO> villageStatisticsList; |
| | | |
| | | @ApiModelProperty("社区事件数据") |
| | | private List<EventGridIncidentStatisticsVO> gridIncidentList; |
| | | |
| | | @ApiModelProperty("人口统计") |
| | | private ScreenDrawEventPopulationTotalVO drawEventPopulationTotalVO; |
| | | |
| | |
| | | package com.panzhihua.common.model.vos.community.screen.event; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | |
| | |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("事件创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/screen/index/volunteerActList") |
| | | R indexVolunteerActList(@RequestBody PageBaseDTO pageBaseDTO); |
| | | |
| | | /** |
| | | * 清网治格-根据事件分类获取近1月的社区事件数据 |
| | | * @param type |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/screen/event/list") |
| | | R getEventList(@RequestParam(value = "type") Integer type, @RequestParam(value = "communityId") Long communityId); |
| | | } |
| | |
| | | import com.panzhihua.common.model.vos.community.ComActActivityVO; |
| | | 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.screen.event.EventGridIncidentStatisticsVO; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | public R list() { |
| | | return communityService.communitySwitchList(); |
| | | } |
| | | |
| | | @ApiOperation(value = "清网治格-根据事件分类获取近1月的社区事件数据", response = EventGridIncidentStatisticsVO.class) |
| | | @ApiImplicitParam(name = "type", value = "事件状态(1治安防控、2民生服务、3矛盾劝解、4不稳定因素、5突发事件报告、6特殊人群服务、9防灾减灾、10其他", required = true) |
| | | @GetMapping("/event/list") |
| | | public R getEventList(@RequestParam(value = "type") Integer type) { |
| | | return communityService.getEventList(type, this.getCommunityId()); |
| | | } |
| | | } |
| | |
| | | public R indexVolunteerActList(@RequestBody PageBaseDTO pageBaseDTO) { |
| | | return bigScreenStatisticsService.indexVolunteerActList(pageBaseDTO); |
| | | } |
| | | |
| | | /** |
| | | * 清网治格-根据事件分类获取近1月的社区事件数据 |
| | | * @param type |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @GetMapping("/event/list") |
| | | public R getEventList(@RequestParam(value = "type") Integer type, @RequestParam(value = "communityId") Long communityId) { |
| | | return bigScreenStatisticsService.getEventList(type, communityId); |
| | | } |
| | | } |
| | |
| | | IndexDynamic indexDynamic(Long communityId); |
| | | |
| | | /** |
| | | * 大屏事件数据 |
| | | * 大屏30天內事件数据 |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | |
| | | * @return |
| | | */ |
| | | R indexVolunteerActList(PageBaseDTO pageBaseDTO); |
| | | |
| | | /** |
| | | * 清网治格-根据事件分类获取近1月的社区事件数据 |
| | | * @param type |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | R getEventList(Integer type, Long communityId); |
| | | } |
| | |
| | | }); |
| | | } |
| | | statisticsVO.setVillageStatisticsList(villageStatisticsList); |
| | | // 查询社区事件列表 |
| | | List<EventGridIncidentStatisticsVO> gridIncidentList = comMngPopulationDAO.getGridsGovernanceEventList(communityId); |
| | | if (!gridIncidentList.isEmpty()) { |
| | | gridIncidentList.forEach(e -> { |
| | | if (e.getEventType().equals(2)) { |
| | | String[] lngLatString = e.getLatLng().split(","); |
| | | e.setLatLng(lngLatString[1] + "," + lngLatString[0]); |
| | | } |
| | | }); |
| | | } |
| | | statisticsVO.setGridIncidentList(gridIncidentList); |
| | | //事件分析新增折线数据 |
| | | Date nowDate = new Date(); |
| | | List<StatisticsCommVO> eventAddPolylineData = comPropertyDao.getEventAddPolylineData(communityId); |
| | |
| | | return R.ok(comActActivityDAO.indexActList(page, pageBaseDTO, false)); |
| | | } |
| | | |
| | | /** |
| | | * 清网治格-根据事件分类获取近1月的社区事件数据 |
| | | * @param type |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R getEventList(Integer type, Long communityId) { |
| | | // 查询社区事件列表 |
| | | List<EventGridIncidentStatisticsVO> gridIncidentList = comMngPopulationDAO.getGridsGovernanceEventList(communityId); |
| | | List<EventGridIncidentStatisticsVO> returnGridIncidentList = new ArrayList<>(); |
| | | if (!gridIncidentList.isEmpty()) { |
| | | gridIncidentList.forEach(e -> { |
| | | if (e.getEventType().equals(2)) { |
| | | String[] lngLatString = e.getLatLng().split(","); |
| | | e.setLatLng(lngLatString[1] + "," + lngLatString[0]); |
| | | } |
| | | }); |
| | | returnGridIncidentList = gridIncidentList.stream().filter(e -> type.equals(e.getType())).collect(Collectors.toList()); |
| | | } |
| | | return R.ok(returnGridIncidentList); |
| | | } |
| | | |
| | | private Page retrievePage(PageBaseDTO pageBaseDTO) { |
| | | Long pageNum = pageBaseDTO.getPageNum(); |
| | | Long size = pageBaseDTO.getPageSize(); |
| | |
| | | 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} |
| | | 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 TO_DAYS(NOW()) - TO_DAYS(e.create_at) <= 30 |
| | | UNION ALL SELECT |
| | | CASE |
| | | WHEN classify_id = 4 THEN 1 |
| | |
| | | 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) |
| | | 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) <= 30 |
| | | </select> |
| | | </mapper> |