|
@@ -664,7 +664,7 @@ public class GeoHazardMonitorTokenController {
|
|
|
if (!codeList.contains(baseCameraManagementList.get(0).getCameraCode())) {
|
|
|
//如果不包含此相机编码
|
|
|
for (TerminalHeartbeatLog terminalHeartbeatLog : heartbeatLogList) {
|
|
|
- log.info("-----11111----" );
|
|
|
+ log.info("-----11111----");
|
|
|
cameraUtil.stopStream(terminalHeartbeatLog.getCameraCode(), terminalHeartbeatLog.getChannel());
|
|
|
}
|
|
|
}
|
|
@@ -741,7 +741,7 @@ public class GeoHazardMonitorTokenController {
|
|
|
if (!codeList.contains(baseList.get(o).getCameraCode())) {
|
|
|
//如果不包含此相机编码
|
|
|
for (TerminalHeartbeatLog terminalHeartbeatLog : heartbeatLogList) {
|
|
|
- log.info("-----22222----" );
|
|
|
+ log.info("-----22222----");
|
|
|
cameraUtil.stopStream(terminalHeartbeatLog.getCameraCode(), terminalHeartbeatLog.getChannel());
|
|
|
}
|
|
|
}
|
|
@@ -803,7 +803,7 @@ public class GeoHazardMonitorTokenController {
|
|
|
if (!codeList.contains(baseCameraManagement.getCameraCode())) {
|
|
|
//如果不包含此相机编码
|
|
|
for (TerminalHeartbeatLog terminalHeartbeatLog : heartbeatLogList) {
|
|
|
- log.info("-----3333333----" );
|
|
|
+ log.info("-----3333333----");
|
|
|
cameraUtil.stopStream(terminalHeartbeatLog.getCameraCode(), terminalHeartbeatLog.getChannel());
|
|
|
}
|
|
|
}
|
|
@@ -846,46 +846,48 @@ public class GeoHazardMonitorTokenController {
|
|
|
log.info("--------------->>已进入拉四路视频");
|
|
|
for (BaseCameraManagement baseCameraManagement : list1) {
|
|
|
boolean finalType = type;
|
|
|
- List<String> finalCodeList4 = codeList;
|
|
|
CompletableFuture.runAsync(() -> {
|
|
|
cameraUtil.heartbeatgetUrl(baseCameraManagement.getCameraCode(), baseCameraManagement.getChannel(), finalType);
|
|
|
- //判断心跳相机日志表后两条数据是否包含该相机编码
|
|
|
- if (!ObjectUtils.isEmpty(finalCodeList4)) {
|
|
|
- if (!finalCodeList4.contains(baseCameraManagement.getCameraCode())) {
|
|
|
- //如果不包含此相机编码
|
|
|
- for (TerminalHeartbeatLog terminalHeartbeatLog : heartbeatLogList) {
|
|
|
- log.info("-----44444444----" );
|
|
|
- cameraUtil.stopStream(terminalHeartbeatLog.getCameraCode(), terminalHeartbeatLog.getChannel());
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
});
|
|
|
//添加心跳相机日志信息
|
|
|
int add3 = terminalHeartbeatLogService.add(baseCameraManagement.getCameraCode(), baseCameraManagement.getChannel());
|
|
|
log.info("-----add3----" + add3);
|
|
|
}
|
|
|
+ List<String> finalCodeList4 = codeList;
|
|
|
+ CompletableFuture.runAsync(() -> {
|
|
|
+ //判断心跳相机日志表后两条数据是否包含该相机编码
|
|
|
+ if (!ObjectUtils.isEmpty(finalCodeList4)) {
|
|
|
+ if (!finalCodeList4.contains(list1.get(0).getCameraCode())) {
|
|
|
+ //如果不包含此相机编码
|
|
|
+ for (TerminalHeartbeatLog terminalHeartbeatLog : heartbeatLogList) {
|
|
|
+ log.info("-----44444444----");
|
|
|
+ cameraUtil.stopStream(terminalHeartbeatLog.getCameraCode(), terminalHeartbeatLog.getChannel());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
} else {
|
|
|
log.info("-------------->>已进入拉三路路视频");
|
|
|
log.info("list1-------------->>" + list1.size());
|
|
|
for (int i = 1; i < list1.size(); i++) {
|
|
|
cameraUtil.heartbeatgetUrl(list1.get(i).getCameraCode(), list1.get(i).getChannel(), type);
|
|
|
- log.info("-------------->>finalCodeList5-------"+ codeList);
|
|
|
- if (!ObjectUtils.isEmpty(codeList)) {
|
|
|
- //判断心跳相机日志表后两条数据是否包含该相机编码
|
|
|
- log.info("-------------->>baseCameraManagement.getCameraCode()-------"+list1.get(i).getCameraCode());
|
|
|
- if (!codeList.contains(list1.get(i).getCameraCode())) {
|
|
|
- //如果不包含此相机编码
|
|
|
- log.info("-------------->>heartbeatLogList-------"+heartbeatLogList);
|
|
|
- for (TerminalHeartbeatLog terminalHeartbeatLog : heartbeatLogList) {
|
|
|
- log.info("-----5555555----" );
|
|
|
- cameraUtil.stopStream(terminalHeartbeatLog.getCameraCode(), terminalHeartbeatLog.getChannel());
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- //添加心跳相机日志信息
|
|
|
+ //添加心跳相机日志信息
|
|
|
int add4 = terminalHeartbeatLogService.add(list1.get(i).getCameraCode(), list1.get(i).getChannel());
|
|
|
log.info("-----add4----" + add4);
|
|
|
}
|
|
|
+ log.info("-------------->>finalCodeList5-------" + codeList);
|
|
|
+ if (!ObjectUtils.isEmpty(codeList)) {
|
|
|
+ //判断心跳相机日志表后两条数据是否包含该相机编码
|
|
|
+ log.info("-------------->>baseCameraManagement.getCameraCode()-------" + list1.get(0).getCameraCode());
|
|
|
+ if (!codeList.contains(list1.get(0).getCameraCode())) {
|
|
|
+ //如果不包含此相机编码
|
|
|
+ log.info("-------------->>heartbeatLogList-------" + heartbeatLogList);
|
|
|
+ for (TerminalHeartbeatLog terminalHeartbeatLog : heartbeatLogList) {
|
|
|
+ log.info("-----5555555----");
|
|
|
+ cameraUtil.stopStream(terminalHeartbeatLog.getCameraCode(), terminalHeartbeatLog.getChannel());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
twoMap.put("currentStream", playFlv);
|
|
|
twoMap.put("cameraCode", list1.get(0).getCameraCode());
|
|
@@ -929,49 +931,52 @@ public class GeoHazardMonitorTokenController {
|
|
|
if (StringUtils.isEmpty(playFlv)) {
|
|
|
log.info("--------------->>已进入拉四路视频");
|
|
|
for (BaseCameraManagement baseCameraManagement : list1) {
|
|
|
- List<String> finalCodeList2 = codeList;
|
|
|
boolean finalType2 = type;
|
|
|
CompletableFuture.runAsync(() -> {
|
|
|
cameraUtil.heartbeatgetUrl(baseCameraManagement.getCameraCode(), baseCameraManagement.getChannel(), finalType2);
|
|
|
- log.info("-------------->>finalCodeList2-------"+ finalCodeList2);
|
|
|
- if (!ObjectUtils.isEmpty(finalCodeList2)) {
|
|
|
- //判断心跳相机日志表后两条数据是否包含该相机编码
|
|
|
- if (!finalCodeList2.contains(baseCameraManagement.getCameraCode())) {
|
|
|
- //如果不包含此相机编码
|
|
|
- for (TerminalHeartbeatLog terminalHeartbeatLog : heartbeatLogList) {
|
|
|
- log.info("-----6666666----" );
|
|
|
- cameraUtil.stopStream(terminalHeartbeatLog.getCameraCode(), terminalHeartbeatLog.getChannel());
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
//添加心跳相机日志信息
|
|
|
});
|
|
|
int add5 = terminalHeartbeatLogService.add(baseCameraManagement.getCameraCode(), baseCameraManagement.getChannel());
|
|
|
log.info("-----add5----" + add5);
|
|
|
}
|
|
|
+ List<String> finalCodeList2 = codeList;
|
|
|
+ CompletableFuture.runAsync(() -> {
|
|
|
+ log.info("-------------->>finalCodeList2-------" + finalCodeList2);
|
|
|
+ if (!ObjectUtils.isEmpty(finalCodeList2)) {
|
|
|
+ //判断心跳相机日志表后两条数据是否包含该相机编码
|
|
|
+ if (!finalCodeList2.contains(list1.get(0).getCameraCode())) {
|
|
|
+ //如果不包含此相机编码
|
|
|
+ for (TerminalHeartbeatLog terminalHeartbeatLog : heartbeatLogList) {
|
|
|
+ log.info("-----6666666----");
|
|
|
+ cameraUtil.stopStream(terminalHeartbeatLog.getCameraCode(), terminalHeartbeatLog.getChannel());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
} else {
|
|
|
log.info("-------------->>已进入拉三路路视频");
|
|
|
log.info("list1-------------->>" + list1.size());
|
|
|
for (int i = 1; i < list1.size(); i++) {
|
|
|
boolean finalType3 = type;
|
|
|
cameraUtil.heartbeatgetUrl(list1.get(i).getCameraCode(), list1.get(i).getChannel(), finalType3);
|
|
|
- log.info("-------------->>codeList-------"+ codeList);
|
|
|
- if (!ObjectUtils.isEmpty(codeList)) {
|
|
|
- //判断心跳相机日志表后两条数据是否包含该相机编码
|
|
|
- log.info("-------------->>baseCameraManagement.getCameraCode()-------"+ list1.get(i).getCameraCode());
|
|
|
- if (!codeList.contains(list1.get(i).getCameraCode())) {
|
|
|
- //如果不包含此相机编码
|
|
|
- log.info("-------------->>heartbeatLogList-------"+ heartbeatLogList);
|
|
|
- for (TerminalHeartbeatLog terminalHeartbeatLog : heartbeatLogList) {
|
|
|
- log.info("-----77777----" );
|
|
|
- cameraUtil.stopStream(terminalHeartbeatLog.getCameraCode(), terminalHeartbeatLog.getChannel());
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- //添加心跳相机日志信息
|
|
|
+ //添加心跳相机日志信息
|
|
|
int add6 = terminalHeartbeatLogService.add(list1.get(i).getCameraCode(), list1.get(i).getChannel());
|
|
|
log.info("-----add6----" + add6);
|
|
|
}
|
|
|
+ log.info("-------------->>codeList-------" + codeList);
|
|
|
+ if (!ObjectUtils.isEmpty(codeList)) {
|
|
|
+ //判断心跳相机日志表后两条数据是否包含该相机编码
|
|
|
+ log.info("-------------->>baseCameraManagement.getCameraCode()-------" + list1.get(0).getCameraCode());
|
|
|
+ if (!codeList.contains(list1.get(0).getCameraCode())) {
|
|
|
+ //如果不包含此相机编码
|
|
|
+ log.info("-------------->>heartbeatLogList-------" + heartbeatLogList);
|
|
|
+ for (TerminalHeartbeatLog terminalHeartbeatLog : heartbeatLogList) {
|
|
|
+ log.info("-----77777----");
|
|
|
+ cameraUtil.stopStream(terminalHeartbeatLog.getCameraCode(), terminalHeartbeatLog.getChannel());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
twoMap.put("currentStream", playFlv);
|
|
|
twoMap.put("cameraCode", list1.get(0).getCameraCode());
|
|
@@ -987,7 +992,7 @@ public class GeoHazardMonitorTokenController {
|
|
|
if (StringUtils.isNotEmpty(respHeartbeatVo.getCurrentStream())) {
|
|
|
jsonObject.put("resultCode", 1);
|
|
|
jsonObject.put("message", "ok");
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
jsonObject.put("resultCode", 0);
|
|
|
jsonObject.put("message", "该相机暂无视频");
|
|
|
}
|