#
Junjie
2 天以前 3c45d4f9f3aba5bc85a9577e43c0dffc71b93a22
src/main/java/com/zy/asrs/controller/ForkLiftController.java
@@ -20,11 +20,9 @@
import com.zy.core.cache.OutputQueue;
import com.zy.core.cache.SlaveConnection;
import com.zy.core.enums.*;
import com.zy.core.model.ForkLiftSlave;
import com.zy.core.model.command.*;
import com.zy.core.model.protocol.ForkLiftProtocol;
import com.zy.core.model.protocol.ForkLiftStaProtocol;
import com.zy.core.properties.SlaveProperties;
import com.zy.core.thread.ForkLiftThread;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@@ -61,7 +59,7 @@
        for (DeviceConfig device : forkliftList) {
            // 表格行
            JSONObject baseObj = new JSONObject();
            baseObj.put("shuttleNo", device.getDeviceNo());
            baseObj.put("liftNo", device.getDeviceNo());
            list.add(baseObj);
            // 获取提升机信息
            ForkLiftThread forkLiftThread = (ForkLiftThread) SlaveConnection.get(SlaveType.ForkLift, device.getDeviceNo());
@@ -114,7 +112,7 @@
        StringBuilder str = new StringBuilder();
        String s;
        int i = 0;
        while((s = OutputQueue.LIFT.poll()) != null && i <=10) {
        while((s = OutputQueue.FORKLIFT.poll()) != null && i <=10) {
            str.append("\n").append(s);
            i++;
        }
@@ -288,9 +286,9 @@
            Integer targetSta = param.getStaNo();
            //获取提升机命令
            List<ForkLiftCommand> liftCommand = forkLiftThread.getShuttleSwitchCommand(workNo, startSta, targetSta);
            ForkLiftCommand liftCommand = forkLiftThread.getShuttleSwitchCommand(workNo, startSta, targetSta);
            ArrayList<ForkLiftCommand> commands = new ArrayList<>();
            commands.addAll(liftCommand);
            commands.add(liftCommand);
            //提交到线程去工作
            LiftAssignCommand assignCommand = new LiftAssignCommand();
@@ -310,9 +308,9 @@
            Integer targetSta = param.getStaNo();
            //获取提升机命令
            List<ForkLiftCommand> liftCommand = forkLiftThread.getPickAndPutCommand(workNo, startSta, targetSta);
            ForkLiftCommand liftCommand = forkLiftThread.getPickAndPutCommand(workNo, startSta, targetSta);
            ArrayList<ForkLiftCommand> commands = new ArrayList<>();
            commands.addAll(liftCommand);
            commands.add(liftCommand);
            //提交到线程去工作
            LiftAssignCommand assignCommand = new LiftAssignCommand();
@@ -332,9 +330,9 @@
            Integer targetSta = param.getStaNo();
            //获取提升机命令
            List<ForkLiftCommand> liftCommand = forkLiftThread.getMoveCommand(workNo, startSta, targetSta);
            ForkLiftCommand liftCommand = forkLiftThread.getMoveCommand(workNo, startSta, targetSta);
            ArrayList<ForkLiftCommand> commands = new ArrayList<>();
            commands.addAll(liftCommand);
            commands.add(liftCommand);
            //提交到线程去工作
            LiftAssignCommand assignCommand = new LiftAssignCommand();