#
Junjie
2024-09-26 f5ce30b28233487bbad44b20e9f93ca299941a8a
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/KernelService.java
@@ -87,6 +87,10 @@
            motion.setTarget(String.valueOf(liftDispatcher.getLiftLevOffset(target.getLiftNo(), target.getLev())));
            motion.setTarDrt(target.getStaNo());//目标站
            if (target.getDevpNo() != null) {
                motion.setDockNo(String.valueOf(target.getDevpNo()));//输送线ID
            }
            if (target.getSync() != null) {
                motion.setSync(target.getSync());
            }
@@ -114,6 +118,11 @@
            if (null != origin) {
                motion.setOrigin(String.valueOf(liftDispatcher.getLiftLevOffset(target.getLiftNo(), origin.getLev())));
            }
            if (target.getTaskNo() != null) {
                motion.setTaskNo(target.getTaskNo());
            }
            motion.setTarget(String.valueOf(liftDispatcher.getLiftLevOffset(target.getLiftNo(), target.getLev())));
        }));
@@ -431,4 +440,40 @@
        return motionList;
    }
    // Map -----------------------------------------------------------------------------
    /**
     * 地图路径锁定
     */
    public List<Motion> mapLockPath(MotionDto origin, MotionDto target) {
        List<Motion> motionList = new ArrayList<>();
        motionList.add(Motion.build(motion -> {
            motion.setDeviceCtg(DeviceCtgType.MAP.val());
            motion.setDevice(String.valueOf(target.getShuttleNo()));
            motion.setMotionCtg(MotionCtgType.MAP_LOCK_PATH.val());
            motion.setTarget(target.getLocNo());
        }));
        return motionList;
    }
    /**
     * 地图路径解锁
     */
    public List<Motion> mapUnlockPath(MotionDto origin, MotionDto target) {
        List<Motion> motionList = new ArrayList<>();
        motionList.add(Motion.build(motion -> {
            motion.setDeviceCtg(DeviceCtgType.MAP.val());
            motion.setDevice(String.valueOf(target.getShuttleNo()));
            motion.setMotionCtg(MotionCtgType.MAP_UNLOCK_PATH.val());
            motion.setTarget(target.getLocNo());
        }));
        return motionList;
    }
}