From 0a9ca0a0c1dc8a364fe1ce71af37f880a0365b36 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期六, 08 六月 2024 12:32:32 +0800
Subject: [PATCH] #
---
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/thread/impl/NyShuttleThread.java | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/thread/impl/NyShuttleThread.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/thread/impl/NyShuttleThread.java
index d9ce954..262d869 100644
--- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/thread/impl/NyShuttleThread.java
+++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/thread/impl/NyShuttleThread.java
@@ -24,6 +24,7 @@
import com.zy.asrs.wcs.core.utils.NavigateMapData;
import com.zy.asrs.wcs.core.utils.NavigatePositionConvert;
import com.zy.asrs.wcs.core.utils.RedisUtil;
+import com.zy.asrs.wcs.core.utils.Utils;
import com.zy.asrs.wcs.rcs.News;
import com.zy.asrs.wcs.rcs.cache.OutputQueue;
import com.zy.asrs.wcs.rcs.constant.DeviceRedisConstant;
@@ -324,6 +325,7 @@
Integer requestId = resultHeader.getInteger("requestId");
if (requestType.equals("init")) {
Integer code = resultBody.getInteger("code");
+ OutputQueue.SHUTTLE.offer(MessageFormat.format("銆恵0}銆戝洓鍚戣溅澶嶄綅涓婃姤 ===>> [code:{1}] [ip:{2}] [port:{3}]", code, device.getId(), device.getIp(), device.getPort()));
//灏忚溅澶嶄綅璇锋眰
ShuttleCommand initCommand = getInitCommand(requestId, code);
//鍙戝嚭璇锋眰
@@ -613,6 +615,7 @@
@Override
public List<NavigateNode> getMoveAdvancePath() {
ObjectMapper objectMapper = SpringUtils.getBean(ObjectMapper.class);
+ NavigateMapData navigateMapData = SpringUtils.getBean(NavigateMapData.class);
ArrayList<NavigateNode> path = new ArrayList<>();
if (shuttleProtocol.getTaskNo() != 0) {
//瀛樺湪浠诲姟锛岃幏鍙栨寚浠�
@@ -631,6 +634,18 @@
if (!nodes.isEmpty()) {
path.addAll(nodes);
}
+
+ //灏嗚矾寰勯攣涓庡皬杞﹁矾寰勮繘琛屽尮閰�
+ ArrayList<NavigateNode> tmp = new ArrayList<>();
+ //妫�娴嬭矾寰勬槸鍚﹁閿佸畾
+ int[][] map = navigateMapData.getDataFromRedis(NavigationMapType.DFX.id, null, null);
+ for (NavigateNode node : path) {
+ if(map[node.getX()][node.getY()] == -999) {
+ tmp.add(node);
+ }
+ }
+
+ path = tmp;
}
}
return path;
--
Gitblit v1.9.1