Junjie
2023-03-25 f62a2a2429bedf5315d86b4e8bb1b7489221e361
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -30,13 +30,11 @@
import com.zy.core.model.command.LedCommand;
import com.zy.core.model.command.SteCommand;
import com.zy.core.model.protocol.CrnProtocol;
import com.zy.core.model.protocol.ShuttleProtocol;
import com.zy.core.model.protocol.StaProtocol;
import com.zy.core.model.protocol.SteProtocol;
import com.zy.core.properties.SlaveProperties;
import com.zy.core.thread.BarcodeThread;
import com.zy.core.thread.LedThread;
import com.zy.core.thread.SiemensDevpThread;
import com.zy.core.thread.SteThread;
import com.zy.core.thread.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
@@ -612,6 +610,27 @@
    }
    /**
     * 入出库  ===>>  四向穿梭车入出库作业下发
     */
    public synchronized void shuttleIoExecute() {
        for (ShuttleSlave shuttle : slaveProperties.getShuttle()) {
            //获取四向穿梭车信息
            ShuttleThread shuttleThread = (ShuttleThread) SlaveConnection.get(SlaveType.Shuttle, shuttle.getId());
            ShuttleProtocol shuttleProtocol = shuttleThread.getShuttleProtocol();
            if (shuttleProtocol == null) {
                continue;
            }
            // 只有当四向穿梭车空闲 并且无任务时才继续执行
            if (shuttleProtocol.getBusyStatusType() == ShuttleStatusType.IDLE && shuttleProtocol.getTaskNo() == 0) {
                //入出库逻辑
                //.....
            }
        }
    }
    /**
     * 入出库  ===>>  堆垛机入出库作业下发
     */
    public synchronized void crnIoExecute(){