Commit 64a05f9a authored by duanruiming's avatar duanruiming

[add] 路口检测-交通指标优化

parent c3bc008f
......@@ -452,9 +452,9 @@ public class TrendServiceImpl implements TrendService {
abnormalCrossDetailVO.setCrossStopTimes(crossDataRealtimePO.getStopTimes());
abnormalCrossDetailVO.setSpeed(crossDataRealtimePO.getSpeed());
Double sturation = crossDataRealtimePO.getSturation();
abnormalCrossDetailVO.setSturation((double) Math.round(sturation) * 100);
String serviceLevel = CrossUtil.getServiceLevel(sturation);
abnormalCrossDetailVO.setServiceLevel(serviceLevel);
abnormalCrossDetailVO.setSturation((int)(sturation * 100));
//String serviceLevel = CrossUtil.getServiceLevel(sturation);
abnormalCrossDetailVO.setServiceLevel(crossDataRealtimePO.getServiceLevel());
abnormalCrossDetailVO.setHourFlow(crossDataRealtimePO.getFlow() * 12);
BigDecimal bigDecimal = BigDecimal.valueOf(crossDataRealtimePO.getTrafficIndex()).setScale(2, RoundingMode.HALF_UP);
abnormalCrossDetailVO.setCongestionIndex(bigDecimal);
......
package net.wanji.opt.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......@@ -21,10 +22,13 @@ public class AbnormalCrossDetailVO {
@ApiModelProperty(value = "路口状态:0正常;1失衡;2拥堵;3溢出")
private Integer crossStatus;
@ApiModelProperty(value = "最大排队")
@JsonSerialize(using = net.wanji.common.framework.DoubleSerialize.class)
private Double crossQueueLength;
@ApiModelProperty(value = "流率")
@JsonSerialize(using = net.wanji.common.framework.DoubleSerialize.class)
private Double crossFlowRate;
@ApiModelProperty(value = "平均停车次数")
@JsonSerialize(using = net.wanji.common.framework.DoubleSerialize.class)
private Double crossStopTimes;
@ApiModelProperty(value = "拥堵指数")
private BigDecimal congestionIndex;
......@@ -35,9 +39,10 @@ public class AbnormalCrossDetailVO {
@ApiModelProperty(value = "方向实时数据")
private List<DirDataElement> dirData;
@ApiModelProperty(value = "平均速度")
@JsonSerialize(using = net.wanji.common.framework.DoubleSerialize.class)
private Double speed;
@ApiModelProperty(value = "饱和度")
private Double sturation;
private Integer sturation;
@ApiModelProperty(value = "路口服务水平")
private String serviceLevel;
@ApiModelProperty(value = "小时流量")
......
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