Commit afb55782 authored by hanbing's avatar hanbing

[update] 路口车道信息没有实时数据时返回空

parent dce4153b
...@@ -106,29 +106,6 @@ ...@@ -106,29 +106,6 @@
<version>${mybatis-plus-version}</version> <version>${mybatis-plus-version}</version>
</dependency> </dependency>
<!-- MP相关 end --> <!-- MP相关 end -->
<!-- <dependency>-->
<!-- <groupId>com.alibaba.cloud</groupId>-->
<!-- <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>-->
<!-- <version>2021.0.1.0</version>-->
<!-- <exclusions>-->
<!-- <exclusion>-->
<!-- <groupId>com.alibaba.nacos</groupId>-->
<!-- <artifactId>nacos-client</artifactId>-->
<!-- </exclusion>-->
<!-- </exclusions>-->
<!-- </dependency>-->
<!-- &lt;!&ndash;nacos客户端依赖&ndash;&gt;-->
<!-- <dependency>-->
<!-- <groupId>com.xkcoding.nacos</groupId>-->
<!-- <artifactId>nacos-client</artifactId>-->
<!-- <version>1.1.4</version>-->
<!-- </dependency>-->
<!-- &lt;!&ndash;spring boot 集成 nacos 配置中心&ndash;&gt;-->
<!-- <dependency>-->
<!-- <groupId>com.alibaba.boot</groupId>-->
<!-- <artifactId>nacos-config-spring-boot-starter</artifactId>-->
<!-- <version>0.2.1</version>-->
<!-- </dependency>-->
<dependency> <dependency>
<groupId>org.hibernate</groupId> <groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId> <artifactId>hibernate-validator</artifactId>
......
...@@ -467,8 +467,6 @@ public class DiagnoServiceImpl implements DiagnoService { ...@@ -467,8 +467,6 @@ public class DiagnoServiceImpl implements DiagnoService {
} }
ledConfigList.add(ledConfigListElement); ledConfigList.add(ledConfigListElement);
} }
// 根据灯组序号排序
// ledConfigList.sort(Comparator.comparing(LedConfigListElement::getOrder));
Collections.sort(ledConfigList, Comparator.comparingInt(led -> Integer.valueOf(led.getCode()))); Collections.sort(ledConfigList, Comparator.comparingInt(led -> Integer.valueOf(led.getCode())));
} }
...@@ -490,13 +488,12 @@ public class DiagnoServiceImpl implements DiagnoService { ...@@ -490,13 +488,12 @@ public class DiagnoServiceImpl implements DiagnoService {
// 查询拥堵状态、排队长度和指数 // 查询拥堵状态、排队长度和指数
CrossDirDataRealtimePO crossDirDataRealtimePO = CrossDirDataRealtimePO crossDirDataRealtimePO =
crossDirDataRealtimeMapper.selectByCrossIdAndDirType(crossId, key); crossDirDataRealtimeMapper.selectByCrossIdAndDirType(crossId, key);
if (crossDirDataRealtimePO == null) { if (crossDirDataRealtimePO != null) {
throw new RuntimeException("没有该路口方向实时数据"); dirListElement.setStatus(crossDirDataRealtimePO.getStatus());
dirListElement.setTraffic_index(crossDirDataRealtimePO.getTrafficIndex());
dirListElement.setLength(crossDirDataRealtimePO.getLength());
dirListElement.setDuration(crossDirDataRealtimePO.getDuration());
} }
dirListElement.setStatus(crossDirDataRealtimePO.getStatus());
dirListElement.setTraffic_index(crossDirDataRealtimePO.getTrafficIndex());
dirListElement.setLength(crossDirDataRealtimePO.getLength());
dirListElement.setDuration(crossDirDataRealtimePO.getDuration());
// 获取是否有行人道 // 获取是否有行人道
BaseCrossDirInfoPO baseCrossDirInfoPO = baseCrossDirInfoMapper.selectByCrossIdAndDirType(crossId, key); BaseCrossDirInfoPO baseCrossDirInfoPO = baseCrossDirInfoMapper.selectByCrossIdAndDirType(crossId, key);
Integer isPedestrian = baseCrossDirInfoPO.getIsPedestrian(); Integer isPedestrian = baseCrossDirInfoPO.getIsPedestrian();
......
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