From 6182cc11c3e93610df7fda87611d2ca807c6354c Mon Sep 17 00:00:00 2001
From: qlsxk <qlsxk@qq.com>
Date: 星期四, 16 十月 2025 14:28:30 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/common/utils/ShuttleOperaUtils.java | 22 ++++++++++++++++------
1 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/src/main/java/com/zy/common/utils/ShuttleOperaUtils.java b/src/main/java/com/zy/common/utils/ShuttleOperaUtils.java
index 7cdbed3..c4fe002 100644
--- a/src/main/java/com/zy/common/utils/ShuttleOperaUtils.java
+++ b/src/main/java/com/zy/common/utils/ShuttleOperaUtils.java
@@ -72,6 +72,17 @@
}
}
+ Object systemConfigMapObj = redisUtil.get(RedisKeyType.SYSTEM_CONFIG_MAP.key);
+
+ //灏忚溅(x,y)鍛戒护杩愯鏂瑰悜棰犲��
+ boolean shuttleDirectionReverse = false;
+ if (systemConfigMapObj != null) {
+ HashMap<String, String> systemConfigMap = (HashMap<String, String>) systemConfigMapObj;
+ if (systemConfigMap.get("shuttleDirectionReverse").equals("Y")) {
+ shuttleDirectionReverse = true;
+ }
+ }
+
long calcStartTime = System.currentTimeMillis();
List<NavigateNode> nodeList = navigateUtils.calc(startLocNo, endLocNo, mapTypes, Utils.getShuttlePoints(shuttleNo, Utils.getLev(startLocNo)), whites);
if (nodeList == null) {
@@ -133,15 +144,15 @@
long startGetMoveCommandTime = System.currentTimeMillis();
//鑾峰彇绉诲姩鍛戒护
- ShuttleCommand command = shuttleThread.getMoveCommand(assignCommand.getDeviceTaskNo(), startCodeNum, distCodeNum, allDistance, ShuttleRunDirection.get(startPath.getDirection()).id.intValue(), runSpeed, nodes);
+ ShuttleCommand command = shuttleThread.getMoveCommand(assignCommand.getDeviceTaskNo(), startCodeNum, distCodeNum, allDistance, ShuttleRunDirection.get(startPath.getDirection()).id.intValue(), runSpeed, nodes, shuttleDirectionReverse);
News.info("[RCS Debug] getMoveCommand idx:{} time:{}", i, (System.currentTimeMillis() - startGetMoveCommandTime));
if (i + 1 == data.size()) {
long startGetInOutLiftTime = System.currentTimeMillis();
if (moveType.equals("inLift")) {
- command = shuttleThread.getMoveLiftCommand(assignCommand.getDeviceTaskNo(), startCodeNum, distCodeNum, allDistance, ShuttleRunDirection.get(startPath.getDirection()).id.intValue(), runSpeed, nodes, true);
+ command = shuttleThread.getMoveLiftCommand(assignCommand.getDeviceTaskNo(), startCodeNum, distCodeNum, allDistance, ShuttleRunDirection.get(startPath.getDirection()).id.intValue(), runSpeed, nodes, true, shuttleDirectionReverse);
}else if (moveType.equals("outLift")) {
- command = shuttleThread.getMoveLiftCommand(assignCommand.getDeviceTaskNo(), startCodeNum, distCodeNum, allDistance, ShuttleRunDirection.get(startPath.getDirection()).id.intValue(), runSpeed, nodes, false);
+ command = shuttleThread.getMoveLiftCommand(assignCommand.getDeviceTaskNo(), startCodeNum, distCodeNum, allDistance, ShuttleRunDirection.get(startPath.getDirection()).id.intValue(), runSpeed, nodes, false, shuttleDirectionReverse);
}
News.info("[RCS Debug] getInOutLiftTime idx:{} time:{}", i, (System.currentTimeMillis() - startGetInOutLiftTime));
}
@@ -156,9 +167,8 @@
//灏忚溅绉诲姩杩炵画涓嬪彂鎸囦护
boolean shuttleMoveCommandsContinuously = false;
- Object object = redisUtil.get(RedisKeyType.SYSTEM_CONFIG_MAP.key);
- if (object != null) {
- HashMap<String, String> systemConfigMap = (HashMap<String, String>) object;
+ if (systemConfigMapObj != null) {
+ HashMap<String, String> systemConfigMap = (HashMap<String, String>) systemConfigMapObj;
String shuttleMoveCommandsContinuouslyConfig = systemConfigMap.get("shuttleMoveCommandsContinuously");
if (shuttleMoveCommandsContinuouslyConfig != null && shuttleMoveCommandsContinuouslyConfig.equals("Y")) {
shuttleMoveCommandsContinuously = true;
--
Gitblit v1.9.1