Commit a654e96b authored by hanbing's avatar hanbing

[update] 诊断优化,提示缺少路口实时数据

parent b9153f7c
......@@ -382,6 +382,9 @@ public class CrossConfigServiceImpl implements CrossConfigService {
// 查询拥堵状态、排队长度和指数
CrossDirDataRealtimePO crossDirDataRealtimePO =
crossDirDataRealtimeMapper.selectByCrossIdAndDirType(crossId, key);
if (crossDirDataRealtimePO == null) {
throw new RuntimeException("没有该路口方向实时数据");
}
dirListElement.setStatus(crossDirDataRealtimePO.getStatus());
dirListElement.setTraffic_index(crossDirDataRealtimePO.getTrafficIndex());
dirListElement.setLength(crossDirDataRealtimePO.getLength());
......
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