#
whycq
2024-07-15 b058b8c8be2267c2a0ba4e3916871ede64f53c47
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/command/LiftCommandService.java
@@ -17,6 +17,8 @@
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.model.protocol.StaProtocol;
import com.zy.asrs.wcs.rcs.thread.DevpThread;
import com.zy.asrs.wcs.rcs.thread.LiftThread;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@@ -227,6 +229,20 @@
                    return false;
                }
                //判断目标站是否有托盘
                Integer conveyorDeviceId = Integer.parseInt(motion.getDockNo());
                DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Conveyor, conveyorDeviceId);
                if (devpThread == null) {
                    return false;
                }
                StaProtocol staProtocol = devpThread.getStation().get(motion.getTarDrt());
                if(staProtocol == null) {
                    return false;
                }
                if (!staProtocol.isLoading()) {
                    return false;
                }
                if (motion.getReleaseLift() == 1) {//释放提升机
                    task.setLiftNo(0);
                    task.setUpdateTime(new Date());