|
|
@ -73,9 +73,18 @@ public class DcSdhsEventController extends BaseController { |
|
|
|
|
|
|
|
|
|
|
|
//事故多发路段分析
|
|
|
|
@ApiOperation("查询事故多发路段分析") |
|
|
|
@ApiOperation("查询事件多发路段分析") |
|
|
|
@PostMapping("/sectionAnalysis") |
|
|
|
public AjaxResult sectionAnalysis(@RequestBody DcSdhsEventQuery dcSdhsEventQuery){ |
|
|
|
if (dcSdhsEventQuery.getType()==null||dcSdhsEventQuery.getThisTime()==null||dcSdhsEventQuery.getLastTime()==null){ |
|
|
|
return AjaxResult.error("参数异常"); |
|
|
|
} |
|
|
|
return AjaxResult.success(dcSdhsEventService.sectionAnalysis(dcSdhsEventQuery)); |
|
|
|
} |
|
|
|
//事故多发路段分析
|
|
|
|
@ApiOperation("查询事故多发路段分析") |
|
|
|
@PostMapping("/accidentSectionAnalysis") |
|
|
|
public AjaxResult accidentSectionAnalysis(@RequestBody DcSdhsEventQuery dcSdhsEventQuery){ |
|
|
|
if (dcSdhsEventQuery.getType()==null||dcSdhsEventQuery.getThisTime()==null||dcSdhsEventQuery.getLastTime()==null){ |
|
|
|
return AjaxResult.error("参数异常"); |
|
|
|
} |
|
|
@ -152,65 +161,74 @@ public class DcSdhsEventController extends BaseController { |
|
|
|
if (exportKey != null && exportKey.size() > 0){ |
|
|
|
//交通事件
|
|
|
|
if (exportKey.contains("1") || exportKey.contains("2") || exportKey.contains("3") |
|
|
|
|| exportKey.contains("4") || exportKey.contains("5") || exportKey.contains("6")){ |
|
|
|
|| exportKey.contains("4") || exportKey.contains("5")){ |
|
|
|
PoiUtil.createHeading1(newDoc,"交通事件"); |
|
|
|
for (String trafficIncidentType : exportKey) { |
|
|
|
if ("1".equals(trafficIncidentType)){ |
|
|
|
//事故多发路段
|
|
|
|
//事件多发路段
|
|
|
|
dcSdhsEventService.sectionAnalysisExport(newDoc,dcSdhsEventQuery); |
|
|
|
} else if ("2".equals(trafficIncidentType)){ |
|
|
|
//事件类型分析
|
|
|
|
dcSdhsEventService.accidentTypeAnalysisExport(newDoc,dcSdhsEventQuery); |
|
|
|
} else if ("3".equals(trafficIncidentType)){ |
|
|
|
//事故车型分析
|
|
|
|
//事故车型
|
|
|
|
dcSdhsEventService.exportAccidentModelAnalysis(newDoc, dcSdhsEventQuery); |
|
|
|
|
|
|
|
//事件时间分析
|
|
|
|
dcSdhsEventService.exportEventTimeAnalysis(newDoc, dcSdhsEventQuery); |
|
|
|
} else if ("4".equals(trafficIncidentType)){ |
|
|
|
//事故时间分析
|
|
|
|
//事故时间
|
|
|
|
dcSdhsEventService.exportAccidentTimeAnalysis(newDoc, dcSdhsEventQuery); |
|
|
|
|
|
|
|
//事件地市分布
|
|
|
|
dcSdhsEventService.exportEventRegionAnalysis(newDoc,dcSdhsEventQuery); |
|
|
|
} else if ("5".equals(trafficIncidentType)){ |
|
|
|
//事故地市分布
|
|
|
|
dcSdhsEventService.exportRegionAnalysis(newDoc,dcSdhsEventQuery); |
|
|
|
} else if ("6".equals(trafficIncidentType)){ |
|
|
|
//交通管制情况统计
|
|
|
|
dcSdhsEventService.exportStationAnalysis(newDoc,dcSdhsEventQuery); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if (exportKey.contains("7")){ |
|
|
|
if (exportKey.contains("6")){ |
|
|
|
PoiUtil.createHeading1(newDoc,"天气情况统计"); |
|
|
|
wordController.weather(newDoc); |
|
|
|
} |
|
|
|
if (exportKey.contains("8") || exportKey.contains("9")){ |
|
|
|
if (exportKey.contains("7") || exportKey.contains("8")){ |
|
|
|
PoiUtil.createHeading1(newDoc,"交通量统计"); |
|
|
|
for (String trafficIncidentType : exportKey) { |
|
|
|
if ("8".equals(trafficIncidentType)){ |
|
|
|
if ("7".equals(trafficIncidentType)){ |
|
|
|
//门架车流量
|
|
|
|
dcSdhsEventService.exporFrameDataAnalysis(newDoc,dcSdhsEventQuery); |
|
|
|
} else if ("9".equals(trafficIncidentType)){ |
|
|
|
} else if ("8".equals(trafficIncidentType)){ |
|
|
|
//收费站车流量
|
|
|
|
dcSdhsEventService.exporttollGateEntrance(newDoc,dcSdhsEventQuery); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if (exportKey.contains("10")){ |
|
|
|
if (exportKey.contains("9") || exportKey.contains("10") || exportKey.contains("11") || exportKey.contains("12") || exportKey.contains("13")){ |
|
|
|
PoiUtil.createHeading1(newDoc,"交通事故情况"); |
|
|
|
//交通事故类型统计
|
|
|
|
dcSdhsEventService.exportAccidentType(newDoc,dcSdhsEventQuery); |
|
|
|
for (String trafficIncidentType : exportKey) { |
|
|
|
if ("9".equals(trafficIncidentType)){ |
|
|
|
//事故类型统计
|
|
|
|
dcSdhsEventService.exportAccidentType(newDoc, dcSdhsEventQuery); |
|
|
|
} else if ("10".equals(trafficIncidentType)){ |
|
|
|
//事故车型分析
|
|
|
|
dcSdhsEventService.exportAccidentModelAnalysis(newDoc, dcSdhsEventQuery); |
|
|
|
} else if ("11".equals(trafficIncidentType)){ |
|
|
|
//事故时间分析
|
|
|
|
dcSdhsEventService.exportAccidentTimeAnalysis(newDoc, dcSdhsEventQuery); |
|
|
|
} else if ("12".equals(trafficIncidentType)){ |
|
|
|
//事故地市分布
|
|
|
|
dcSdhsEventService.exportRegionAnalysis(newDoc,dcSdhsEventQuery); |
|
|
|
} else if ("13".equals(trafficIncidentType)){ |
|
|
|
//事故路段分布
|
|
|
|
dcSdhsEventService.accidentSectionAnalysisExport(newDoc,dcSdhsEventQuery); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if (exportKey.contains("11") || exportKey.contains("12")){ |
|
|
|
if (exportKey.contains("14") || exportKey.contains("15")){ |
|
|
|
PoiUtil.createHeading1(newDoc,"拥堵情况"); |
|
|
|
for (String trafficIncidentType : exportKey) { |
|
|
|
if ("11".equals(trafficIncidentType)){ |
|
|
|
if ("14".equals(trafficIncidentType)){ |
|
|
|
//拥堵地点统计
|
|
|
|
dcSdhsEventService.accidentCongestedLocationExport(newDoc,dcSdhsEventQuery); |
|
|
|
} else if ("12".equals(trafficIncidentType)){ |
|
|
|
} else if ("15".equals(trafficIncidentType)){ |
|
|
|
//路段平均拥堵时长
|
|
|
|
dcSdhsEventService.accidentCongestedTimeExport(newDoc,dcSdhsEventQuery); |
|
|
|
} |
|
|
@ -251,6 +269,13 @@ public class DcSdhsEventController extends BaseController { |
|
|
|
return dcSdhsEventService.selectRegionAnalysis(dcSdhsEventQuery); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation("查询事件地市分布") |
|
|
|
@PostMapping("/selectEventRegionAnalysis") |
|
|
|
public AjaxResult selectEventRegionAnalysis(@RequestBody DcSdhsEventQuery dcSdhsEventQuery) |
|
|
|
{ |
|
|
|
return dcSdhsEventService.selectEventRegionAnalysis(dcSdhsEventQuery); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 事故时间分析 |
|
|
|
* @param dcSdhsEventQuery |
|
|
@ -401,4 +426,18 @@ public class DcSdhsEventController extends BaseController { |
|
|
|
return dcSdhsEventService.getDataCalendar(month); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 事件时间分析 |
|
|
|
* @param dcSdhsEventQuery |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@PostMapping("/eventTimeAnalysis") |
|
|
|
@ApiOperation("事故时间分析") |
|
|
|
public AjaxResult eventTimeAnalysis(@RequestBody DcSdhsEventQuery dcSdhsEventQuery){ |
|
|
|
if (StringUtils.isEmpty(dcSdhsEventQuery.getType()) || StringUtils.isEmpty(dcSdhsEventQuery.getThisTime()) || StringUtils.isEmpty(dcSdhsEventQuery.getLastTime())){ |
|
|
|
return AjaxResult.error("参数错误"); |
|
|
|
} |
|
|
|
return AjaxResult.success( dcSdhsEventService.eventTimeAnalysis(dcSdhsEventQuery)); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|