Commit 4da0ccfe authored by hanbing's avatar hanbing

[update] 运行评价-详细指标查询增加溢流率

parent 79bab51c
......@@ -352,6 +352,7 @@ public class RunningEvaluateServiceImpl implements RunningEvaluateService {
double sturationSum = 0.0;
double stopTimesSum = 0.0;
int delayTimeSum = 0;
double effusionRateSum = 0.0;
for (MetricHistDTO metricHistDTO : dtoList) {
Integer flow = metricHistDTO.getFlow();
Double speed = metricHistDTO.getSpeed();
......@@ -359,12 +360,14 @@ public class RunningEvaluateServiceImpl implements RunningEvaluateService {
Double sturation = metricHistDTO.getSturation();
Double stopTimes = metricHistDTO.getStopTimes();
Integer delayTime = metricHistDTO.getDelayTime();
Double effusionRate = metricHistDTO.getEffusionRate();
if (flow != null) flowSum += flow;
if (speed != null) speedSum += speed;
if (capacity != null) capacitySum += capacity;
if (sturation != null) sturationSum += sturation;
if (stopTimes != null) stopTimesSum += stopTimes;
if (delayTime != null) delayTimeSum += delayTime;
if (effusionRate != null) effusionRateSum += effusionRate;
}
int size = dtoList.size();
crossMetrics.setFlow(flowSum);
......@@ -373,6 +376,7 @@ public class RunningEvaluateServiceImpl implements RunningEvaluateService {
crossMetrics.setSturation(sturationSum / size);
crossMetrics.setStopTimes(stopTimesSum / size);
crossMetrics.setDelayTime(delayTimeSum / size);
crossMetrics.setEffusionRate(effusionRateSum / size);
}
res.add(crossMetrics);
}
......
......@@ -97,5 +97,8 @@ public class RunningEvaluateMetricsDetailVO {
@ApiModelProperty(value = "平均延误(秒)")
private Integer delayTime ;
@ApiModelProperty(value = "溢流率")
private Double effusionRate ;
}
}
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