From 63fc53379b059d4076a228c8b5b149ead84f20eb Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期二, 15 七月 2025 16:59:52 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/core/controller/OpenController.java |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/zy/core/controller/OpenController.java b/src/main/java/com/zy/core/controller/OpenController.java
index 062a84c..d3aa0cd 100644
--- a/src/main/java/com/zy/core/controller/OpenController.java
+++ b/src/main/java/com/zy/core/controller/OpenController.java
@@ -6,23 +6,39 @@
 import com.zy.core.model.param.AddFakeDeviceParam;
 import com.zy.core.model.param.DeleteDeviceParam;
 import com.zy.core.properties.DeviceConfig;
+import com.zy.core.thread.ForkLiftThread;
 import com.zy.core.thread.ShuttleThread;
 import com.zy.core.utils.DeviceMsgUtils;
 import com.zy.core.utils.FakeDeviceUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
 
 @RestController
 @RequestMapping("/open")
 public class OpenController {
 
+    @Value("${deviceMsgConfig.gatewayId}")
+    private Integer gatewayId;
+    @Value("${deviceMsgConfig.gatewayPort}")
+    private Integer gatewayPort;
+
     @Autowired
     private DeviceMsgUtils deviceMsgUtils;
     @Autowired
     private FakeDeviceUtils fakeDeviceUtils;
+
+    @GetMapping("/getSystemInfo")
+    public R getSystemInfo() {
+        HashMap<String, Object> map = new HashMap<>();
+        map.put("gatewayId", gatewayId);
+        map.put("gatewayPort", gatewayPort);
+        return R.ok().add(map);
+    }
 
     @GetMapping("/getDeviceList")
     public R getDeviceList() {
@@ -48,6 +64,12 @@
                     continue;
                 }
                 deviceList.add(shuttleThread.getDeviceConfig());
+            } else if (slaveType.equals(SlaveType.ForkLift)) {
+                ForkLiftThread forkLiftThread = (ForkLiftThread) SlaveConnection.get(slaveType, config.getDeviceNo());
+                if(forkLiftThread == null){
+                    continue;
+                }
+                deviceList.add(forkLiftThread.getDeviceConfig());
             }
         }
 

--
Gitblit v1.9.1