Commit eb593da5 authored by duanruiming's avatar duanruiming

[add] 重点路口时间优化

parent 425c88b0
...@@ -1817,6 +1817,9 @@ public class TrendServiceImpl implements TrendService { ...@@ -1817,6 +1817,9 @@ public class TrendServiceImpl implements TrendService {
} }
} }
} }
if (StringUtils.isNotBlank(crossId)) {
return hotspotCrossVOS.stream().sorted(Comparator.comparing(HotspotCrossVO::getTimeStamp).reversed()).collect(Collectors.toList());
}
return hotspotCrossVOS.stream().sorted(Comparator.comparing(HotspotCrossVO::getTimeStamp)).collect(Collectors.toList()); return hotspotCrossVOS.stream().sorted(Comparator.comparing(HotspotCrossVO::getTimeStamp)).collect(Collectors.toList());
} catch (Exception e) { } catch (Exception e) {
log.error("重点路口监测异常:", e); log.error("重点路口监测异常:", e);
...@@ -2051,6 +2054,7 @@ public class TrendServiceImpl implements TrendService { ...@@ -2051,6 +2054,7 @@ public class TrendServiceImpl implements TrendService {
/** /**
* 设置状态时间比例 * 设置状态时间比例
*
* @param crossStatusTimeRateVO * @param crossStatusTimeRateVO
* @param status * @param status
* @param rate * @param rate
...@@ -2159,7 +2163,7 @@ public class TrendServiceImpl implements TrendService { ...@@ -2159,7 +2163,7 @@ public class TrendServiceImpl implements TrendService {
resultPojo.setDirName(BaseEnum.SignalDirectionEnum.getNameByCode(dir)); resultPojo.setDirName(BaseEnum.SignalDirectionEnum.getNameByCode(dir));
resultPojo.setOverflowId(String.valueOf(dir)); resultPojo.setOverflowId(String.valueOf(dir));
resultPojo.setOverflowNums(overflowNums); resultPojo.setOverflowNums(overflowNums);
resultPojo.setSpeed( Math.round((meanV / dirList.size()) * 100) / 100.0); resultPojo.setSpeed(Math.round((meanV / dirList.size()) * 100) / 100.0);
resultPojo.setVehicleLengthRatio(Math.round(vehicleLengthRatio / dirList.size() * 100)); resultPojo.setVehicleLengthRatio(Math.round(vehicleLengthRatio / dirList.size() * 100));
return resultPojo; return resultPojo;
} }
......
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