From 103ca74d9b67ce4f766b5f77451741a76fa696b9 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期日, 22 三月 2026 09:50:10 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/thread/impl/ZyStationV3Thread.java | 19 ++++++++++++++++---
1 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/src/main/java/com/zy/core/thread/impl/ZyStationV3Thread.java b/src/main/java/com/zy/core/thread/impl/ZyStationV3Thread.java
index af286c8..bcbe804 100644
--- a/src/main/java/com/zy/core/thread/impl/ZyStationV3Thread.java
+++ b/src/main/java/com/zy/core/thread/impl/ZyStationV3Thread.java
@@ -209,6 +209,16 @@
@Override
public StationCommand getCommand(StationCommandType commandType, Integer taskNo, Integer stationId, Integer targetStationId, Integer palletSize) {
+ return getCommand(commandType, taskNo, stationId, targetStationId, palletSize, null);
+ }
+
+ @Override
+ public StationCommand getCommand(StationCommandType commandType,
+ Integer taskNo,
+ Integer stationId,
+ Integer targetStationId,
+ Integer palletSize,
+ Double pathLenFactor) {
StationCommand stationCommand = new StationCommand();
stationCommand.setTaskNo(taskNo);
stationCommand.setStationId(stationId);
@@ -218,7 +228,7 @@
if (commandType == StationCommandType.MOVE) {
if (!stationId.equals(targetStationId)) {
- List<Integer> path = calcPathStationIds(stationId, targetStationId);
+ List<Integer> path = calcPathStationIds(taskNo, stationId, targetStationId, pathLenFactor);
if (path == null || path.isEmpty()) {
log.warn("杈撻�佺嚎鍛戒护鐢熸垚澶辫触锛岃矾寰勪负绌猴紝taskNo={}, stationId={}, targetStationId={}",
taskNo, stationId, targetStationId);
@@ -281,12 +291,15 @@
return zyStationConnectDriver.readOriginCommand(address, length);
}
- private List<Integer> calcPathStationIds(Integer startStationId, Integer targetStationId) {
+ private List<Integer> calcPathStationIds(Integer taskNo,
+ Integer startStationId,
+ Integer targetStationId,
+ Double pathLenFactor) {
NavigateUtils navigateUtils = SpringUtils.getBean(NavigateUtils.class);
if (navigateUtils == null) {
return new ArrayList<>();
}
- List<NavigateNode> nodes = navigateUtils.calcByStationId(startStationId, targetStationId);
+ List<NavigateNode> nodes = navigateUtils.calcByStationId(startStationId, targetStationId, taskNo, pathLenFactor);
List<Integer> ids = new ArrayList<>();
for (NavigateNode n : nodes) {
JSONObject v = JSONObject.parseObject(n.getNodeValue());
--
Gitblit v1.9.1