|
@@ -33,6 +33,7 @@ import com.ozs.entity.SkynetHeartbeatLog;
|
|
|
import com.ozs.entity.SvcAddress;
|
|
|
import com.ozs.entity.TerminalIgnoreAlarm;
|
|
|
import com.ozs.entity.VehiclePosition;
|
|
|
+import com.ozs.entity.response.BaseCameraManagementReq;
|
|
|
import com.ozs.entity.response.PreAlarmListResponse;
|
|
|
import com.ozs.entity.response.PreAlarmResponse;
|
|
|
import com.ozs.entity.response.VehicleVedioResponse;
|
|
@@ -1230,26 +1231,19 @@ public class GeoHazardMonitorTokenController {
|
|
|
}
|
|
|
} else {
|
|
|
//没有报警信息的时候
|
|
|
- LambdaQueryWrapper<BaseCameraManagement> base = new LambdaQueryWrapper<>();
|
|
|
+ BaseCameraManagementReq baseCameraManagementReq=new BaseCameraManagementReq();
|
|
|
if (heartbeatVo.getLineDir() == 1) {
|
|
|
distance = heartbeatVo.getVisualDistance() + heartbeatVo.getCurrentMile();
|
|
|
- base.ge(BaseCameraManagement::getInstallMile, distance);
|
|
|
- base.in(BaseCameraManagement::getMonitoringDirection, 1, 3);
|
|
|
- base.orderByAsc(BaseCameraManagement::getGrou).orderByAsc(BaseCameraManagement::getSort);
|
|
|
- base.le(BaseCameraManagement::getInstallMile, (heartbeatVo.getCurrentMile() + 10000));
|
|
|
+ baseCameraManagementReq.setInstallMile(heartbeatVo.getCurrentMile() + 10000);
|
|
|
}
|
|
|
if (heartbeatVo.getLineDir() == 2) {
|
|
|
distance = heartbeatVo.getCurrentMile() - heartbeatVo.getVisualDistance();
|
|
|
- base.le(BaseCameraManagement::getInstallMile, distance);
|
|
|
- base.ge(BaseCameraManagement::getInstallMile, (heartbeatVo.getCurrentMile() - 10000));
|
|
|
- base.in(BaseCameraManagement::getMonitoringDirection, 2, 3);
|
|
|
- base.orderByDesc(BaseCameraManagement::getGrou).orderByDesc(BaseCameraManagement::getSort);
|
|
|
+ baseCameraManagementReq.setInstallMile(heartbeatVo.getCurrentMile() - 10000);
|
|
|
}
|
|
|
- base.eq(BaseCameraManagement::getRailwayCode, heartbeatVo.getRailwayCode());
|
|
|
- base.eq(BaseCameraManagement::getOnline, 2);
|
|
|
- base.eq(BaseCameraManagement::getEnableOrNot, 1);
|
|
|
- base.last("limit 2");
|
|
|
- List<BaseCameraManagement> list1 = baseCameraManagementService.list(base);
|
|
|
+ baseCameraManagementReq.setDistance(distance);
|
|
|
+ baseCameraManagementReq.setLineDir(heartbeatVo.getLineDir());
|
|
|
+ baseCameraManagementReq.setRailwayCode(heartbeatVo.getRailwayCode());
|
|
|
+ List<BaseCameraManagement> list1 = baseCameraManagementService.cameraMangemnetList(baseCameraManagementReq);
|
|
|
if (ObjectUtils.isEmpty(list1)) {
|
|
|
AjaxResults1 = new AjaxResults(0, "前方没有摄像机", respHeartbeatVo);
|
|
|
return SM4Utils.encryptData_ECB(JSONObject.toJSONString(AjaxResults1), key);
|
|
@@ -1364,26 +1358,19 @@ public class GeoHazardMonitorTokenController {
|
|
|
}
|
|
|
} else {
|
|
|
//没有报警信息的时候
|
|
|
+ BaseCameraManagementReq baseCameraManagementReq=new BaseCameraManagementReq();
|
|
|
if (heartbeatVo.getLineDir() == 1) {
|
|
|
distance = heartbeatVo.getVisualDistance() + heartbeatVo.getCurrentMile();
|
|
|
- camera.ge(BaseCameraManagement::getInstallMile, distance);
|
|
|
- camera.le(BaseCameraManagement::getInstallMile, (heartbeatVo.getCurrentMile() + 10000));
|
|
|
- camera.in(BaseCameraManagement::getMonitoringDirection, 1, 3);
|
|
|
- camera.orderByAsc(BaseCameraManagement::getGrou).orderByAsc(BaseCameraManagement::getSort);
|
|
|
+ baseCameraManagementReq.setInstallMile(heartbeatVo.getCurrentMile() + 10000);
|
|
|
}
|
|
|
if (heartbeatVo.getLineDir() == 2) {
|
|
|
distance = heartbeatVo.getCurrentMile() - heartbeatVo.getVisualDistance();
|
|
|
- camera.le(BaseCameraManagement::getInstallMile, distance);
|
|
|
- camera.ge(BaseCameraManagement::getInstallMile, (heartbeatVo.getCurrentMile() - 10000));
|
|
|
- camera.in(BaseCameraManagement::getMonitoringDirection, 2, 3);
|
|
|
- camera.orderByDesc(BaseCameraManagement::getGrou).orderByDesc(BaseCameraManagement::getSort);
|
|
|
- ;
|
|
|
+ baseCameraManagementReq.setInstallMile(heartbeatVo.getCurrentMile() - 10000);
|
|
|
}
|
|
|
- camera.eq(BaseCameraManagement::getRailwayCode, heartbeatVo.getRailwayCode());
|
|
|
- camera.eq(BaseCameraManagement::getOnline, 2);
|
|
|
- camera.eq(BaseCameraManagement::getEnableOrNot, 1);
|
|
|
- camera.last("limit 2");
|
|
|
- List<BaseCameraManagement> list1 = baseCameraManagementService.list(camera);
|
|
|
+ baseCameraManagementReq.setDistance(distance);
|
|
|
+ baseCameraManagementReq.setLineDir(heartbeatVo.getLineDir());
|
|
|
+ baseCameraManagementReq.setRailwayCode(heartbeatVo.getRailwayCode());
|
|
|
+ List<BaseCameraManagement> list1 = baseCameraManagementService.cameraMangemnetList(baseCameraManagementReq);
|
|
|
if (ObjectUtils.isEmpty(list1)) {
|
|
|
AjaxResults1 = new AjaxResults(0, "前方没有摄像机", respHeartbeatVo);
|
|
|
return SM4Utils.encryptData_ECB(JSONObject.toJSONString(AjaxResults1), key);
|
|
@@ -1676,26 +1663,19 @@ public class GeoHazardMonitorTokenController {
|
|
|
}
|
|
|
} else {
|
|
|
//没有报警信息的时候
|
|
|
- LambdaQueryWrapper<BaseCameraManagement> base = new LambdaQueryWrapper<>();
|
|
|
+ BaseCameraManagementReq baseCameraManagementReq=new BaseCameraManagementReq();
|
|
|
if (heartbeatVo.getLineDir() == 1) {
|
|
|
distance = heartbeatVo.getVisualDistance() + heartbeatVo.getCurrentMile();
|
|
|
- base.ge(BaseCameraManagement::getInstallMile, distance);
|
|
|
- base.in(BaseCameraManagement::getMonitoringDirection, 1, 3);
|
|
|
- base.orderByAsc(BaseCameraManagement::getGrou).orderByAsc(BaseCameraManagement::getSort);
|
|
|
- base.le(BaseCameraManagement::getInstallMile, (heartbeatVo.getCurrentMile() + 10000));
|
|
|
+ baseCameraManagementReq.setInstallMile(heartbeatVo.getCurrentMile() + 10000);
|
|
|
}
|
|
|
if (heartbeatVo.getLineDir() == 2) {
|
|
|
distance = heartbeatVo.getCurrentMile() - heartbeatVo.getVisualDistance();
|
|
|
- base.le(BaseCameraManagement::getInstallMile, distance);
|
|
|
- base.ge(BaseCameraManagement::getInstallMile, (heartbeatVo.getCurrentMile() - 10000));
|
|
|
- base.in(BaseCameraManagement::getMonitoringDirection, 2, 3);
|
|
|
- base.orderByDesc(BaseCameraManagement::getGrou).orderByDesc(BaseCameraManagement::getSort);
|
|
|
+ baseCameraManagementReq.setInstallMile(heartbeatVo.getCurrentMile() - 10000);
|
|
|
}
|
|
|
- base.eq(BaseCameraManagement::getRailwayCode, heartbeatVo.getRailwayCode());
|
|
|
- base.eq(BaseCameraManagement::getOnline, 2);
|
|
|
- base.eq(BaseCameraManagement::getEnableOrNot, 1);
|
|
|
- base.last("limit 2");
|
|
|
- List<BaseCameraManagement> list1 = baseCameraManagementService.list(base);
|
|
|
+ baseCameraManagementReq.setDistance(distance);
|
|
|
+ baseCameraManagementReq.setLineDir(heartbeatVo.getLineDir());
|
|
|
+ baseCameraManagementReq.setRailwayCode(heartbeatVo.getRailwayCode());
|
|
|
+ List<BaseCameraManagement> list1 = baseCameraManagementService.cameraMangemnetList(baseCameraManagementReq);
|
|
|
if (ObjectUtils.isEmpty(list1)) {
|
|
|
AjaxResults1 = new AjaxResults(0, "前方没有摄像机", respHeartbeatVo);
|
|
|
return SM4Utils.encryptData_ECB(JSONObject.toJSONString(AjaxResults1), key);
|
|
@@ -1810,26 +1790,19 @@ public class GeoHazardMonitorTokenController {
|
|
|
}
|
|
|
} else {
|
|
|
//没有报警信息的时候
|
|
|
- LambdaQueryWrapper<BaseCameraManagement> base = new LambdaQueryWrapper<>();
|
|
|
+ BaseCameraManagementReq baseCameraManagementReq=new BaseCameraManagementReq();
|
|
|
if (heartbeatVo.getLineDir() == 1) {
|
|
|
distance = heartbeatVo.getVisualDistance() + heartbeatVo.getCurrentMile();
|
|
|
- base.ge(BaseCameraManagement::getInstallMile, distance);
|
|
|
- base.in(BaseCameraManagement::getMonitoringDirection, 1, 3);
|
|
|
- base.orderByAsc(BaseCameraManagement::getGrou).orderByAsc(BaseCameraManagement::getSort);
|
|
|
- base.le(BaseCameraManagement::getInstallMile, (heartbeatVo.getCurrentMile() + 10000));
|
|
|
+ baseCameraManagementReq.setInstallMile(heartbeatVo.getCurrentMile() + 10000);
|
|
|
}
|
|
|
if (heartbeatVo.getLineDir() == 2) {
|
|
|
distance = heartbeatVo.getCurrentMile() - heartbeatVo.getVisualDistance();
|
|
|
- base.le(BaseCameraManagement::getInstallMile, distance);
|
|
|
- base.ge(BaseCameraManagement::getInstallMile, (heartbeatVo.getCurrentMile() - 10000));
|
|
|
- base.in(BaseCameraManagement::getMonitoringDirection, 2, 3);
|
|
|
- base.orderByDesc(BaseCameraManagement::getGrou).orderByDesc(BaseCameraManagement::getSort);
|
|
|
+ baseCameraManagementReq.setInstallMile(heartbeatVo.getCurrentMile() - 10000);
|
|
|
}
|
|
|
- base.eq(BaseCameraManagement::getRailwayCode, heartbeatVo.getRailwayCode());
|
|
|
- base.eq(BaseCameraManagement::getOnline, 2);
|
|
|
- base.eq(BaseCameraManagement::getEnableOrNot, 1);
|
|
|
- base.last("limit 2");
|
|
|
- List<BaseCameraManagement> list1 = baseCameraManagementService.list(base);
|
|
|
+ baseCameraManagementReq.setDistance(distance);
|
|
|
+ baseCameraManagementReq.setLineDir(heartbeatVo.getLineDir());
|
|
|
+ baseCameraManagementReq.setRailwayCode(heartbeatVo.getRailwayCode());
|
|
|
+ List<BaseCameraManagement> list1 = baseCameraManagementService.cameraMangemnetList(baseCameraManagementReq);
|
|
|
if (ObjectUtils.isEmpty(list1)) {
|
|
|
AjaxResults1 = new AjaxResults(0, "前方没有摄像机", respHeartbeatVo);
|
|
|
return SM4Utils.encryptData_ECB(JSONObject.toJSONString(AjaxResults1), key);
|