Przeglądaj źródła

相机树开发

gao.qiang 3 miesięcy temu
rodzic
commit
d898a8830f

+ 2 - 2
business-service/src/main/java/com/ozs/service/service/impl/MsgAlarmServiceImpl.java

@@ -249,7 +249,7 @@ public class MsgAlarmServiceImpl extends ServiceImpl<MsgAlarmMapper, MsgAlarm> i
             //找出所有报警数据 1=高铁的数量
             count = (int) list.stream()
                     .map(base -> baseCameraManagementMapper.selectOne(new LambdaQueryWrapper<BaseCameraManagement>()
-                            .eq(BaseCameraManagement::getCameraCode, base)))
+                            .eq(BaseCameraManagement::getCameraCode, base.getCameraCode())))
                     .filter(Objects::nonNull)  // 确保 management 不是 null
                     .map(management -> baseRailwayManagementMapper.selectOne(new LambdaQueryWrapper<BaseRailwayManagement>()
                             .eq(BaseRailwayManagement::getRailwayCode, management.getRailwayCode()))) // 确保管理信息不是空的
@@ -269,7 +269,7 @@ public class MsgAlarmServiceImpl extends ServiceImpl<MsgAlarmMapper, MsgAlarm> i
             //找出所有未解除报警数据 1=高铁的数量
             unresolvedCount = (int) alarmList.stream()
                     .map(base -> baseCameraManagementMapper.selectOne(new LambdaQueryWrapper<BaseCameraManagement>()
-                            .eq(BaseCameraManagement::getCameraCode, base)))
+                            .eq(BaseCameraManagement::getCameraCode, base.getCameraCode())))
                     .filter(Objects::nonNull)
                     .map(management -> baseRailwayManagementMapper.selectOne(new LambdaQueryWrapper<BaseRailwayManagement>()
                             .eq(BaseRailwayManagement::getRailwayCode, management.getRailwayCode()))) // 确保管理信息不是空的