Commit 728f850f authored by duanruiming's avatar duanruiming

[update] 微观大数据平台-Excel导出优化

parent bdf0aae0
......@@ -58,6 +58,15 @@ public class BaseCrossInfoCache implements CommandLineRunner {
return isSignalCrossIdList;
}
public String getCrossName(String crossId) {
for (BaseCrossInfoPO baseCrossInfoPO : crossInfoList) {
if (StringUtils.equals(crossId, baseCrossInfoPO.getId())) {
return baseCrossInfoPO.getName();
}
}
return "";
}
@Override
public void run(String... args) throws Exception {
init();
......
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;
......@@ -34,14 +35,17 @@ public class TableQueryVO {
private Date time;
@ApiModelProperty(value = "方向:1北;2东北;3东;4东南;5南;6西南;7西;8西北")
@ExcelProperty("方向")
@ExcelIgnore
private Integer dir;
@ExcelProperty("方向")
private String dirName;
@ApiModelProperty(value = "车道,从左车道开始编号11、12、13...")
@ExcelProperty("车道号")
private String laneSort;
@ApiModelProperty(value = "车道编号")
@ExcelIgnore
private String laneId;
@ApiModelProperty(value = "排队长度")
......@@ -65,6 +69,7 @@ public class TableQueryVO {
private int carNums;
@ApiModelProperty(value = "空间密度车辆负荷比")
@ExcelIgnore
private double vehicleNumsRatio;
@ApiModelProperty(value = "空间密度(长度占比)")
......@@ -79,8 +84,8 @@ public class TableQueryVO {
@ExcelProperty("头车速度")
private double headSpeed;
@ApiModelProperty(value = "车速度")
@ExcelProperty("车速度")
@ApiModelProperty(value = "车速度")
@ExcelProperty("车速度")
private double mailSpeed;
@ApiModelProperty(value = "队首距离(米)")
......@@ -105,10 +110,14 @@ public class TableQueryVO {
private Date time;
@ApiModelProperty(value = "方向:1北;2东北;3东;4东南;5南;6西南;7西;8西北")
@ExcelProperty("方向")
@ExcelIgnore
private Integer dir;
@ExcelProperty("方向")
private String dirName;
@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...")
......@@ -116,13 +125,9 @@ public class TableQueryVO {
private String laneSort;
@ApiModelProperty(value = "流量")
@ExcelProperty("流量")
@ExcelIgnore
private Integer flow;
@ApiModelProperty(value = "速度")
@ExcelProperty("速度")
private Integer speed;
@ApiModelProperty(value = "最大排队")
@ExcelProperty("最大排队")
private Integer queueLength;
......@@ -144,31 +149,35 @@ public class TableQueryVO {
private Double vehheadDist;
@ApiModelProperty(value = "时间占有率")
@ExcelProperty("平均时间占有率")
private Integer timeOccupancy;
@ApiModelProperty(value = "空间占有率")
// 空间占有率即车辆负荷比
@ExcelProperty("空间占有率")
@ExcelProperty("平均空间占有率")
private Integer vehicleNumsRatioMean;
@ExcelProperty("85位速度")
private double v85;
@ApiModelProperty(value = "速度")
@ExcelProperty("平均速度")
private Integer speed;
@ExcelProperty("大车流量")
private Integer trafficFlowA;
@ExcelProperty("中车流量")
private Integer trafficFlowB;
@ExcelProperty("小车流量")
private Integer trafficFlowC;
@ExcelProperty("85速度")
private double v85;
@ApiModelProperty(value = "非机动车流量")
@ExcelProperty("非机动车流量")
private int nonMotorFlow;
@ApiModelProperty(value = "行人流量")
@ExcelProperty("行人流量")
private int pedFlow;
@ApiModelProperty(value = "总流量")
@ExcelProperty("总流量")
private int allFlow;
@ApiModelProperty(value = "车辆总和")
@ExcelProperty("车辆总和")
private int allVehiceleFlow;
@ApiModelProperty(value = "总流量")
@ExcelProperty("总流量")
private int allFlow;
}
}
......@@ -51,12 +51,12 @@ public class TurnDataIndexExcelVO {
@ExcelProperty("直行平均速度")
private BigDecimal straightSpeed;
@ApiModelProperty(value = "右转平均流量")
@ExcelProperty("右转平均流量")
@ApiModelProperty(value = "右转流量")
@ExcelProperty("右转流量")
private Integer rightFlow;
@ApiModelProperty(value = "右转速度")
@ExcelProperty("右转速度")
@ExcelProperty("右转平均速度")
private BigDecimal rightSpeed;
}
......@@ -104,7 +104,7 @@
<select id="selectByCrossIdAndTimeSpan" resultType="net.wanji.databus.po.CrossLaneDataHistPOExt">
SELECT t1.id, t2.dir,t2.turn, t2.sort, t1.flow, t1.speed, t1.queue_length, t1.delay_time, t1.stop_times,
t1.vehhead_time, t1.batch_time, t1.time_occupancy, t1.vehicle_nums_ratio_mean, t1.start_time,
t1.vehhead_time,t1.vehhead_dist, t1.batch_time, t1.time_occupancy, t1.vehicle_nums_ratio_mean, t1.start_time,
t1.traffic_flow_A, t1.traffic_flow_B, t1.traffic_flow_C,t1.v_85, t1.non_motor_flow, t1.time_occupancy
FROM t_lane_data_hist t1 JOIN t_base_lane_info t2 ON t1.id = t2.id
where t1.cross_id = #{crossId}
......
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