From 389b7f3b7025c62a0b723da8b26a3869fe5ecb40 Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期三, 25 十二月 2024 10:55:05 +0800
Subject: [PATCH] 修改过滤2023年协议数据bug

---
 guns-admin/src/main/java/com/stylefeng/guns/modular/api/PatrolTaskController.java |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 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..c523743 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
@@ -30,7 +30,7 @@
  * @Date 2024/12/17 20:18
  */
 @RestController
-@RequestMapping("/api/patrolTask")
+@RequestMapping("/base/patrolTask")
 public class PatrolTaskController extends BaseController {
 
 	@Resource
@@ -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