#
Junjie
2024-06-18 aab74f9728236408a573b6502d623eca2e8fff5b
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/command/ShuttleCommandService.java
@@ -73,9 +73,19 @@
        if (null == shuttleProtocol) {
            return false;
        }
        if (!shuttleThread.isIdle()) {//设备不空闲
        if (!shuttleThread.isIdle(new ExecuteSupport() {
            @Override
            public Boolean judgement() {
                if (Objects.equals(MotionCtgType.get(motion.getMotionCtgEl()), MotionCtgType.SHUTTLE_CHARGE_OFF)) {//非关闭充电motion,需要判断设备状态
                    return false;//不需要判断状态
                }
                return true;//需要判断状态
            }
        })) {//设备不空闲
            return false;
        }
        if (motionService.count(new LambdaQueryWrapper<Motion>()
                .eq(Motion::getDeviceCtg, DeviceCtgType.SHUTTLE.val())
                .eq(Motion::getDevice, motion.getDevice())
@@ -275,11 +285,13 @@
        //充电任务
        if (Objects.requireNonNull(MotionCtgType.get(motion.getMotionCtgEl())).equals(MotionCtgType.SHUTTLE_CHARGE_ON)) {
            // 复位穿梭车
            shuttleThread.setSyncTaskNo(0);
            shuttleThread.setProtocolStatus(ShuttleProtocolStatusType.IDLE);
            shuttleThread.setPakMk(true);
            return true;
            if (shuttleProtocol.getHasCharge() || shuttleProtocol.getProtocolStatusType().equals(ShuttleProtocolStatusType.CHARGING_WAITING)) {
                // 复位穿梭车
                shuttleThread.setSyncTaskNo(0);
                shuttleThread.setProtocolStatus(ShuttleProtocolStatusType.IDLE);
                shuttleThread.setPakMk(true);
                return true;
            }
        }
        if (!shuttleProtocol.getProtocolStatusType().equals(ShuttleProtocolStatusType.WAITING)