Explorar o código

报警回放代码修改

gao.qiang hai 9 meses
pai
achega
943a68ee39

+ 2 - 2
business-service/src/main/java/com/ozs/utils/CameraUtil.java

@@ -1647,13 +1647,13 @@ ffmpeg -i "concat:1.ts|2.ts" -c copy output.mp4
      *
      * @param baseCameraManagement
      */
-    public String getQueryRecords(String streamPath, String date, String type, String time) {
+    public String getQueryRecords(String streamPath, String date, String type, String start,String end) {
 
         log.info("-----getQueryRecords------streamPath-----" + streamPath);
         log.info("-----getQueryRecords-------date----" + date);
         log.info("-----getQueryRecords-------type----" + type);
         try {
-            TimeUnit.SECONDS.sleep(120 * Integer.parseInt(time));
+            TimeUnit.SECONDS.sleep(30 * Integer.parseInt(start)*Integer.parseInt(end));
         } catch (InterruptedException e) {
             e.printStackTrace();
         }

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

@@ -397,7 +397,7 @@ public class GeoHazardMonitorTokenController {
                         // 使用SimpleDateFormat将Date对象格式化为指定样式的字符串
                         String formattedDate = sdf.format(msgAlarmVice.getAlarmTime());
                         log.info("-----formattedDate-----------" + formattedDate);
-                        String records = cameraUtil.getQueryRecords(finalCode + "/playback", formattedDate,"mp4",laterValue.get(0).getDictValue());
+                        String records = cameraUtil.getQueryRecords(finalCode + "/playback", formattedDate,"mp4",laterValue.get(0).getDictValue(),frontValue.get(0).getDictValue());
                         log.info("-----records-----------" + records);
                         MsgAlarm alarm1 = msgAlarmService.getById(msgAlarm.getId());
                         alarm1.setReleasedUrl(records);