From 901f9ca15fb0ce3bcf2ebf956c569c260050c561 Mon Sep 17 00:00:00 2001
From: Junjie <xjj@123>
Date: 星期一, 07 四月 2025 13:10:54 +0800
Subject: [PATCH] #
---
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/action/LiftAction.java | 25 ++++++++++++++++++++-----
1 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/action/LiftAction.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/action/LiftAction.java
index 1946db0..b727735 100644
--- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/action/LiftAction.java
+++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/action/LiftAction.java
@@ -6,6 +6,7 @@
import com.zy.asrs.wcs.core.model.command.*;
import com.zy.asrs.wcs.core.model.enums.LiftCommandModeType;
import com.zy.asrs.wcs.core.service.TaskService;
+import com.zy.asrs.wcs.core.utils.LiftDispatcher;
import com.zy.asrs.wcs.core.utils.RedisUtil;
import com.zy.asrs.wcs.rcs.News;
import com.zy.asrs.wcs.rcs.cache.SlaveConnection;
@@ -33,6 +34,8 @@
private TaskService taskService;
@Autowired
private BasLiftOptService basLiftOptService;
+ @Autowired
+ private LiftDispatcher liftDispatcher;
public synchronized boolean assignWork(Device device, LiftAssignCommand assignCommand) {
LiftThread liftThread = (LiftThread) SlaveConnection.get(SlaveType.Lift, device.getId().intValue());
@@ -109,9 +112,22 @@
if (liftProtocol.getLev() == command.getTargetLev()) {
command.setComplete(true);
}
- } else if (command.getMode() == LiftCommandModeType.PALLET_INOUT.id) {
- //鎵樼洏鍑哄叆
- if (liftProtocol.getLev() == command.getTargetLev()) {
+ } else if (command.getMode() == LiftCommandModeType.PALLET_IN.id) {
+ //鎵樼洏鍏�
+ Integer target = liftDispatcher.getLiftLevLogic(liftThread.getDevice().getId().intValue(), command.getTargetLev());
+ if (liftProtocol.getLev() == target) {
+ command.setComplete(true);
+ }
+
+ //鍒ゆ柇鎻愬崌鏈烘墭鐩樻槸鍚﹀瓨鍦�
+ if (!liftProtocol.getHasTray()) {
+ return false;
+ }
+
+ } else if (command.getMode() == LiftCommandModeType.PALLET_OUT.id) {
+ //鎵樼洏鍑�
+ Integer target = liftDispatcher.getLiftLevLogic(liftThread.getDevice().getId().intValue(), command.getTargetLev());
+ if (liftProtocol.getLev() == target) {
command.setComplete(true);
}
@@ -119,7 +135,6 @@
if (liftProtocol.getHasTray()) {
return false;
}
-
} else if (command.getMode() == LiftCommandModeType.RESET.id) {
//澶嶄綅
command.setComplete(true);
@@ -203,7 +218,7 @@
if (command.getMode() == LiftCommandModeType.MOVE.id) {
response = liftThread.move(command);
- } else if (command.getMode() == LiftCommandModeType.PALLET_INOUT.id) {
+ } else if (command.getMode() == LiftCommandModeType.PALLET_IN.id || command.getMode() == LiftCommandModeType.PALLET_OUT.id) {
response = liftThread.palletInOut(command);
} else if (command.getMode() == LiftCommandModeType.LOCK.id) {
response = liftThread.lock(command);
--
Gitblit v1.9.1