Commit bc200078 authored by 杜伟's avatar 杜伟

加入两个接口,一个方向级查询,一个路口级查询

parent 2083069a
...@@ -290,31 +290,6 @@ public class TrendController { ...@@ -290,31 +290,6 @@ public class TrendController {
return JsonViewObject.newInstance().success(result); return JsonViewObject.newInstance().success(result);
} }
@ApiOperation(value = "车道快照指标", notes = "车道快照指标", response = JsonViewObject.class,
produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
@PostMapping(value = "/laneSnapshotIndex",
produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
@ApiResponses({
@ApiResponse(code = 200, message = "OK", response = TableQueryVO.RealTimeDataElement.class),
})
public JsonViewObject laneSnapshotIndex(@RequestBody LaneSnapshotIndexVO laneSnapshotIndexVO) throws Exception {
List<TableQueryVO.RealTimeDataElement> result = trendService.laneSnapshotIndex(laneSnapshotIndexVO);
return JsonViewObject.newInstance().success(result);
}
@ApiOperation(value = "溢出事件", notes = "溢出事件", response = JsonViewObject.class,
produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
@PostMapping(value = "/overFlowEvent",
produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
@ApiResponses({
@ApiResponse(code = 200, message = "OK", response = TableQueryVO.RealTimeDataElement.class),
})
public JsonViewObject overFlowEvent(@RequestBody LaneSnapshotIndexVO laneSnapshotIndexVO) throws Exception {
List<OverflowEvent> result = trendService.overFlowEvent(laneSnapshotIndexVO);
return JsonViewObject.newInstance().success(result);
}
/** /**
* 车道交通指标 - 车道周期转向数据 * 车道交通指标 - 车道周期转向数据
* @param lanePeriodTurnVO * @param lanePeriodTurnVO
...@@ -347,17 +322,18 @@ public class TrendController { ...@@ -347,17 +322,18 @@ public class TrendController {
@ApiResponse(code = 200, message = "OK", response = AnalysisRidTurnIndicators.class), @ApiResponse(code = 200, message = "OK", response = AnalysisRidTurnIndicators.class),
}) })
public JsonViewObject periodDirectionData(@RequestBody PeriodDirectionVO periodDirectionVO) throws Exception { public JsonViewObject periodDirectionData(@RequestBody PeriodDirectionVO periodDirectionVO) throws Exception {
List<AnalysisRidTurnIndicators> result = trendService.periodDirectionData(periodDirectionVO); List<CrossingDirectionQueryVO.CycleDataElement> result = trendService.periodDirectionData(periodDirectionVO);
return JsonViewObject.newInstance().success(result); return JsonViewObject.newInstance().success(result);
} }
/** /**
* 车道交通指标 - 路口级 * 车道交通指标 - 路口级
* 条件:
* @param periodCrossingVO * @param periodCrossingVO
* @return * @return
* @throws Exception * @throws Exception
*/ */
@ApiOperation(value = "路口方向级数据", notes = "路口方向级数据", response = JsonViewObject.class, @ApiOperation(value = "路口级数据", notes = "路口级数据", response = JsonViewObject.class,
produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON) produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
@PostMapping(value = "/periodCrossingData", @PostMapping(value = "/periodCrossingData",
produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON) produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
...@@ -365,10 +341,37 @@ public class TrendController { ...@@ -365,10 +341,37 @@ public class TrendController {
@ApiResponse(code = 200, message = "OK", response = AnalysisRidTurnIndicators.class), @ApiResponse(code = 200, message = "OK", response = AnalysisRidTurnIndicators.class),
}) })
public JsonViewObject periodDirectionData(@RequestBody PeriodCrossingVO periodCrossingVO) throws Exception { public JsonViewObject periodDirectionData(@RequestBody PeriodCrossingVO periodCrossingVO) throws Exception {
List<AnalysisRidTurnIndicators> result = trendService.periodCrossingData(periodCrossingVO); List<CrossingQueryVO.CycleDataElement> result = trendService.periodCrossingData(periodCrossingVO);
return JsonViewObject.newInstance().success(result); return JsonViewObject.newInstance().success(result);
} }
@ApiOperation(value = "车道快照指标", notes = "车道快照指标", response = JsonViewObject.class,
produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
@PostMapping(value = "/laneSnapshotIndex",
produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
@ApiResponses({
@ApiResponse(code = 200, message = "OK", response = TableQueryVO.RealTimeDataElement.class),
})
public JsonViewObject laneSnapshotIndex(@RequestBody LaneSnapshotIndexVO laneSnapshotIndexVO) throws Exception {
List<TableQueryVO.RealTimeDataElement> result = trendService.laneSnapshotIndex(laneSnapshotIndexVO);
return JsonViewObject.newInstance().success(result);
}
@ApiOperation(value = "溢出事件", notes = "溢出事件", response = JsonViewObject.class,
produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
@PostMapping(value = "/overFlowEvent",
produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
@ApiResponses({
@ApiResponse(code = 200, message = "OK", response = TableQueryVO.RealTimeDataElement.class),
})
public JsonViewObject overFlowEvent(@RequestBody LaneSnapshotIndexVO laneSnapshotIndexVO) throws Exception {
List<OverflowEvent> result = trendService.overFlowEvent(laneSnapshotIndexVO);
return JsonViewObject.newInstance().success(result);
}
@ApiOperation(value = "事件查询列表", notes = "事件查询列表", response = JsonViewObject.class, @ApiOperation(value = "事件查询列表", notes = "事件查询列表", response = JsonViewObject.class,
produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON) produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
@PostMapping(value = "/holoEventList", @PostMapping(value = "/holoEventList",
......
...@@ -73,7 +73,7 @@ public interface TrendService { ...@@ -73,7 +73,7 @@ public interface TrendService {
* @return * @return
* @throws Exception * @throws Exception
*/ */
List<AnalysisRidTurnIndicators> periodDirectionData(PeriodDirectionVO periodDirectionVO) throws Exception; List<CrossingDirectionQueryVO.CycleDataElement> periodDirectionData(PeriodDirectionVO periodDirectionVO) throws Exception;
/** /**
* 获取时段路口级数据 * 获取时段路口级数据
...@@ -81,7 +81,7 @@ public interface TrendService { ...@@ -81,7 +81,7 @@ public interface TrendService {
* @return * @return
* @throws Exception * @throws Exception
*/ */
List<AnalysisRidTurnIndicators> periodCrossingData(PeriodCrossingVO periodCrossingVO) throws Exception; List<CrossingQueryVO.CycleDataElement> periodCrossingData(PeriodCrossingVO periodCrossingVO) throws Exception;
......
package net.wanji.opt.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
import java.util.List;
/**
* 路口方向级VO
*/
@Data
@NoArgsConstructor
@ApiModel(value = "CrossingDirectionQueryVO", description = "表格分时段查询")
public class CrossingDirectionQueryVO {
@ApiModelProperty(value = "周期数据")
private List<CycleDataElement> cycleData;
@NoArgsConstructor
@Data
public static class CycleDataElement {
@ApiModelProperty(value = "时间 格式 yyyy-MM-dd HH:mm:ss")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ExcelProperty("时间")
private Date time;
@ApiModelProperty(value = "方向:1北;2东北;3东;4东南;5南;6西南;7西;8西北")
@ExcelIgnore
private Integer dir;
@ExcelProperty("方向")
private String dirName;
@ApiModelProperty(value = "总流量")
@ExcelProperty("总流量")
private int allFlow;
@ApiModelProperty(value = "行人流量")
@ExcelProperty("行人流量")
private int pedFlow;
@ApiModelProperty(value = "非机动车流量")
@ExcelProperty("非机动车流量")
private int nonMotorFlow;
@ExcelProperty("小车流量")
private Integer trafficFlowC;
@ExcelProperty("中车流量")
private Integer trafficFlowB;
@ExcelProperty("大车流量")
private Integer trafficFlowA;
@ApiModelProperty(value = "平均速度")
@ExcelProperty("平均速度")
private Integer speed;
@ApiModelProperty(value = "平均车头间距")
@ExcelProperty("平均车头间距")
private Double vehheadDist;
@ApiModelProperty(value = "平均车头时距")
@ExcelProperty("平均车头时距")
private Integer vehheadTime;
@ApiModelProperty(value = "最大排队")
@ExcelProperty("最大排队")
private Integer queueLength;
@ApiModelProperty(value = "平均停车次数")
@ExcelProperty("平均停车次数")
private Integer stopTimes;
//-----------------------------
@ApiModelProperty(value = "车道转向:1左转;2直行;3右转;4掉头;5直左;6直右;7左直右;8左右;9左转掉头;10直行掉头;11右转掉头;12左直掉头;13直右掉头;14左直右掉头;15左右掉头',\n")
@ExcelIgnore
private Integer turn;
@ApiModelProperty(value = "车道,从左车道开始编号11、12、13...")
@ExcelProperty("车道号")
private String laneSort;
@ApiModelProperty(value = "流量")
@ExcelIgnore
private Integer flow;
@ApiModelProperty(value = "平均延误")
@ExcelProperty("平均延误")
private Integer delayTime ;
@ApiModelProperty(value = "路口效率指数")
@ExcelProperty("路口效率指数")
private Double efficiencyIndex ;
@ApiModelProperty(value = "效率评价等级")
@ExcelProperty("效率评价等级")
private Double efficiencyEvaluateLevel ;
@ApiModelProperty(value = "饱和度")
@ExcelProperty("饱和度")
private Double saturation;
@ApiModelProperty(value = "拥堵指数")
@ExcelProperty("拥堵指数")
private Double congestionIndex;
@ApiModelProperty(value = "溢出指数")
@ExcelProperty("溢出指数")
private Double overflowIndex;
@ApiModelProperty(value = "失衡指数")
@ExcelProperty("失衡指数")
private Double imbalanceIndex;
@ApiModelProperty(value = "时间占有率")
@ExcelProperty("平均时间占有率%")
private Integer timeOccupancy;
@ApiModelProperty(value = "空间占有率")
// 空间长度占比 todo字段名称展示先不改了
@ExcelProperty("平均空间占有率%")
private Integer vehicleNumsRatioMean;
@ExcelProperty("85位速度")
private double v85;
@ApiModelProperty(value = "路口服务水平")
@ExcelProperty("路口服务水平")
private int serviceLevel;
@ApiModelProperty(value = "拥堵次数")
@ExcelProperty("拥堵次数")
private int congestionTimes;
@ApiModelProperty(value = "溢出次数")
@ExcelProperty("溢出次数")
private int overflowTimes;
@ApiModelProperty(value = "失衡次数")
@ExcelProperty("失衡次数")
private int imbalanceTimes;
@ApiModelProperty(value = "空放次数")
@ExcelProperty("空放次数")
private int freeFlowTimes;
@ApiModelProperty(value = "溢流率")
@ExcelProperty("溢流率")
private double overflowRate;
@ApiModelProperty(value = "冲突点")
@ExcelProperty("冲突点")
private int conflictPoint;
@ApiModelProperty(value = "路口安全系数")
@ExcelProperty("路口安全系数")
private double safetyCoefficient;
@ApiModelProperty(value = "安全评价等级")
@ExcelProperty("安全评价等级")
private double safetyEvaluateLevel;
@ApiModelProperty(value = "交通事件数")
@ExcelProperty("交通事件数")
private int trafficEventNum;
@ApiModelProperty(value = "交通事故数")
@ExcelProperty("交通事故数")
private int trafficAccidentNum;
@ApiModelProperty(value = "不停车通过率")
@ExcelProperty("不停车通过率")
private double noStopPassRate;
@ApiModelProperty(value = "一次停车通过率")
@ExcelProperty("一次停车通过率")
private double oneStopPassRate;
@ApiModelProperty(value = "二次停车通过率")
@ExcelProperty("二次停车通过率")
private double twoStopPassRate;
@ApiModelProperty(value = "路口未清空率")
@ExcelProperty("路口未清空率")
private double crossNoClearRate;
@ApiModelProperty(value = "平均排队长度")
@ExcelProperty("平均排队长度")
private double avgQueueLength;
@ApiModelProperty(value = "绿灯有效利用率")
@ExcelProperty("绿灯有效利用率")
private double greenLightEfficiency ;
@ApiModelProperty(value = "行人平均通过时间")
@ExcelProperty("行人平均通过时间")
private double pedAvgPassTime;
@ApiModelProperty(value = "行人闯红灯率")
@ExcelProperty("行人闯红灯率")
private double pedCrossRedLightRate;
@ApiModelProperty(value = "车辆总和")
@ExcelProperty("车辆总和")
private int allVehiceleFlow;
}
}
package net.wanji.opt.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
import java.util.List;
/**
* 路口级VO
*/
@Data
@NoArgsConstructor
@ApiModel(value = "CrossingQueryVO", description = "表格分时段查询")
public class CrossingQueryVO {
@ApiModelProperty(value = "周期数据")
private List<CycleDataElement> cycleData;
@NoArgsConstructor
@Data
public static class CycleDataElement {
@ApiModelProperty(value = "时间 格式 yyyy-MM-dd HH:mm:ss")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ExcelProperty("时间")
private Date time;
// @ApiModelProperty(value = "方向:1北;2东北;3东;4东南;5南;6西南;7西;8西北")
// @ExcelIgnore
// private Integer dir;
// @ExcelProperty("方向")
// private String dirName;
@ApiModelProperty(value = "总流量")
@ExcelProperty("总流量")
private int allFlow;
@ApiModelProperty(value = "行人流量")
@ExcelProperty("行人流量")
private int pedFlow;
@ApiModelProperty(value = "非机动车流量")
@ExcelProperty("非机动车流量")
private int nonMotorFlow;
@ExcelProperty("小车流量")
private Integer trafficFlowC;
@ExcelProperty("中车流量")
private Integer trafficFlowB;
@ExcelProperty("大车流量")
private Integer trafficFlowA;
@ApiModelProperty(value = "平均速度")
@ExcelProperty("平均速度")
private Integer speed;
@ApiModelProperty(value = "平均车头间距")
@ExcelProperty("平均车头间距")
private Double vehheadDist;
@ApiModelProperty(value = "平均车头时距")
@ExcelProperty("平均车头时距")
private Integer vehheadTime;
@ApiModelProperty(value = "最大排队")
@ExcelProperty("最大排队")
private Integer queueLength;
@ApiModelProperty(value = "平均停车次数")
@ExcelProperty("平均停车次数")
private Integer stopTimes;
//-----------------------------
@ApiModelProperty(value = "车道转向:1左转;2直行;3右转;4掉头;5直左;6直右;7左直右;8左右;9左转掉头;10直行掉头;11右转掉头;12左直掉头;13直右掉头;14左直右掉头;15左右掉头',\n")
@ExcelIgnore
private Integer turn;
@ApiModelProperty(value = "车道,从左车道开始编号11、12、13...")
@ExcelProperty("车道号")
private String laneSort;
@ApiModelProperty(value = "流量")
@ExcelIgnore
private Integer flow;
@ApiModelProperty(value = "平均延误")
@ExcelProperty("平均延误")
private Integer delayTime ;
@ApiModelProperty(value = "路口效率指数")
@ExcelProperty("路口效率指数")
private Double efficiencyIndex ;
@ApiModelProperty(value = "效率评价等级")
@ExcelProperty("效率评价等级")
private Double efficiencyEvaluateLevel ;
@ApiModelProperty(value = "饱和度")
@ExcelProperty("饱和度")
private Double saturation;
@ApiModelProperty(value = "拥堵指数")
@ExcelProperty("拥堵指数")
private Double congestionIndex;
@ApiModelProperty(value = "溢出指数")
@ExcelProperty("溢出指数")
private Double overflowIndex;
@ApiModelProperty(value = "失衡指数")
@ExcelProperty("失衡指数")
private Double imbalanceIndex;
@ApiModelProperty(value = "时间占有率")
@ExcelProperty("平均时间占有率%")
private Integer timeOccupancy;
@ApiModelProperty(value = "空间占有率")
// 空间长度占比 todo字段名称展示先不改了
@ExcelProperty("平均空间占有率%")
private Integer vehicleNumsRatioMean;
@ExcelProperty("85位速度")
private double v85;
@ApiModelProperty(value = "路口服务水平")
@ExcelProperty("路口服务水平")
private int serviceLevel;
@ApiModelProperty(value = "拥堵次数")
@ExcelProperty("拥堵次数")
private int congestionTimes;
@ApiModelProperty(value = "溢出次数")
@ExcelProperty("溢出次数")
private int overflowTimes;
@ApiModelProperty(value = "失衡次数")
@ExcelProperty("失衡次数")
private int imbalanceTimes;
@ApiModelProperty(value = "空放次数")
@ExcelProperty("空放次数")
private int freeFlowTimes;
@ApiModelProperty(value = "溢流率")
@ExcelProperty("溢流率")
private double overflowRate;
@ApiModelProperty(value = "冲突点")
@ExcelProperty("冲突点")
private int conflictPoint;
@ApiModelProperty(value = "路口安全系数")
@ExcelProperty("路口安全系数")
private double safetyCoefficient;
@ApiModelProperty(value = "安全评价等级")
@ExcelProperty("安全评价等级")
private double safetyEvaluateLevel;
@ApiModelProperty(value = "交通事件数")
@ExcelProperty("交通事件数")
private int trafficEventNum;
@ApiModelProperty(value = "交通事故数")
@ExcelProperty("交通事故数")
private int trafficAccidentNum;
@ApiModelProperty(value = "不停车通过率")
@ExcelProperty("不停车通过率")
private double noStopPassRate;
@ApiModelProperty(value = "一次停车通过率")
@ExcelProperty("一次停车通过率")
private double oneStopPassRate;
@ApiModelProperty(value = "二次停车通过率")
@ExcelProperty("二次停车通过率")
private double twoStopPassRate;
@ApiModelProperty(value = "路口未清空率")
@ExcelProperty("路口未清空率")
private double crossNoClearRate;
@ApiModelProperty(value = "平均排队长度")
@ExcelProperty("平均排队长度")
private double avgQueueLength;
@ApiModelProperty(value = "绿灯有效利用率")
@ExcelProperty("绿灯有效利用率")
private double greenLightEfficiency ;
@ApiModelProperty(value = "行人平均通过时间")
@ExcelProperty("行人平均通过时间")
private double pedAvgPassTime;
@ApiModelProperty(value = "行人闯红灯率")
@ExcelProperty("行人闯红灯率")
private double pedCrossRedLightRate;
@ApiModelProperty(value = "车辆总和")
@ExcelProperty("车辆总和")
private int allVehiceleFlow;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment