From f9e8fafc10ccd1c2e5f6060b4cdc29559927aa16 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期一, 30 十二月 2024 16:18:39 +0800 Subject: [PATCH] 修改bug --- guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/PatrolTaskServiceImpl.java | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/PatrolTaskServiceImpl.java b/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/PatrolTaskServiceImpl.java index 4f0ee07..6d8a46f 100644 --- a/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/PatrolTaskServiceImpl.java +++ b/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/PatrolTaskServiceImpl.java @@ -193,7 +193,8 @@ Integer vehicleId = taskDetailVehicle.getVehicleId(); VehicleOnline vehicleOnline1 = null; for (VehicleOnline vehicleOnline : vehicleOnlines2018) { - if(vehicleOnline.getVehicleId().equals(vehicleId) && vehicleOnline.getVehicleType().equals(vehicleType)){ + if(null != vehicleOnline.getVehicleId() && vehicleOnline.getVehicleId().equals(vehicleId) && + null != vehicleOnline.getVehicleType() && vehicleOnline.getVehicleType().equals(vehicleType)){ vehicleOnline1 = vehicleOnline; String vehicleGpsProtocol = vehicleOnline.getVehicleGpsProtocol(); vehicleOnline1.setVehicleGpsProtocol("808-guangzhou".equals(vehicleGpsProtocol) ? "1" : "2"); @@ -202,7 +203,8 @@ } if(null == vehicleOnline1){ for (VehicleOnline vehicleOnline : vehicleOnlines203) { - if(vehicleOnline.getVehicleId().equals(vehicleId) && vehicleOnline.getVehicleType().equals(vehicleType)){ + if(null != vehicleOnline.getVehicleId() && vehicleOnline.getVehicleId().equals(vehicleId) && + null != vehicleOnline.getVehicleType() && vehicleOnline.getVehicleType().equals(vehicleType)){ vehicleOnline1 = vehicleOnline; vehicleOnline1.setVehicleGpsProtocol(vehicleOnline.getVehicleGpsProtocol()); break; @@ -234,7 +236,7 @@ throw new RuntimeException(); }else{ //等待15秒 - Thread.sleep(15000); + Thread.sleep(30000); String fileUrl = VideoGateway.getCameraShotByFileId2018(terminalId, fileId, 0); if(null == fileUrl){ @@ -246,7 +248,7 @@ throw new Exception(); }else{ //等待15秒 - Thread.sleep(15000); + Thread.sleep(30000); fileUrl = VideoGateway.getCameraShotByFileId2018(terminalId, fileId, 0); if(null == fileUrl){ @@ -280,7 +282,7 @@ throw new Exception(); }else{ //等待15秒 - Thread.sleep(15000); + Thread.sleep(30000); String fileUrl = VideoGateway.getCameraShotByFileId2023(fileId, 0); if(null == fileUrl){ @@ -292,7 +294,7 @@ throw new Exception(); }else{ //等待15秒 - Thread.sleep(15000); + Thread.sleep(30000); fileUrl = VideoGateway.getCameraShotByFileId2023(fileId, 0); if(null == fileUrl){ -- Gitblit v1.7.1