Commit f0fbb621 authored by duwei's avatar duwei

优化代码

parent 79d9b027
...@@ -47,7 +47,7 @@ public class CrossingDirectionQueryVO { ...@@ -47,7 +47,7 @@ public class CrossingDirectionQueryVO {
@ApiModelProperty(value = "非机动车流量") @ApiModelProperty(value = "非机动车流量")
@ExcelProperty("非机动车流量") @ExcelProperty("非机动车流量")
private int nonMotorFlow; private double nonMotorFlow;
@ExcelProperty("小车流量") @ExcelProperty("小车流量")
private Integer trafficFlowC; private Integer trafficFlowC;
...@@ -60,7 +60,7 @@ public class CrossingDirectionQueryVO { ...@@ -60,7 +60,7 @@ public class CrossingDirectionQueryVO {
@ApiModelProperty(value = "平均速度") @ApiModelProperty(value = "平均速度")
@ExcelProperty("平均速度") @ExcelProperty("平均速度")
private Integer speed; private double speed;
@ApiModelProperty(value = "平均车头间距") @ApiModelProperty(value = "平均车头间距")
@ExcelProperty("平均车头间距") @ExcelProperty("平均车头间距")
...@@ -68,15 +68,15 @@ public class CrossingDirectionQueryVO { ...@@ -68,15 +68,15 @@ public class CrossingDirectionQueryVO {
@ApiModelProperty(value = "平均车头时距") @ApiModelProperty(value = "平均车头时距")
@ExcelProperty("平均车头时距") @ExcelProperty("平均车头时距")
private Integer vehheadTime; private double vehheadTime;
@ApiModelProperty(value = "最大排队") @ApiModelProperty(value = "最大排队")
@ExcelProperty("最大排队") @ExcelProperty("最大排队")
private Integer queueLength; private double queueLength;
@ApiModelProperty(value = "平均停车次数") @ApiModelProperty(value = "平均停车次数")
@ExcelProperty("平均停车次数") @ExcelProperty("平均停车次数")
private Integer stopTimes; private double stopTimes;
//----------------------------- //-----------------------------
...@@ -122,7 +122,7 @@ public class CrossingDirectionQueryVO { ...@@ -122,7 +122,7 @@ public class CrossingDirectionQueryVO {
@ApiModelProperty(value = "时间占有率") @ApiModelProperty(value = "时间占有率")
@ExcelProperty("平均时间占有率%") @ExcelProperty("平均时间占有率%")
private Integer timeOccupancy; private double timeOccupancy;
@ApiModelProperty(value = "空间占有率") @ApiModelProperty(value = "空间占有率")
// 空间长度占比 todo字段名称展示先不改了 // 空间长度占比 todo字段名称展示先不改了
......
...@@ -60,7 +60,7 @@ public class CrossingQueryVO { ...@@ -60,7 +60,7 @@ public class CrossingQueryVO {
@ApiModelProperty(value = "平均速度") @ApiModelProperty(value = "平均速度")
@ExcelProperty("平均速度") @ExcelProperty("平均速度")
private Integer speed; private double speed;
@ApiModelProperty(value = "平均车头间距") @ApiModelProperty(value = "平均车头间距")
@ExcelProperty("平均车头间距") @ExcelProperty("平均车头间距")
...@@ -68,15 +68,15 @@ public class CrossingQueryVO { ...@@ -68,15 +68,15 @@ public class CrossingQueryVO {
@ApiModelProperty(value = "平均车头时距") @ApiModelProperty(value = "平均车头时距")
@ExcelProperty("平均车头时距") @ExcelProperty("平均车头时距")
private Integer vehheadTime; private double vehheadTime;
@ApiModelProperty(value = "最大排队") @ApiModelProperty(value = "最大排队")
@ExcelProperty("最大排队") @ExcelProperty("最大排队")
private Integer queueLength; private double queueLength;
@ApiModelProperty(value = "平均停车次数") @ApiModelProperty(value = "平均停车次数")
@ExcelProperty("平均停车次数") @ExcelProperty("平均停车次数")
private Integer stopTimes; private double stopTimes;
//----------------------------- //-----------------------------
...@@ -122,12 +122,12 @@ public class CrossingQueryVO { ...@@ -122,12 +122,12 @@ public class CrossingQueryVO {
@ApiModelProperty(value = "时间占有率") @ApiModelProperty(value = "时间占有率")
@ExcelProperty("平均时间占有率%") @ExcelProperty("平均时间占有率%")
private Integer timeOccupancy; private double timeOccupancy;
@ApiModelProperty(value = "空间占有率") @ApiModelProperty(value = "空间占有率")
// 空间长度占比 todo字段名称展示先不改了 // 空间长度占比 todo字段名称展示先不改了
@ExcelProperty("平均空间占有率%") @ExcelProperty("平均空间占有率%")
private Integer vehicleNumsRatioMean; private double vehicleNumsRatioMean;
@ExcelProperty("85位速度") @ExcelProperty("85位速度")
private double v85; private double v85;
...@@ -187,6 +187,10 @@ public class CrossingQueryVO { ...@@ -187,6 +187,10 @@ public class CrossingQueryVO {
@ExcelProperty("二次停车通过率") @ExcelProperty("二次停车通过率")
private double twoStopPassRate; private double twoStopPassRate;
@ApiModelProperty(name = "三次停车通过率")
@ExcelProperty("三次停车通过率")
public double threeStopRate;
@ApiModelProperty(value = "路口未清空率") @ApiModelProperty(value = "路口未清空率")
@ExcelProperty("路口未清空率") @ExcelProperty("路口未清空率")
private double crossNoClearRate; private double crossNoClearRate;
...@@ -211,4 +215,12 @@ public class CrossingQueryVO { ...@@ -211,4 +215,12 @@ public class CrossingQueryVO {
@ExcelProperty("车辆总和") @ExcelProperty("车辆总和")
private int allVehiceleFlow; private int allVehiceleFlow;
} }
public static void main(String[] args) {
//保留两位小数
double b = Math.round(0.01d * 100) / 100.0;
System.out.println(b);
double a = (double) Math.round(0.01d);
System.out.println(a);
}
} }
...@@ -72,7 +72,7 @@ public class CrossingTurnQueryVO { ...@@ -72,7 +72,7 @@ public class CrossingTurnQueryVO {
@ApiModelProperty(value = "平均速度") @ApiModelProperty(value = "平均速度")
@ExcelProperty("平均速度") @ExcelProperty("平均速度")
private Integer speed; private double speed;
@ApiModelProperty(value = "平均车头间距") @ApiModelProperty(value = "平均车头间距")
@ExcelProperty("平均车头间距") @ExcelProperty("平均车头间距")
...@@ -80,15 +80,15 @@ public class CrossingTurnQueryVO { ...@@ -80,15 +80,15 @@ public class CrossingTurnQueryVO {
@ApiModelProperty(value = "平均车头时距") @ApiModelProperty(value = "平均车头时距")
@ExcelProperty("平均车头时距") @ExcelProperty("平均车头时距")
private Integer vehheadTime; private double vehheadTime;
@ApiModelProperty(value = "最大排队") @ApiModelProperty(value = "最大排队")
@ExcelProperty("最大排队") @ExcelProperty("最大排队")
private Integer queueLength; private double queueLength;
@ApiModelProperty(value = "平均停车次数") @ApiModelProperty(value = "平均停车次数")
@ExcelProperty("平均停车次数") @ExcelProperty("平均停车次数")
private Integer stopTimes; private double stopTimes;
//----------------------------- //-----------------------------
...@@ -134,7 +134,7 @@ public class CrossingTurnQueryVO { ...@@ -134,7 +134,7 @@ public class CrossingTurnQueryVO {
@ApiModelProperty(value = "时间占有率") @ApiModelProperty(value = "时间占有率")
@ExcelProperty("平均时间占有率%") @ExcelProperty("平均时间占有率%")
private Integer timeOccupancy; private double timeOccupancy;
@ApiModelProperty(value = "空间占有率") @ApiModelProperty(value = "空间占有率")
// 空间长度占比 todo字段名称展示先不改了 // 空间长度占比 todo字段名称展示先不改了
......
...@@ -135,7 +135,7 @@ public class TableQueryVO { ...@@ -135,7 +135,7 @@ public class TableQueryVO {
@ApiModelProperty(value = "最大排队") @ApiModelProperty(value = "最大排队")
@ExcelProperty("最大排队") @ExcelProperty("最大排队")
private Integer queueLength; private double queueLength;
@ApiModelProperty(value = "平均延误") @ApiModelProperty(value = "平均延误")
@ExcelProperty("平均延误") @ExcelProperty("平均延误")
...@@ -151,11 +151,11 @@ public class TableQueryVO { ...@@ -151,11 +151,11 @@ public class TableQueryVO {
@ApiModelProperty(value = "平均停车次数") @ApiModelProperty(value = "平均停车次数")
@ExcelProperty("平均停车次数") @ExcelProperty("平均停车次数")
private Integer stopTimes; private double stopTimes;
@ApiModelProperty(value = "平均车头时距") @ApiModelProperty(value = "平均车头时距")
@ExcelProperty("平均车头时距") @ExcelProperty("平均车头时距")
private Integer vehheadTime; private double vehheadTime;
@ApiModelProperty(value = "饱和度") @ApiModelProperty(value = "饱和度")
@ExcelProperty("饱和度") @ExcelProperty("饱和度")
...@@ -179,17 +179,17 @@ public class TableQueryVO { ...@@ -179,17 +179,17 @@ public class TableQueryVO {
@ApiModelProperty(value = "时间占有率") @ApiModelProperty(value = "时间占有率")
@ExcelProperty("平均时间占有率%") @ExcelProperty("平均时间占有率%")
private Integer timeOccupancy; private double timeOccupancy;
@ApiModelProperty(value = "空间占有率") @ApiModelProperty(value = "空间占有率")
// 空间长度占比 todo字段名称展示先不改了 // 空间长度占比 todo字段名称展示先不改了
@ExcelProperty("平均空间占有率%") @ExcelProperty("平均空间占有率%")
private Integer vehicleNumsRatioMean; private double vehicleNumsRatioMean;
@ExcelProperty("85位速度") @ExcelProperty("85位速度")
private double v85; private double v85;
@ApiModelProperty(value = "速度") @ApiModelProperty(value = "速度")
@ExcelProperty("平均速度") @ExcelProperty("平均速度")
private Integer speed; private double speed;
@ExcelProperty("大车流量") @ExcelProperty("大车流量")
private Integer trafficFlowA; private Integer trafficFlowA;
@ExcelProperty("中车流量") @ExcelProperty("中车流量")
...@@ -213,7 +213,7 @@ public class TableQueryVO { ...@@ -213,7 +213,7 @@ public class TableQueryVO {
@ApiModelProperty(value = "溢出次数") @ApiModelProperty(value = "溢出次数")
@ExcelProperty("溢出次数") @ExcelProperty("溢出次数")
private int overflowTimes; private double overflowTimes;
@ApiModelProperty(value = "失衡次数") @ApiModelProperty(value = "失衡次数")
@ExcelProperty("失衡次数") @ExcelProperty("失衡次数")
......
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