From 99573d3503e32befd853dda7cc0180e01a4c8597 Mon Sep 17 00:00:00 2001
From: Junjie <xjj@123>
Date: 星期日, 13 十月 2024 12:17:44 +0800
Subject: [PATCH] #

---
 zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/KernelService.java |   44 ++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 44 insertions(+), 0 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 f5e1c54..1cb5283 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
@@ -302,6 +302,14 @@
                     break;
             }
 
+            if (target.getSync() != null) {
+                motion.setSync(target.getSync());
+            }
+
+            if (target.getReleaseShuttle() != null) {
+                motion.setReleaseShuttle(target.getReleaseShuttle());
+            }
+
         }));
 
         return motionList;
@@ -440,4 +448,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;
+    }
+
+    /**
+     * 鍦板浘璺緞瑙i攣
+     */
+    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;
+    }
+
 }

--
Gitblit v1.9.1