|
|
|
package com.zc.business.controller;
|
|
|
|
|
|
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
|
import com.zc.business.service.IDcTrafficIncidentsService;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @Description 交通事件统计
|
|
|
|
*
|
|
|
|
* @author liuwenge
|
|
|
|
* @date 2024/1/13 9:41
|
|
|
|
*/
|
|
|
|
@Api(tags = "交通事件统计")
|
|
|
|
@RestController
|
|
|
|
@RequestMapping("/business/trafficIncidents")
|
|
|
|
public class DcTrafficIncidentsController {
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
private IDcTrafficIncidentsService trafficIncidentsService;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @Description 首页-重点数据
|
|
|
|
*
|
|
|
|
* @author liuwenge
|
|
|
|
* @date 2024/1/13 10:10
|
|
|
|
* @param
|
|
|
|
* @return com.ruoyi.common.core.domain.AjaxResult
|
|
|
|
*/
|
|
|
|
@ApiOperation("首页-重点监控")
|
|
|
|
@GetMapping("/getKeyData")
|
|
|
|
public AjaxResult getKeyData(){
|
|
|
|
return trafficIncidentsService.getKeyData();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @Description 首页-事件专题-根据事件类型获取事件列表
|
|
|
|
*
|
|
|
|
* @author liuwenge
|
|
|
|
* @date 2024/1/13 14:27
|
|
|
|
* @param eventType
|
|
|
|
* @return com.ruoyi.common.core.domain.AjaxResult
|
|
|
|
*/
|
|
|
|
@ApiOperation("根据类型获取事件列表")
|
|
|
|
@GetMapping("/getEventList/{eventType}")
|
|
|
|
public AjaxResult getEventList(@ApiParam(value = "事件类型", name = "eventType",required = true) @PathVariable("eventType") String eventType){
|
|
|
|
return trafficIncidentsService.getEventListByType(eventType);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @Description 首页-事件专题-根据事件id获取事件详情
|
|
|
|
*
|
|
|
|
* @author liuwenge
|
|
|
|
* @date 2024/1/13 14:43
|
|
|
|
* @param eventId
|
|
|
|
* @return com.ruoyi.common.core.domain.AjaxResult
|
|
|
|
*/
|
|
|
|
@ApiOperation("获取交通事件详情")
|
|
|
|
@GetMapping("/getEventInfo/{eventId}")
|
|
|
|
public AjaxResult getEventInfo(@ApiParam(value = "事件id", name = "eventId",required = true) @PathVariable("eventId") String eventId){
|
|
|
|
return trafficIncidentsService.getEventInfo(eventId);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @Description 首页-状况统计-获取日周月年交通事件数量
|
|
|
|
*
|
|
|
|
* @author liuwenge
|
|
|
|
* @date 2024/1/13 15:07
|
|
|
|
* @param
|
|
|
|
* @return com.ruoyi.common.core.domain.AjaxResult
|
|
|
|
*/
|
|
|
|
@ApiOperation("获取日、周、月、年的交通事件数量")
|
|
|
|
@GetMapping("/getTrafficIncidentsNum")
|
|
|
|
public AjaxResult getTrafficIncidentsNum(){
|
|
|
|
return trafficIncidentsService.getTrafficIncidentsNum();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @Description 路网管控-事件管控分析-事件类型分析占比
|
|
|
|
*
|
|
|
|
* @author liuwenge
|
|
|
|
* @date 2024/1/13 15:07
|
|
|
|
* @param
|
|
|
|
* @return com.ruoyi.common.core.domain.AjaxResult
|
|
|
|
*/
|
|
|
|
@ApiOperation("事件类型分析占比")
|
|
|
|
@GetMapping("/getAllEventNum")
|
|
|
|
public AjaxResult getAllEventNum(){
|
|
|
|
return trafficIncidentsService.getAllEventNum();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @Description 路网管控-事件管控分析-事件源分析占比
|
|
|
|
*
|
|
|
|
* @author liuwenge
|
|
|
|
* @date 2024/1/13 15:07
|
|
|
|
* @param
|
|
|
|
* @return com.ruoyi.common.core.domain.AjaxResult
|
|
|
|
*/
|
|
|
|
@ApiOperation("事件源分析占比")
|
|
|
|
@GetMapping("/getEventSourceRatio")
|
|
|
|
public AjaxResult getEventSourceRatio(){
|
|
|
|
return trafficIncidentsService.getEventSourceRatio();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @Description 路网管控-事件管控分析-今日事件趋势
|
|
|
|
*
|
|
|
|
* @author liuwenge
|
|
|
|
* @date 2024/1/15 14:30
|
|
|
|
* @param
|
|
|
|
* @return com.ruoyi.common.core.domain.AjaxResult
|
|
|
|
*/
|
|
|
|
@ApiOperation("今日事件趋势")
|
|
|
|
@GetMapping("/getEventTrend")
|
|
|
|
public AjaxResult getEventTrend(){
|
|
|
|
return trafficIncidentsService.getEventTrend();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @Description 路网管控-事件管控分析-事故车型分析
|
|
|
|
*
|
|
|
|
* @author liuwenge
|
|
|
|
* @date 2024/1/15 15:38
|
|
|
|
* @param
|
|
|
|
* @return com.ruoyi.common.core.domain.AjaxResult
|
|
|
|
*/
|
|
|
|
@ApiOperation("事故车型分析")
|
|
|
|
@GetMapping("/getAccidentVehicleAnalysis")
|
|
|
|
public AjaxResult getAccidentVehicleAnalysis(){
|
|
|
|
return trafficIncidentsService.getAccidentVehicleAnalysis();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @Description 路网管控-事件管控分析-收费站统计分析table
|
|
|
|
*
|
|
|
|
* @author liuwenge
|
|
|
|
* @date 2024/1/15 17:31
|
|
|
|
* @param params
|
|
|
|
* @return com.ruoyi.common.core.domain.AjaxResult
|
|
|
|
*/
|
|
|
|
@ApiOperation("收费站统计分析table")
|
|
|
|
@PostMapping("/selectTollStationAnalysis")
|
|
|
|
public AjaxResult selectTollStationAnalysis(@RequestBody Map<String,Object> params){
|
|
|
|
return trafficIncidentsService.selectTollStationAnalysis(params);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @Description 路网管控-事件管控分析-收费站统计分析echarts(当月)
|
|
|
|
*
|
|
|
|
* @author liuwenge
|
|
|
|
* @date 2024/1/16 11:09
|
|
|
|
* @param
|
|
|
|
* @return com.ruoyi.common.core.domain.AjaxResult
|
|
|
|
*/
|
|
|
|
@ApiOperation("收费站统计分析echarts(当月)")
|
|
|
|
@GetMapping("/getTollStationAnalysis")
|
|
|
|
public AjaxResult getTollStationAnalysis(){
|
|
|
|
return trafficIncidentsService.getTollStationAnalysis();
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @Description 路网管控-事件管控分析-事故多发路段分析
|
|
|
|
*
|
|
|
|
* @author liuwenge
|
|
|
|
* @date 2024/1/16 15:52
|
|
|
|
* @param params
|
|
|
|
* @return com.ruoyi.common.core.domain.AjaxResult
|
|
|
|
*/
|
|
|
|
@ApiOperation("事故多发路段分析")
|
|
|
|
@PostMapping("/selectRoadSectionAnalysis")
|
|
|
|
public AjaxResult selectRoadSectionAnalysis(@RequestBody Map<String,Object> params){
|
|
|
|
return trafficIncidentsService.selectRoadSectionAnalysis(params);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @Description 路网管控-事件管控分析-事故类型分析
|
|
|
|
*
|
|
|
|
* @author liuwenge
|
|
|
|
* @date 2024/1/16 15:52
|
|
|
|
* @param params
|
|
|
|
* @return com.ruoyi.common.core.domain.AjaxResult
|
|
|
|
*/
|
|
|
|
@ApiOperation("事故类型分析")
|
|
|
|
@PostMapping("/selectEventTypeAnalysis")
|
|
|
|
public AjaxResult selectEventTypeAnalysis(@RequestBody Map<String,Object> params){
|
|
|
|
return trafficIncidentsService.selectEventTypeAnalysis(params);
|
|
|
|
}
|
|
|
|
}
|