自动化立体仓库 - WCS系统
1
zhangc
2025-04-12 123a17c9d50745ea609f91943adca64e5ed12355
src/main/java/com/zy/core/thread/impl/ZyForkLiftThread.java
@@ -300,6 +300,7 @@
        if (this.forkLiftProtocol.getTaskNo() == null
                || this.forkLiftProtocol.getProtocolStatus() == null
                || this.forkLiftProtocol.getModel() == null
                || this.forkLiftProtocol.getErrorCode() == null
        ) {
            return false;
        }
@@ -307,7 +308,9 @@
        boolean res = this.forkLiftProtocol.getProtocolStatus() == ForkLiftProtocolStatusType.IDLE.id
                && this.forkLiftProtocol.getWrkNo() == 0
                && this.forkLiftProtocol.getTaskNo() == 0
                && this.forkLiftProtocol.getModel() == 2;
                && this.forkLiftProtocol.getModel() == 2
                && this.forkLiftProtocol.getErrorCode() == 0
                ;
        return res;
    }
@@ -328,13 +331,16 @@
        if (this.forkLiftProtocol.getTaskNo() == null
                || this.forkLiftProtocol.getProtocolStatus() == null
                || this.forkLiftProtocol.getModel() == null
                || this.forkLiftProtocol.getErrorCode() == null
        ) {
            return false;
        }
        boolean res = this.forkLiftProtocol.getProtocolStatus() == ForkLiftProtocolStatusType.IDLE.id
                && this.forkLiftProtocol.getWrkNo() == 0
                && this.forkLiftProtocol.getModel() == 2;
                && this.forkLiftProtocol.getModel() == 2
                && this.forkLiftProtocol.getErrorCode() == 0
                ;
        return res;
    }
@@ -365,13 +371,16 @@
    @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);
@@ -379,14 +388,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);