#
Junjie
2024-10-15 f43b508dda7334487a1640b0bbd908d7b3aa3cb6
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/action/ShuttleAction.java
@@ -133,12 +133,14 @@
        int commandStep = redisCommand.getCommandStep();
        // 完结上一条命令
        boolean updateCommand = false;
        if (commandStep != 0) {
            ShuttleCommand command = commands.get(commandStep - 1);
            if (command.getMode() == ShuttleCommandModeType.MOVE.id) {
                // 正常移动
                if (command.getTargetLocNo().equals(shuttleProtocol.getCurrentLocNo())) {
                    command.setComplete(true);
                    updateCommand = true;
                    //解锁锁定路径,上一条路径
                    List<NavigateNode> nodes = null;
                    try {
@@ -166,6 +168,7 @@
                //判断是否顶升到位
                if (shuttleProtocol.getHasLift()) {
                    command.setComplete(true);
                    updateCommand = true;
//                    //判断是否有物
//                    if (shuttleProtocol.getHasPallet()) {
//                        command.setComplete(true);
@@ -176,19 +179,24 @@
                // 判断是否下降到位
                if (!shuttleProtocol.getHasLift()) {
                    command.setComplete(true);
                    updateCommand = true;
                }
            } else if (command.getMode() == ShuttleCommandModeType.CHARGE_OPEN.id) {
                // 充电开
                //判断小车充电状态
                if (shuttleProtocol.getHasCharge()) {
                    command.setComplete(true);
                    updateCommand = true;
                }
            }else {
                command.setComplete(true);//其他命令默认认为完成
                updateCommand = true;
            }
            // 更新redis数据
            redisUtil.set(DeviceRedisConstant.SHUTTLE_WORK_FLAG + redisCommand.getTaskNo(), JSON.toJSONString(redisCommand, SerializerFeature.DisableCircularReferenceDetect));
            if(updateCommand) {
                // 更新redis数据
                redisUtil.set(DeviceRedisConstant.SHUTTLE_WORK_FLAG + redisCommand.getTaskNo(), JSON.toJSONString(redisCommand, SerializerFeature.DisableCircularReferenceDetect));
            }
            if (!command.getComplete()) {
                return false;