Jelajahi Sumber

首页增加相机状态

gao.qiang 9 bulan lalu
induk
melakukan
e93d7ff60a

+ 4 - 4
hazard-admin/src/main/java/com/ozs/web/controller/shotschedule/ShotPictureTaskExecutors.java

@@ -96,8 +96,8 @@ public class ShotPictureTaskExecutors {
     /**
      * 处理非预警摄像头截图, 间隔: 60s
      */
-    @Async
-    @Scheduled(fixedDelay = 60 * 1000, initialDelay = 3 * 1000)
+//    @Async
+//    @Scheduled(fixedDelay = 60 * 1000, initialDelay = 3 * 1000)
     public synchronized void initCameraConfig() {
         if (!isMaster) return;
         // 获取分布式锁
@@ -164,7 +164,7 @@ public class ShotPictureTaskExecutors {
     /**
      * 处理预警摄像头截图, 间隔: 5s
      */
-    @Scheduled(fixedDelay = 5 * 1000, initialDelay = 10 * 1000)
+//    @Scheduled(fixedDelay = 5 * 1000, initialDelay = 10 * 1000)
     public void batchProcess() {
         if (!isMaster) return;
         // 填充默认路径
@@ -224,7 +224,7 @@ public class ShotPictureTaskExecutors {
     /**
      * 处理预警摄像头截图, 间隔: 1s
      */
-    @Scheduled(fixedDelay = 1 * 1000, initialDelay = 10 * 1000)
+//    @Scheduled(fixedDelay = 1 * 1000, initialDelay = 10 * 1000)
     public void batchAlarmProcess() {
         if (!isMaster) return;
         // 填充默认路径

+ 8 - 4
hazard-sdk/src/main/java/com/ozs/controller/upload/GeoHazardMonitorTokenController.java

@@ -34,10 +34,7 @@ import org.springframework.beans.factory.annotation.Value;
 import org.springframework.data.redis.core.SetOperations;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.ObjectUtils;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
@@ -290,6 +287,13 @@ public class GeoHazardMonitorTokenController {
         return SM4Utils.encryptData_ECB(s1, "4370780c9a8c43e5");
     }
 
+    @GetMapping("/test")
+    public void test() {
+        String alarmUrl = alarmHistoryPlay("34020000001320507005", "34020000001320507005",new Date());
+        log.info(alarmUrl);
+    }
+
+
     /**
      * 设备状态数据传输
      *