From 0f7f9ebdf8c7eb42c74a994b602f33c0d38aafb7 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期一, 28 九月 2026 09:03:06 +0800
Subject: [PATCH] 新增加功能

---
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TFleetController.java |   33 ++++++++++++++++++++++++++++++++-
 1 files changed, 32 insertions(+), 1 deletions(-)

diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TFleetController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TFleetController.java
index 4d3839a..2b98960 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TFleetController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TFleetController.java
@@ -1,5 +1,6 @@
 package com.ruoyi.other.controller;
 
+import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.utils.poi.ExcelUtil;
 import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.ruoyi.common.core.web.page.PageInfo;
@@ -18,6 +19,7 @@
 import org.springframework.util.StringUtils;
 import org.springframework.web.bind.annotation.DeleteMapping;
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.PutMapping;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -29,6 +31,7 @@
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 import java.util.Objects;
@@ -55,7 +58,7 @@
     /**
      * 分页查询车队
      */
-    @RequiresPermissions(value = {"/fleet/list"}, logical = Logical.OR)
+    @RequiresPermissions(value = {"/fleet/list", "/vinManagement/list", "/chargingCard/list"}, logical = Logical.OR)
     @GetMapping("/page")
     @ApiOperation(value = "分页查询车队", tags = {"管理后台-车队管理"})
     public AjaxResult<PageInfo<TFleet>> page(@RequestParam(value = "current", defaultValue = "1") Integer current,
@@ -229,4 +232,32 @@
         records.forEach(item -> item.setCompanyName(nameMap.get(item.getCompanyId())));
     }
 
+    /**
+     * 远程接口:车队详情(VIN码车辆所属车队校验使用,内部调用)
+     */
+    @PostMapping("/remote/get/{id}")
+    @ApiOperation(value = "远程-车队详情", tags = {"内部调用"})
+    public R<TFleet> remoteGet(@PathVariable("id") Integer id) {
+        if (id == null) {
+            return R.fail("车队ID不能为空");
+        }
+        return R.ok(fleetService.getById(id));
+    }
+
+    /**
+     * 远程接口:按ID批量查询车队(VIN列表回填车队名称使用,内部调用)
+     */
+    @PostMapping("/remote/list-by-ids")
+    @ApiOperation(value = "远程-按ID批量查询车队", tags = {"内部调用"})
+    public R<List<TFleet>> remoteListByIds(@RequestBody List<Integer> ids) {
+        if (ids == null || ids.isEmpty()) {
+            return R.ok(new ArrayList<>());
+        }
+        List<Integer> distinct = ids.stream().filter(Objects::nonNull).distinct().collect(Collectors.toList());
+        if (distinct.isEmpty()) {
+            return R.ok(new ArrayList<>());
+        }
+        return R.ok(fleetService.listByIds(distinct));
+    }
+
 }

--
Gitblit v1.7.1