|
@@ -1466,18 +1466,14 @@ public class GeoHazardMonitorTokenController {
|
|
}
|
|
}
|
|
baseVideoTrainsService.save(baseVideoTrains);
|
|
baseVideoTrainsService.save(baseVideoTrains);
|
|
log.info("---------data---结果-------" + respHeartbeatVo);
|
|
log.info("---------data---结果-------" + respHeartbeatVo);
|
|
- if (ObjectUtils.isEmpty(respHeartbeatVo.getPreAlarmList())) {
|
|
|
|
- if (!ObjectUtils.isEmpty(respHeartbeatVo.getCameraList())) {
|
|
|
|
- if (respHeartbeatVo.getCameraList().get(0).getCameraCode().equals("")) {
|
|
|
|
- AjaxResults1 = new AjaxResults(1, "该里程无摄像机", respHeartbeatVo);
|
|
|
|
- }else {
|
|
|
|
- AjaxResults1 = new AjaxResults(1, "ok", respHeartbeatVo);
|
|
|
|
- }
|
|
|
|
|
|
+ if (!ObjectUtils.isEmpty(respHeartbeatVo.getCameraList())) {
|
|
|
|
+ if (respHeartbeatVo.getCameraList().get(0).getCameraCode().equals("")) {
|
|
|
|
+ AjaxResults1 = new AjaxResults(1, "该里程无摄像机", respHeartbeatVo);
|
|
} else {
|
|
} else {
|
|
- AjaxResults1 = new AjaxResults(0, "视频加载中", respHeartbeatVo);
|
|
|
|
|
|
+ AjaxResults1 = new AjaxResults(1, "ok", respHeartbeatVo);
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- AjaxResults1 = new AjaxResults(1, "ok", respHeartbeatVo);
|
|
|
|
|
|
+ AjaxResults1 = new AjaxResults(0, "视频加载中", respHeartbeatVo);
|
|
}
|
|
}
|
|
long end = System.currentTimeMillis();
|
|
long end = System.currentTimeMillis();
|
|
log.info("结束心跳时间: " + sdf.format(new Date(end)));
|
|
log.info("结束心跳时间: " + sdf.format(new Date(end)));
|
|
@@ -2205,21 +2201,8 @@ public class GeoHazardMonitorTokenController {
|
|
*
|
|
*
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- @PostMapping("/api/ttt")
|
|
|
|
|
|
+ @GetMapping("/api/ttt")
|
|
public void ttt() {
|
|
public void ttt() {
|
|
- String urLs = cameraUtil.playbackURLs("12a38b545afb4e3cb22f962ceac914cf", "5", "5");
|
|
|
|
-// if (urLs.contains("无视频")) {
|
|
|
|
-// return urLs;
|
|
|
|
-// }
|
|
|
|
- String playback = CameraUtil.startRecording("12a38b545afb4e3cb22f962ceac914cf", "playback");
|
|
|
|
-// if (!"ok".equals(playback)){
|
|
|
|
-// return "暂无视频-" + finalCode;
|
|
|
|
-// }
|
|
|
|
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
- // 使用SimpleDateFormat将Date对象格式化为指定样式的字符串
|
|
|
|
- String formattedDate = sdf.format(new Date());
|
|
|
|
- log.info("-----formattedDate-----------" + formattedDate);
|
|
|
|
- String records = cameraUtil.getQueryRecords("12a38b545afb4e3cb22f962ceac914cf" + "/playback", formattedDate);
|
|
|
|
- log.info("-----records-----------" + records);
|
|
|
|
|
|
+ String cameraPreviewURL = cameraUtil.getCameraPreviewURL();
|
|
}
|
|
}
|
|
}
|
|
}
|