|
@@ -807,6 +807,7 @@ public class GeoHazardMonitorTokenController {
|
|
//排序
|
|
//排序
|
|
preAlarmList.sort(distanceComparator);
|
|
preAlarmList.sort(distanceComparator);
|
|
for (int i = 0; i < preAlarmList.size(); i++) {
|
|
for (int i = 0; i < preAlarmList.size(); i++) {
|
|
|
|
+ PreAlarmListResponse preAlarmListResponse = new PreAlarmListResponse();
|
|
int mile=0;
|
|
int mile=0;
|
|
LambdaQueryWrapper<BaseCameraManagement> wrapper1 = new LambdaQueryWrapper<BaseCameraManagement>();
|
|
LambdaQueryWrapper<BaseCameraManagement> wrapper1 = new LambdaQueryWrapper<BaseCameraManagement>();
|
|
if (heartbeatVo.getLineDir() == 1) {
|
|
if (heartbeatVo.getLineDir() == 1) {
|
|
@@ -844,11 +845,8 @@ public class GeoHazardMonitorTokenController {
|
|
log.info("------------channel-------" + channel);
|
|
log.info("------------channel-------" + channel);
|
|
}
|
|
}
|
|
//添加预警信息
|
|
//添加预警信息
|
|
- PreAlarmListResponse preAlarmListResponse = new PreAlarmListResponse();
|
|
|
|
- BeanUtils.copyProperties(preAlarmList.get(i), preAlarmListResponse);
|
|
|
|
preAlarmListResponse.setCameraCode(baseCameraManagement.getCameraCode());
|
|
preAlarmListResponse.setCameraCode(baseCameraManagement.getCameraCode());
|
|
preAlarmListResponse.setCameraStream(CameraUtil.getPlayFlvRtsp(baseCameraManagement.getCameraCode(), baseCameraManagement.getChannel(), type));
|
|
preAlarmListResponse.setCameraStream(CameraUtil.getPlayFlvRtsp(baseCameraManagement.getCameraCode(), baseCameraManagement.getChannel(), type));
|
|
- responseList.add(preAlarmListResponse);
|
|
|
|
}
|
|
}
|
|
if (i == 0) {
|
|
if (i == 0) {
|
|
playFlv1 = CameraUtil.getPlayFlvRtsp(code, channel, type);
|
|
playFlv1 = CameraUtil.getPlayFlvRtsp(code, channel, type);
|
|
@@ -870,7 +868,12 @@ public class GeoHazardMonitorTokenController {
|
|
twoMap.put("currentStream", playFlv1);
|
|
twoMap.put("currentStream", playFlv1);
|
|
twoMap.put("cameraCode", baseCameraManagementList.get(0).getCameraCode());
|
|
twoMap.put("cameraCode", baseCameraManagementList.get(0).getCameraCode());
|
|
}
|
|
}
|
|
|
|
+ }else {
|
|
|
|
+ preAlarmListResponse.setCameraCode("");
|
|
|
|
+ preAlarmListResponse.setCameraStream("");
|
|
}
|
|
}
|
|
|
|
+ BeanUtils.copyProperties(preAlarmList.get(i), preAlarmListResponse);
|
|
|
|
+ responseList.add(preAlarmListResponse);
|
|
}
|
|
}
|
|
respHeartbeatVo.setPreAlarmList(responseList);
|
|
respHeartbeatVo.setPreAlarmList(responseList);
|
|
} else {
|
|
} else {
|
|
@@ -991,6 +994,7 @@ public class GeoHazardMonitorTokenController {
|
|
//排序
|
|
//排序
|
|
preAlarmList.sort(distanceComparator);
|
|
preAlarmList.sort(distanceComparator);
|
|
for (int i = 0; i < preAlarmList.size(); i++) {
|
|
for (int i = 0; i < preAlarmList.size(); i++) {
|
|
|
|
+ PreAlarmListResponse preAlarmListResponse = new PreAlarmListResponse();
|
|
int mile=0;
|
|
int mile=0;
|
|
LambdaQueryWrapper<BaseCameraManagement> wrapper1 = new LambdaQueryWrapper<BaseCameraManagement>();
|
|
LambdaQueryWrapper<BaseCameraManagement> wrapper1 = new LambdaQueryWrapper<BaseCameraManagement>();
|
|
if (heartbeatVo.getLineDir() == 1) {
|
|
if (heartbeatVo.getLineDir() == 1) {
|
|
@@ -1028,11 +1032,8 @@ public class GeoHazardMonitorTokenController {
|
|
log.info("------------channel-------" + channel);
|
|
log.info("------------channel-------" + channel);
|
|
}
|
|
}
|
|
//添加预警信息
|
|
//添加预警信息
|
|
- PreAlarmListResponse preAlarmListResponse = new PreAlarmListResponse();
|
|
|
|
- BeanUtils.copyProperties(preAlarmList.get(i), preAlarmListResponse);
|
|
|
|
preAlarmListResponse.setCameraCode(baseCameraManagement.getCameraCode());
|
|
preAlarmListResponse.setCameraCode(baseCameraManagement.getCameraCode());
|
|
preAlarmListResponse.setCameraStream(CameraUtil.getPlayFlvRtsp(baseCameraManagement.getCameraCode(), baseCameraManagement.getChannel(), type));
|
|
preAlarmListResponse.setCameraStream(CameraUtil.getPlayFlvRtsp(baseCameraManagement.getCameraCode(), baseCameraManagement.getChannel(), type));
|
|
- responseList.add(preAlarmListResponse);
|
|
|
|
}
|
|
}
|
|
if (i == 0) {
|
|
if (i == 0) {
|
|
playFlv1 = CameraUtil.getPlayFlvRtsp(code, channel, type);
|
|
playFlv1 = CameraUtil.getPlayFlvRtsp(code, channel, type);
|
|
@@ -1054,7 +1055,12 @@ public class GeoHazardMonitorTokenController {
|
|
twoMap.put("currentStream", playFlv1);
|
|
twoMap.put("currentStream", playFlv1);
|
|
twoMap.put("cameraCode", baseCameraManagementList.get(0).getCameraCode());
|
|
twoMap.put("cameraCode", baseCameraManagementList.get(0).getCameraCode());
|
|
}
|
|
}
|
|
|
|
+ }else {
|
|
|
|
+ preAlarmListResponse.setCameraCode("");
|
|
|
|
+ preAlarmListResponse.setCameraStream("");
|
|
}
|
|
}
|
|
|
|
+ BeanUtils.copyProperties(preAlarmList.get(i), preAlarmListResponse);
|
|
|
|
+ responseList.add(preAlarmListResponse);
|
|
}
|
|
}
|
|
respHeartbeatVo.setPreAlarmList(responseList);
|
|
respHeartbeatVo.setPreAlarmList(responseList);
|
|
} else {
|
|
} else {
|