Commit 16b02b9e authored by duwei's avatar duwei

优化4大指标字段

parent 1443df53
......@@ -1414,7 +1414,9 @@ public class TrendServiceImpl implements TrendService {
Double speed = po.getSpeed();
vo.setSpeed((double) Math.round(speed *100)/100.0 );//Math.round(0.01d * 100) / 100.0
Double queueLength = po.getQueueLength();
vo.setQueueLength((int) Math.round(queueLength));
if(queueLength != null){
vo.setQueueLength(Integer.parseInt(String.valueOf(queueLength)));
}
Integer delayTime = po.getDelayTime();
vo.setDelayTime(delayTime);
......@@ -1481,7 +1483,9 @@ public class TrendServiceImpl implements TrendService {
//路口未清空率
vo.setCrossNoClearRate(0);
//平均排队长度
vo.setAvgQueueLength(0.0);
if(queueLength != null){
vo.setAvgQueueLength(Integer.parseInt(String.valueOf(queueLength)));
}
//绿灯有效利用率
vo.setGreenLightEfficiency(0.0);
//行人平均通过时间
......@@ -1553,7 +1557,9 @@ public class TrendServiceImpl implements TrendService {
// Date dateFromTimestamp = new Date(millis);
Double queueLength = po.getQueueLength();
vo.setQueueLength(Math.round(queueLength *100)/100.0);
if (queueLength != null) {
vo.setQueueLength(Integer.parseInt(String.valueOf(queueLength)));
}
Integer delayTime = po.getDelayTime();
vo.setDelayTime(delayTime);
......@@ -1631,7 +1637,7 @@ public class TrendServiceImpl implements TrendService {
// vo.setCrossNoClearRate(0);
//平均排队长度
if (po.getQueueLength() != null) {
vo.setAvgQueueLength(po.getQueueLength());
vo.setAvgQueueLength(Integer.parseInt(String.valueOf(po.getQueueLength())));
}else{
// vo.setAvgQueueLength(0.0);
}
......@@ -1692,7 +1698,9 @@ public class TrendServiceImpl implements TrendService {
vo.setSpeed( Math.round(speed*100)/100.0);
// vo.setVehheadDist(0d);//车头间距
Double queueLength = po.getQueueLength();
vo.setQueueLength(Math.round(queueLength *100)/100.0);
if (queueLength != null) {
vo.setQueueLength(Integer.parseInt(String.valueOf(queueLength)));
}
Double stopTimes = po.getStopTimes();
if (stopTimes != null) {
vo.setStopTimes(Math.round(stopTimes * 100) / 100.0);
......@@ -1849,7 +1857,9 @@ public class TrendServiceImpl implements TrendService {
// Double vehheadTime = 0d;
// vo.setVehheadTime(Math.round(vehheadTime *100)/100.0);//车头时距
Double queueLength = po.getQueueLength();
vo.setQueueLength(Math.round(queueLength*100)/100.0);
if (queueLength != null) {
vo.setQueueLength(Integer.parseInt(queueLength.toString()));
}
Double stopTimes = po.getStopTimes();//停车次数
if (stopTimes != null) {
vo.setStopTimes(Math.round(stopTimes * 100) / 100.0);
......@@ -1947,7 +1957,7 @@ public class TrendServiceImpl implements TrendService {
// vo.setCrossNoClearRate(0);
//平均排队长度
if (po.getQueueLength() != null) {
vo.setAvgQueueLength(Math.round(po.getQueueLength()*100)/100.0);
vo.setAvgQueueLength(Integer.parseInt(String.valueOf(po.getQueueLength())));
}else {
// vo.setAvgQueueLength(0.0);
}
......@@ -2002,7 +2012,9 @@ public class TrendServiceImpl implements TrendService {
Double vehheadTime = 0d;
vo.setVehheadTime(Math.round(vehheadTime*100)/100.0);//车头时距
Double queueLength = po.getQueueLength();
vo.setQueueLength(Math.round(queueLength*100)/100.0);
if (queueLength != null) {
vo.setQueueLength(Integer.parseInt(String.valueOf(queueLength)));
}
Double stopTimes = po.getStopTimes();
if (stopTimes != null) {
vo.setStopTimes(Math.round(stopTimes *100)/100.0);//Math.round(0.01d * 100) / 100.0
......
......@@ -72,7 +72,7 @@ public class CrossingDirectionQueryVO {
@ApiModelProperty(value = "最大排队")
@ExcelProperty("最大排队")
private double queueLength;
private int queueLength;
@ApiModelProperty(value = "平均停车次数")
@ExcelProperty("平均停车次数")
......@@ -194,7 +194,7 @@ public class CrossingDirectionQueryVO {
@ApiModelProperty(value = "平均排队长度")
@ExcelProperty("平均排队长度")
private double avgQueueLength;
private int avgQueueLength;
@ApiModelProperty(value = "绿灯有效利用率")
@ExcelProperty("绿灯有效利用率")
......
......@@ -72,7 +72,7 @@ public class CrossingQueryVO {
@ApiModelProperty(value = "最大排队")
@ExcelProperty("最大排队")
private double queueLength;
private int queueLength;
@ApiModelProperty(value = "平均停车次数")
@ExcelProperty("平均停车次数")
......@@ -198,7 +198,7 @@ public class CrossingQueryVO {
@ApiModelProperty(value = "平均排队长度")
@ExcelProperty("平均排队长度")
private double avgQueueLength;
private int avgQueueLength;
@ApiModelProperty(value = "绿灯有效利用率")
@ExcelProperty("绿灯有效利用率")
......
......@@ -84,7 +84,7 @@ public class CrossingTurnQueryVO {
@ApiModelProperty(value = "最大排队")
@ExcelProperty("最大排队")
private double queueLength;
private int queueLength;
@ApiModelProperty(value = "平均停车次数")
@ExcelProperty("平均停车次数")
......@@ -206,7 +206,7 @@ public class CrossingTurnQueryVO {
@ApiModelProperty(value = "平均排队长度")
@ExcelProperty("平均排队长度")
private double avgQueueLength;
private int avgQueueLength;
@ApiModelProperty(value = "绿灯有效利用率")
@ExcelProperty("绿灯有效利用率")
......
......@@ -136,7 +136,7 @@ public class TableQueryVO {
@ApiModelProperty(value = "最大排队")
@ExcelProperty("最大排队")
private double queueLength;
private int queueLength;
@ApiModelProperty(value = "平均延误")
@ExcelProperty("平均延误")
......@@ -266,7 +266,7 @@ public class TableQueryVO {
@ApiModelProperty(value = "平均排队长度")
@ExcelProperty("平均排队长度")
private double avgQueueLength;
private int avgQueueLength;
@ApiModelProperty(value = "绿灯有效利用率")
@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