From a206216c95cb4cc2b3a3c7c1e3d247d6ea87183f Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期五, 08 九月 2023 16:25:00 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/controller/ShuttleController.java |    3 ++-
 src/main/webapp/views/console.html                          |    6 ++++--
 src/main/java/com/zy/core/thread/NyShuttleThread.java       |    1 +
 src/main/resources/application.yml                          |    7 +++++--
 4 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/src/main/java/com/zy/asrs/controller/ShuttleController.java b/src/main/java/com/zy/asrs/controller/ShuttleController.java
index 2548cce..bb39709 100644
--- a/src/main/java/com/zy/asrs/controller/ShuttleController.java
+++ b/src/main/java/com/zy/asrs/controller/ShuttleController.java
@@ -75,10 +75,11 @@
                 continue;
             }
             NyShuttleProtocol shuttleProtocol = shuttleThread.getShuttleProtocol();
+            JSONObject shuttleData = JSON.parseObject(JSON.toJSONString(shuttleProtocol));
             if (shuttleProtocol == null || shuttleProtocol.getShuttleNo()==null) {
+                list.add(shuttleData);
                 continue;
             }
-            JSONObject shuttleData = JSON.parseObject(JSON.toJSONString(shuttleProtocol));
 
             shuttleData.put("moveAdvancePath", null);//绌挎杞﹂璁¤矾寰�
             if (shuttleProtocol.getTaskNo() != 0) {
diff --git a/src/main/java/com/zy/core/thread/NyShuttleThread.java b/src/main/java/com/zy/core/thread/NyShuttleThread.java
index 2baf4d6..9648a90 100644
--- a/src/main/java/com/zy/core/thread/NyShuttleThread.java
+++ b/src/main/java/com/zy/core/thread/NyShuttleThread.java
@@ -117,6 +117,7 @@
             NyShuttleHttpCommand readStatusCommand = NyHttpUtils.getReadStatusCommand(slave.getId());
             JSONObject jsonObject = NyHttpUtils.requestCommand(socket, readStatusCommand);
             if (jsonObject == null) {
+                shuttleProtocol.setProtocolStatus(ShuttleProtocolStatusType.OFFLINE);
                 OutputQueue.SHUTTLE.offer(MessageFormat.format("銆恵0}銆戝洓鍚戠┛姊溅Socket鐘舵�佷俊鎭け璐� ===>> [id:{1}] [ip:{2}] [port:{3}]", DateUtils.convert(new Date()), slave.getId(), slave.getIp(), slave.getPort()));
             }else {
                 //鎵嬪姩鐘舵��/鑷姩鐘舵��
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index f6ec637..740808b 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -40,6 +40,9 @@
 wms:
   url: localhost:8081/xzjlwms
 
+robot:
+  url: http://127.0.0.1:9090/tzskwcs
+
 erp:
   db:
     driver_class_name: com.microsoft.sqlserver.jdbc.SQLServerDriver
@@ -276,14 +279,14 @@
   # 鍥涘悜绌挎杞�1
   shuttle[0]:
     id: 1
-    ip: 192.168.0.101
+    ip: 127.0.0.1
     port: 8888
     rack: 0
     slot: 0
   # 鍥涘悜绌挎杞�2
   shuttle[1]:
     id: 2
-    ip: 10.10.10.221
+    ip: 192.168.4.15
     port: 8888
     rack: 0
     slot: 0
diff --git a/src/main/webapp/views/console.html b/src/main/webapp/views/console.html
index 3c5f1f0..6fbc391 100644
--- a/src/main/webapp/views/console.html
+++ b/src/main/webapp/views/console.html
@@ -418,8 +418,10 @@
 								if (res.code == 200) {
 									let currentLevShuttle = []//褰撳墠妤煎眰灏忚溅闆嗗悎
 									res.data.forEach((item,idx) => {
-										if (item.point.z == that.currentLev) {
-											currentLevShuttle.push(item)
+										if (item.point != undefined && item.point != null) {
+											if (item.point.z == that.currentLev) {
+												currentLevShuttle.push(item);
+											}
 										}
 									})
 									that.currentLevShuttleList = currentLevShuttle

--
Gitblit v1.9.1