|
@@ -832,6 +832,7 @@ public class GeoHazardMonitorTokenController {
|
|
|
//排序
|
|
|
preAlarmList.sort(distanceComparator);
|
|
|
for (int i = 0; i < preAlarmList.size(); i++) {
|
|
|
+ PreAlarmListResponse preAlarmListResponse = new PreAlarmListResponse();
|
|
|
int mile=0;
|
|
|
LambdaQueryWrapper<BaseCameraManagement> wrapper1 = new LambdaQueryWrapper<BaseCameraManagement>();
|
|
|
if (heartbeatVo.getLineDir() == 1) {
|
|
@@ -869,11 +870,8 @@ public class GeoHazardMonitorTokenController {
|
|
|
log.info("------------graphicsCard-------" + graphicsCard);
|
|
|
}
|
|
|
//添加预警信息
|
|
|
- PreAlarmListResponse preAlarmListResponse = new PreAlarmListResponse();
|
|
|
- BeanUtils.copyProperties(preAlarmList.get(i), preAlarmListResponse);
|
|
|
preAlarmListResponse.setCameraCode(baseCameraManagement.getCameraCode());
|
|
|
preAlarmListResponse.setCameraStream(cameraUtil.heartbeatgetPlayFlv(baseCameraManagement.getCameraCode(), baseCameraManagement.getGraphicsCard(), type));
|
|
|
- responseList.add(preAlarmListResponse);
|
|
|
}
|
|
|
if (i == 0) {
|
|
|
playFlv1 =cameraUtil.heartbeatgetPlayFlv(code, graphicsCard, type);
|
|
@@ -891,14 +889,16 @@ public class GeoHazardMonitorTokenController {
|
|
|
List<CameraVos> cameraVosList = new ArrayList<>();
|
|
|
cameraVosList.add(cameraVos);
|
|
|
respHeartbeatVo.setCameraList(cameraVosList);
|
|
|
- respHeartbeatVo.setIsAlarm(2);
|
|
|
+ respHeartbeatVo.setIsAlarm(1);
|
|
|
twoMap.put("currentStream", playFlv1);
|
|
|
twoMap.put("cameraCode", baseCameraManagementList.get(0).getCameraCode());
|
|
|
}
|
|
|
}else {
|
|
|
- AjaxResults1 = new AjaxResults(0, "前方没有摄像机",respHeartbeatVo);
|
|
|
- return SM4Utils.encryptData_ECB(JSONObject.toJSONString(AjaxResults1), key);
|
|
|
+ preAlarmListResponse.setCameraCode("");
|
|
|
+ preAlarmListResponse.setCameraStream("");
|
|
|
}
|
|
|
+ BeanUtils.copyProperties(preAlarmList.get(i), preAlarmListResponse);
|
|
|
+ responseList.add(preAlarmListResponse);
|
|
|
}
|
|
|
respHeartbeatVo.setPreAlarmList(responseList);
|
|
|
} else {
|
|
@@ -1022,6 +1022,7 @@ public class GeoHazardMonitorTokenController {
|
|
|
//排序
|
|
|
preAlarmList.sort(distanceComparator);
|
|
|
for (int i = 0; i < preAlarmList.size(); i++) {
|
|
|
+ PreAlarmListResponse preAlarmListResponse = new PreAlarmListResponse();
|
|
|
int mile=0;
|
|
|
LambdaQueryWrapper<BaseCameraManagement> wrapper1 = new LambdaQueryWrapper<BaseCameraManagement>();
|
|
|
if (heartbeatVo.getLineDir() == 1) {
|
|
@@ -1059,11 +1060,8 @@ public class GeoHazardMonitorTokenController {
|
|
|
log.info("------------graphicsCard-------" + graphicsCard);
|
|
|
}
|
|
|
//添加预警信息
|
|
|
- PreAlarmListResponse preAlarmListResponse = new PreAlarmListResponse();
|
|
|
- BeanUtils.copyProperties(preAlarmList.get(i), preAlarmListResponse);
|
|
|
preAlarmListResponse.setCameraCode(baseCameraManagement.getCameraCode());
|
|
|
preAlarmListResponse.setCameraStream(cameraUtil.heartbeatgetPlayFlv(baseCameraManagement.getCameraCode(), baseCameraManagement.getGraphicsCard(), type));
|
|
|
- responseList.add(preAlarmListResponse);
|
|
|
}
|
|
|
if (i == 0) {
|
|
|
playFlv1 =cameraUtil.heartbeatgetPlayFlv(code, graphicsCard, type);
|
|
@@ -1081,14 +1079,16 @@ public class GeoHazardMonitorTokenController {
|
|
|
List<CameraVos> cameraVosList = new ArrayList<>();
|
|
|
cameraVosList.add(cameraVos);
|
|
|
respHeartbeatVo.setCameraList(cameraVosList);
|
|
|
- respHeartbeatVo.setIsAlarm(2);
|
|
|
+ respHeartbeatVo.setIsAlarm(1);
|
|
|
twoMap.put("currentStream", playFlv1);
|
|
|
twoMap.put("cameraCode", baseCameraManagementList.get(0).getCameraCode());
|
|
|
}
|
|
|
}else {
|
|
|
- AjaxResults1 = new AjaxResults(0, "前方没有摄像机",respHeartbeatVo);
|
|
|
- return SM4Utils.encryptData_ECB(JSONObject.toJSONString(AjaxResults1), key);
|
|
|
+ preAlarmListResponse.setCameraCode("");
|
|
|
+ preAlarmListResponse.setCameraStream("");
|
|
|
}
|
|
|
+ BeanUtils.copyProperties(preAlarmList.get(i), preAlarmListResponse);
|
|
|
+ responseList.add(preAlarmListResponse);
|
|
|
}
|
|
|
respHeartbeatVo.setPreAlarmList(responseList);
|
|
|
} else {
|