From 71a2c3d3df0c9d430431baaae9d3042882255d44 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期四, 28 三月 2024 09:23:04 +0800
Subject: [PATCH] Merge branch 'Four-Way-Rack' of http://47.97.1.152:5880/r/zy-asrs-master into Four-Way-Rack

---
 zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/command/ShuttleCommandService.java |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/command/ShuttleCommandService.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/command/ShuttleCommandService.java
index beb76a3..4851e47 100644
--- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/command/ShuttleCommandService.java
+++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/command/ShuttleCommandService.java
@@ -3,6 +3,7 @@
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.zy.asrs.framework.common.Cools;
 import com.zy.asrs.framework.exception.CoolException;
+import com.zy.asrs.wcs.core.action.ShuttleAction;
 import com.zy.asrs.wcs.core.entity.Loc;
 import com.zy.asrs.wcs.core.model.NavigateNode;
 import com.zy.asrs.wcs.core.model.command.ShuttleAssignCommand;
@@ -50,6 +51,8 @@
     private LocService locService;
     @Autowired
     private NavigateMapUtils navigateMapUtils;
+    @Autowired
+    private ShuttleAction shuttleAction;
 
     // 璁$畻
     public Boolean accept(Motion motion) {
@@ -365,16 +368,14 @@
 
         if (motion.getOrigin() != null && motion.getTarget() != null) {
             //鎵�浣跨敤鐨勮矾寰勮繘琛岄攣瀹氱鐢�
-            boolean lockResult = navigateMapUtils.writeNavigateNodeToRedisMap(Utils.getLev(motion.getTarget()), Integer.parseInt(shuttleProtocol.getShuttleNo()), assignCommand.getNodes(), true);//鎵�浣跨敤鐨勮矾寰勮繘琛岄攣瀹氱鐢�
+            boolean lockResult = navigateMapUtils.writeNavigateNodeToRedisMap(Utils.getLev(motion.getTarget()), shuttleProtocol.getShuttleNo(), assignCommand.getNodes(), true);//鎵�浣跨敤鐨勮矾寰勮繘琛岄攣瀹氱鐢�
             if (!lockResult) {
                 return false;//閿佸畾澶辫触
             }
-//            shuttleThread.assignWork(assignCommand);
-        }else {
-//            shuttleThread.assignWork(assignCommand);
         }
 
-        return Boolean.TRUE;
+        boolean result = shuttleAction.assignWork(shuttleThread.getDevice(), assignCommand);
+        return result;
     }
 
     public Boolean finish(Motion motion) {

--
Gitblit v1.9.1