From 46d68076bfa7b706549e0420dfe09314024e3696 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期五, 22 十一月 2024 21:02:39 +0800
Subject: [PATCH] #读取地图文件优化
---
src/main/java/com/zy/asrs/utils/Utils.java | 21 ++++++++++++++++++---
1 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/src/main/java/com/zy/asrs/utils/Utils.java b/src/main/java/com/zy/asrs/utils/Utils.java
index bff15bf..da59ddd 100644
--- a/src/main/java/com/zy/asrs/utils/Utils.java
+++ b/src/main/java/com/zy/asrs/utils/Utils.java
@@ -442,6 +442,7 @@
WrkMastService wrkMastService = SpringUtils.getBean(WrkMastService.class);
CommonService commonService = SpringUtils.getBean(CommonService.class);
ShuttleDispatchUtils shuttleDispatchUtils = SpringUtils.getBean(ShuttleDispatchUtils.class);
+ NavigateMapData navigateMapData = SpringUtils.getBean(NavigateMapData.class);
if (shuttleThread == null) {
return false;
@@ -451,15 +452,25 @@
return false;
}
- NavigateMapData mapData = new NavigateMapData(z);//鑾峰彇鍦板浘鏁版嵁
- int[][] data = mapData.getData(-1, null, currentShuttleId == null ? null : Utils.getShuttlePoints(0, z));//杞藉叆鍏ㄩ儴杞﹁締
+ navigateMapData.setLev(z);//鑾峰彇鍦板浘鏁版嵁
+ int[][] data = navigateMapData.getData(-1, null, currentShuttleId == null ? null : Utils.getShuttlePoints(0, z));//杞藉叆鍏ㄩ儴杞﹁締
+
+ int moveBay = 23;//閬胯璧峰鍒�
+ int bay = Utils.getBay(shuttleProtocol.getCurrentLocNo());//灏忚溅褰撳墠鍒�
+ if (bay > 1 && bay <= 30) {
+ moveBay = 23;
+ } else if (bay > 30 && bay <= 45) {
+ moveBay = 39;
+ } else if (bay > 45) {
+ moveBay = 50;
+ }
int distY = -1;
int distX = -1;
int distZ = -1;
//鑾峰彇閬胯搴撲綅
String distLocNo = null;
- for (int y = 23; y <= 56; y++) {
+ for (int y = moveBay; y <= 56; y++) {
boolean searchFlag = true;
for (int x = 10; x <= 11; x++) {
if (data[x][y] < 0 || data[x][y] == 66) {
@@ -481,6 +492,10 @@
continue;
}
+ if (distLocMast.getLocSts().equals("X")) {
+ continue;//璋冭繃绂佺敤搴撲綅
+ }
+
//鍒ゆ柇璇ュ簱浣嶆槸鍚﹀瓨鍦ㄥ伐浣滄。
EntityWrapper<WrkMast> wrapper = new EntityWrapper<>();
wrapper.eq("loc_no", locNo);
--
Gitblit v1.9.1