From 36c6d6b39e2b76080480c5bc90a412d711b76144 Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期三, 19 六月 2024 15:54:24 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/Four-Way-Rack' into Four-Way-Rack
---
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/command/LiftCommandService.java | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/command/LiftCommandService.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/command/LiftCommandService.java
index c1cb3e6..3471fbb 100644
--- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/command/LiftCommandService.java
+++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/command/LiftCommandService.java
@@ -12,6 +12,7 @@
import com.zy.asrs.wcs.core.service.MotionService;
import com.zy.asrs.wcs.core.service.TaskService;
import com.zy.asrs.wcs.rcs.cache.SlaveConnection;
+import com.zy.asrs.wcs.rcs.model.enums.LiftProtocolStatusType;
import com.zy.asrs.wcs.rcs.model.enums.SlaveType;
import com.zy.asrs.wcs.rcs.model.protocol.LiftProtocol;
import com.zy.asrs.wcs.rcs.thread.LiftThread;
@@ -20,6 +21,7 @@
import org.springframework.stereotype.Service;
import java.util.ArrayList;
+import java.util.List;
import java.util.Objects;
/**
@@ -66,7 +68,7 @@
assignCommand.setTaskNo(motion.getTaskNo());
assignCommand.setCommands(list);
- LiftCommand command = new LiftCommand();
+ List<LiftCommand> command = new ArrayList<>();
switch (Objects.requireNonNull(MotionCtgType.get(motion.getMotionCtgEl()))){
case LIFT_MOVE:
// 濡傛灉宸茬粡鍦ㄧ洰鏍囧眰锛岄偅杈瑰眰杩囨护
@@ -76,7 +78,7 @@
}
command = liftThread.getMoveCommand(motion.getTaskNo(), 0, Integer.parseInt(motion.getTarget()), LiftCommandModeType.MOVE);
- list.add(command);
+ list.addAll(command);
return liftAction.assignWork(liftThread.getDevice(), assignCommand);
case LIFT_WITH_GOODS:
// if (liftProtocol.getHasTray()) {
@@ -84,7 +86,7 @@
// }
command = liftThread.getPalletInOutCommand(motion.getTaskNo(), Integer.parseInt(motion.getOrigin()), Integer.parseInt(motion.getTarget()), motion.getOriDrt(), motion.getTarDrt(), LiftCommandModeType.PALLET_INOUT);
- list.add(command);
+ list.addAll(command);
return liftAction.assignWork(liftThread.getDevice(), assignCommand);
case LIFT_WITH_SHUTTLE:
if (!liftProtocol.getHasCar()) {
@@ -92,7 +94,7 @@
}
command = liftThread.getMoveWithShuttleCommand(motion.getTaskNo(), Integer.parseInt(motion.getOrigin()), Integer.parseInt(motion.getTarget()), LiftCommandModeType.MOVE_CAR);
- list.add(command);
+ list.addAll(command);
return liftAction.assignWork(liftThread.getDevice(), assignCommand);
case LIFT_WITH_GOODS_AND_SHUTTLE:
return false;
@@ -194,9 +196,8 @@
}
liftThread.setSyncTaskNo(0);//娓呴浂宸ヤ綔鍙�
- liftThread.commandFinished(motion.getTaskNo());//璋冪敤瀹屾垚鍚庣画鎸囦护(閮ㄥ垎鎻愬崌鏈烘湁鍚庣画鎸囦护锛屽疄闄呮儏鍐电湅鏄惁鏈夌湡姝e疄鐜版柟娉�)
+ liftThread.setProtocolStatus(LiftProtocolStatusType.IDLE);
return true;
}
-
}
--
Gitblit v1.9.1