Browse Source

异物侵限报警修改

gao.qiang 1 tuần trước cách đây
mục cha
commit
6046f7a394

+ 5 - 0
hazard-sdk/src/main/java/com/ozs/controller/upload/GeoHazardMonitorTokenController.java

@@ -508,6 +508,7 @@ public class GeoHazardMonitorTokenController {
         String url = bakUrl + "/gb28181/api/invite?id=" + cameraCode + "&channel=" + channel + "&startTime=" + seconds + "&endTime=" + second;
         try {
             result = HttpClientUtil.get(url);
+            log.info("-----alarmHistoryPlay----code--"+cameraCode+"---" + result);
             if ("200".equals(result)) {
                 String path = apiSummary(cameraCode + "/" + channel + "/" + seconds + "-" + second);
                 if (org.apache.commons.lang3.StringUtils.isNotEmpty(path)) {
@@ -535,6 +536,7 @@ public class GeoHazardMonitorTokenController {
      * @return
      */
     public String apiSummary(String path) {
+        log.info("apiSummary--------path---------->" + path);
         int maxRetries = 5;
         int retryCount = 0;
         boolean success = false;
@@ -546,6 +548,7 @@ public class GeoHazardMonitorTokenController {
                 if (org.apache.commons.lang3.StringUtils.isNotEmpty(data)) {
                     JSONObject jsonObject = JSONObject.parseObject(data);
                     streamArray = jsonObject.getJSONArray("Streams");
+                    log.info("apiSummary--------streamArray---------->" + streamArray);
                     success = true;
                 }
             } catch (Exception e) {
@@ -558,9 +561,11 @@ public class GeoHazardMonitorTokenController {
             for (int i = 0; i < streamArray.size(); i++) {
                 JSONObject subObj = streamArray.getJSONObject(i);
                 String streamPath = subObj.getString("StreamPath");
+                log.info("apiSummary--------streamPath---------->" + streamPath);
                 if (streamPath.equals(path)) {
                     //取出VideoTracks
                     JSONArray videoJson = subObj.getJSONArray("VideoTracks");
+                    log.info("apiSummary--------videoJson---------->" + videoJson);
                     if (videoJson != null && !videoJson.isEmpty()) {
                         return wsUrl + "/ws/" + streamPath;
                     }