You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
98 lines
3.1 KiB
98 lines
3.1 KiB
1 year ago
|
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.GetMapping;
|
||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||
|
import org.springframework.web.bind.annotation.RestController;
|
||
|
|
||
|
/**
|
||
|
* @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();
|
||
|
}
|
||
|
}
|