#
Junjie
2025-03-29 e04f0981da6554606359e6de4e91b752a64aae6c
src/main/java/com/zy/core/thread/impl/ZyForkLiftThread.java
@@ -19,6 +19,7 @@
import com.zy.core.action.ForkLiftAction;
import com.zy.core.action.ShuttleAction;
import com.zy.core.cache.OutputQueue;
import com.zy.core.enums.ForkLiftIoModeType;
import com.zy.core.enums.ForkLiftProtocolStatusType;
import com.zy.core.enums.ForkLiftTaskModeType;
import com.zy.core.enums.RedisKeyType;
@@ -349,19 +350,31 @@
    }
    @Override
    public boolean switchIOMode(ForkLiftIoModeType type) {
        OperateResult result = siemensS7Net.Write("DB103.12", type.id.shortValue());
        if (result.IsSuccess) {
            return true;
        }
        return false;
    }
    @Override
    public int generateDeviceTaskNo(int taskNo, ForkLiftTaskModeType type) {
        return taskNo;
    }
    @Override
    public List<ForkLiftCommand> getPickAndPutCommand(Integer taskNo, Integer pick, Integer put) {
        Integer realPick = pick % 1000;
        Integer realPut = put % 1000;
        List<ForkLiftCommand> commands = new ArrayList<>();
        ForkLiftCommand command = new ForkLiftCommand();
        command.setLiftNo(slave.getId());
        command.setTaskNo(taskNo.shortValue());
        command.setMode(ForkLiftTaskModeType.PICK_PUT.id.shortValue());
        command.setPick(pick.shortValue());
        command.setPut(put.shortValue());
        command.setPick(realPick.shortValue());
        command.setPut(realPut.shortValue());
        command.setConfirm((short) 1);
        commands.add(command);
@@ -369,14 +382,17 @@
    }
    @Override
    public List<ForkLiftCommand> getShuttleSwitchCommand(Integer taskNo, Integer originLev, Integer targetLev) {
    public List<ForkLiftCommand> getShuttleSwitchCommand(Integer taskNo, Integer pick, Integer put) {
        Integer realPick = pick % 1000;
        Integer realPut = put % 1000;
        List<ForkLiftCommand> commands = new ArrayList<>();
        ForkLiftCommand command = new ForkLiftCommand();
        command.setLiftNo(slave.getId());
        command.setTaskNo(taskNo.shortValue());
        command.setMode(ForkLiftTaskModeType.SHUTTLE_SWITCH.id.shortValue());
        command.setPick(originLev.shortValue());
        command.setPut(targetLev.shortValue());
        command.setPick(realPick.shortValue());
        command.setPut(realPut.shortValue());
        command.setConfirm((short) 1);
        commands.add(command);