From fa2fab0a146e683cb319887239db19e699d485b7 Mon Sep 17 00:00:00 2001 From: zjj <3272660260@qq.com> Date: 星期一, 24 六月 2024 10:10:02 +0800 Subject: [PATCH] # --- zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/KernelService.java | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 56 insertions(+), 2 deletions(-) diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/KernelService.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/KernelService.java index cac9b7d..ae6aadf 100644 --- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/KernelService.java +++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/KernelService.java @@ -84,6 +84,10 @@ } motion.setTarget(String.valueOf(liftDispatcher.getLiftLevOffset(target.getLiftNo(), target.getLev()))); motion.setTarDrt(target.getStaNo());//鐩爣绔� + + if (target.getSync() != null) { + motion.setSync(target.getSync()); + } })); return motionList; @@ -177,6 +181,36 @@ motion.setDeviceCtg(DeviceCtgType.LIFT.val()); motion.setDevice(String.valueOf(target.getLiftNo())); motion.setMotionCtg(MotionCtgType.LIFT_UNLOCK.val()); + })); + + return motionList; + } + + /** + * 鎻愬崌鏈�-灏忚溅宸插埌浣� + */ + public List<Motion> liftShuttleArrival(MotionDto origin, MotionDto target) { + List<Motion> motionList = new ArrayList<>(); + + motionList.add(Motion.build(motion -> { + motion.setDeviceCtg(DeviceCtgType.LIFT.val()); + motion.setDevice(String.valueOf(target.getLiftNo())); + motion.setMotionCtg(MotionCtgType.LIFT_SHUTTLE_ARRIVAL.val()); + })); + + return motionList; + } + + /** + * 鎻愬崌鏈�-灏忚溅宸查┒绂� + */ + public List<Motion> liftShuttleLeave(MotionDto origin, MotionDto target) { + List<Motion> motionList = new ArrayList<>(); + + motionList.add(Motion.build(motion -> { + motion.setDeviceCtg(DeviceCtgType.LIFT.val()); + motion.setDevice(String.valueOf(target.getLiftNo())); + motion.setMotionCtg(MotionCtgType.LIFT_SHUTTLE_LEAVE.val()); })); return motionList; @@ -278,14 +312,34 @@ return motionList; } - public List<Motion> shuttleCharge(MotionDto origin, MotionDto target) { + /** + * 绌挎杞﹀姩浣� + */ + public List<Motion> shuttleAction(MotionDto origin, MotionDto target, MotionCtgType motionCtgType) { List<Motion> motionList = new ArrayList<>(); motionList.add(Motion.build(motion -> { motion.setDeviceCtg(DeviceCtgType.SHUTTLE.val()); motion.setDevice(String.valueOf(target.getShuttleNo())); - motion.setMotionCtg(MotionCtgType.SHUTTLE_CHARGE_ON.val()); + motion.setMotionCtg(motionCtgType.val()); + + switch (motionCtgType) { + case SHUTTLE_PALLET_LIFT://鎵樼洏椤跺崌 + + break; + case SHUTTLE_PALLET_DOWN://鎵樼洏涓嬮檷 + + break; + case SHUTTLE_CHARGE_ON://鍏呯數寮� + + break; + case SHUTTLE_CHARGE_OFF://鍏呯數鍏� + + break; + default: + break; + } })); -- Gitblit v1.9.1