Commit 8760d65e authored by hanbing's avatar hanbing

[update] 修改全息信号评价流量计算方式

parent f3d0c67c
......@@ -261,10 +261,10 @@ public class EvaluateServiceImpl implements EvaluateService {
long preSeconds = currentSeconds - minutes * 60;
List<CrossDataHistPO> crossDataHistPOS = crossDataHistMapper.selectByCrossIdAndTimestamp(crossId, preSeconds);
if (CollectionUtil.isNotEmpty(crossDataHistPOS)) {
int sum = crossDataHistPOS.stream()
double avg = crossDataHistPOS.stream()
.mapToInt(CrossDataHistPO::getFlow)
.sum();
evaluateCrossDetailVO.setFlow(sum);
.average().orElse(0.0);
evaluateCrossDetailVO.setFlow((int)avg);
}
evaluateCrossDetailVO.setLength(crossDataRealtimePO.getQueueLength());
evaluateCrossDetailVO.setStopTimes(crossDataRealtimePO.getStopTimes());
......
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