Jelajahi Sumber

代码修改

gao.qiang 9 bulan lalu
induk
melakukan
9957dd782e

+ 1 - 13
vehicle-sdk/src/main/java/com/ozs/controller/upload/GeoHazardMonitorTokenController.java

@@ -356,20 +356,8 @@ public class GeoHazardMonitorTokenController {
                 log.info("->>>>>>>>>>>>>>>>>>>>>>>>>>>>" + result);
                 log.info("result:{}", result);
                 if (!ObjectUtils.isEmpty(baseCameraManagementList)) {
-                    int minDifference = Integer.MAX_VALUE;
-                    String code = null;
-                    for (BaseCameraManagement baseCameraManagement : baseCameraManagementList) {
-                        int difference = Math.abs(baseCameraManagement.getInstallMile() - reqMsgAlarmVo.getAlarmMile());
-                        if (difference < minDifference) {
-                            minDifference = difference;
-                            code = baseCameraManagement.getCameraCode();
-                        }
-                    }
-                    List<SysDictData> frontValue = dictTypeService.selectDictDataByType("alarm_play_time_front_value");
-                    List<SysDictData> laterValue = dictTypeService.selectDictDataByType("alarm_play_time_later_value");
-                    String finalCode = code;
                     CompletableFuture.runAsync(() -> {
-                        String records = CameraUtil.getPlayFlvRtsp(finalCode, baseCameraManagementList.get(0).getChannel(),true);
+                        String records = CameraUtil.getPlayFlvRtsp(baseCameraManagementList.get(0).getCameraCode(), baseCameraManagementList.get(0).getChannel(),true);
                         log.info("-----records-----------" + records);
                         MsgAlarm alarm1 = msgAlarmService.getById(msgAlarm.getId());
                         alarm1.setReleasedUrl(records);