Commit 76baa26e authored by hanbing's avatar hanbing

[update] 城市大脑-态势监测指数增加浮点精度

parent ea00dabb
......@@ -251,6 +251,10 @@ public class TrendServiceImpl implements TrendService {
for (AbnormalCrossListVO abnormalCrossListVO : abnormalCrossListVOList) {
String crossId = abnormalCrossListVO.getId();
Integer batchTime = abnormalCrossListVO.getBatchTime();
double roundedTrafficIndex = Math.round(abnormalCrossListVO.getCongestionIndex() * 100.0) / 100.0;
abnormalCrossListVO.setCongestionIndex(roundedTrafficIndex);
Double congestionIndex = abnormalCrossListVO.getCongestionIndex();
double lastWeekIndex = getIndex(congestionIndex, crossId, batchTime - 604800);
double lastPeriodIndex = getIndex(congestionIndex, crossId, batchTime - 300);
......
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