From 443dffce29daf6ed03b3c2137738925e315fb09f Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期一, 30 十二月 2024 20:16:52 +0800
Subject: [PATCH] 修改bug

---
 guns-admin/src/main/java/com/stylefeng/guns/modular/api/PatrolTaskController.java |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/guns-admin/src/main/java/com/stylefeng/guns/modular/api/PatrolTaskController.java b/guns-admin/src/main/java/com/stylefeng/guns/modular/api/PatrolTaskController.java
index 0a3c29a..0d7edeb 100644
--- a/guns-admin/src/main/java/com/stylefeng/guns/modular/api/PatrolTaskController.java
+++ b/guns-admin/src/main/java/com/stylefeng/guns/modular/api/PatrolTaskController.java
@@ -119,7 +119,8 @@
 		List<Vehicle> list = new ArrayList<>();
 		if(null != year){
 			for (Vehicle vehicle : vehicleList) {
-				if("2".equals(year)){
+				String vehicleGpsProtocol = vehicle.getVehicleGpsProtocol();
+				if(2023 == year && null != vehicleGpsProtocol && vehicleGpsProtocol.equals("2")){
 					list.add(vehicle);
 				}
 			}
@@ -137,9 +138,10 @@
 		List<Ship> shipList = VideoGateway.getShipList(null, null, null, 0);
 		List<Ship> list = new ArrayList<>();
 		if(null != year){
-			for (Ship vehicle : shipList) {
-				if("2".equals(year)){
-					list.add(vehicle);
+			for (Ship ship : shipList) {
+				String vehicleGpsProtocol = ship.getVehicleGpsProtocol();
+				if(2023 == year && null != vehicleGpsProtocol && vehicleGpsProtocol.equals("2")){
+					list.add(ship);
 				}
 			}
 		}else{

--
Gitblit v1.7.1