From 89a94a91bd97e1e47fba93c762b4e53a5830b760 Mon Sep 17 00:00:00 2001
From: gtsxc <3272660260@qq.com>
Date: 星期一, 19 五月 2025 19:44:51 +0800
Subject: [PATCH] #

---
 zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/AnalyzeService.java |  356 ++++++++++++++++++++++++++++-------------------------------
 1 files changed, 168 insertions(+), 188 deletions(-)

diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/AnalyzeService.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/AnalyzeService.java
index 6fd54f3..e263be0 100644
--- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/AnalyzeService.java
+++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/AnalyzeService.java
@@ -1,14 +1,11 @@
 package com.zy.asrs.wcs.core.kernel;
 
-import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.zy.asrs.wcs.core.domain.dto.MotionDto;
 import com.zy.asrs.wcs.core.entity.*;
-import com.zy.asrs.wcs.core.model.NavigateNode;
 import com.zy.asrs.wcs.core.model.enums.*;
 import com.zy.asrs.wcs.core.service.*;
 import com.zy.asrs.wcs.core.utils.*;
-import com.zy.asrs.wcs.rcs.News;
 import com.zy.asrs.wcs.rcs.cache.SlaveConnection;
 import com.zy.asrs.wcs.rcs.entity.Device;
 import com.zy.asrs.wcs.rcs.model.enums.SlaveType;
@@ -146,8 +143,10 @@
             //绌挎杞﹀嚭鎻愬崌鏈哄簱浣嶅彿
             String liftLocNoFrom = shuttleStandbyFrom.getDeviceLoc();
 
-            //绌挎杞﹁繘鎻愬崌鏈哄緟鏈轰綅搴撲綅鍙�
+            //绌挎杞﹁繘鎻愬崌鏈哄緟鏈轰綅搴撲綅鍙�  杈撻�佺嚎浣嶇疆
             String standbyLocNoTo = shuttleStandbyTo.getDeviceStandbyLoc();
+            //绌挎杞︽崲灞傛椂寰呮満浣嶇疆 浣跨敤琛ㄥ垪 memo鏁版嵁
+            String standbyLocNoMemo = shuttleStandbyTo.getMemo();
 
             //绌挎杞﹀嚭鎻愬崌鏈哄緟鏈轰綅搴撲綅鍙�
             String standbyLocNoFrom = shuttleStandbyFrom.getDeviceStandbyLoc();
@@ -253,19 +252,19 @@
                             dto.setShuttleNo(shuttleDevice.getId().intValue());
                             dto.setShuttleDevice(shuttleDevice);
                             dto.setLiftNo(transferLiftDevice.getId().intValue());
-                            dto.setLocNo(standbyLocNoTo);
+                            dto.setLocNo(standbyLocNoMemo);
                         })),
                         MotionCtgType.SHUTTLE_MOVE
                 ));
 
-                // 閿佸畾鎹㈠眰璺緞
-                motionList.addAll(kernelService.mapLockPath(
-                        null,
-                        MotionDto.build((dto -> {
-                            dto.setShuttleNo(shuttleDevice.getId().intValue());
-                            dto.setLocNo(JSON.toJSONString(lockPath));
-                        }))
-                ));
+//                // 閿佸畾鎹㈠眰璺緞
+//                motionList.addAll(kernelService.mapLockPath(
+//                        null,
+//                        MotionDto.build((dto -> {
+//                            dto.setShuttleNo(shuttleDevice.getId().intValue());
+//                            dto.setLocNo(JSON.toJSONString(lockPath));
+//                        }))
+//                ));
 
                 // 鎻愬崌鏈虹┖杞界Щ鍔ㄥ埌绌挎杞﹀眰
                 motionList.addAll(kernelService.liftMove(
@@ -288,7 +287,7 @@
                 motionList.addAll(kernelService.shuttleMove(
                         MotionDto.build((dto -> {
                             dto.setShuttleNo(shuttleDevice.getId().intValue());
-                            dto.setLocNo(standbyLocNoTo);
+                            dto.setLocNo(standbyLocNoMemo);
                         })),
                         MotionDto.build((dto -> {
                             dto.setShuttleNo(shuttleDevice.getId().intValue());
@@ -360,14 +359,14 @@
                         }))
                 ));
 
-                // 瑙i攣鎹㈠眰璺緞
-                motionList.addAll(kernelService.mapUnlockPath(
-                        null,
-                        MotionDto.build((dto -> {
-                            dto.setShuttleNo(shuttleDevice.getId().intValue());
-                            dto.setLocNo(JSON.toJSONString(lockPath));
-                        }))
-                ));
+//                // 瑙i攣鎹㈠眰璺緞
+//                motionList.addAll(kernelService.mapUnlockPath(
+//                        null,
+//                        MotionDto.build((dto -> {
+//                            dto.setShuttleNo(shuttleDevice.getId().intValue());
+//                            dto.setLocNo(JSON.toJSONString(lockPath));
+//                        }))
+//                ));
 
                 // 绌挎杞﹀叆搴撻《鍗�
                 motionList.addAll(kernelService.shuttleAction(
@@ -478,8 +477,11 @@
             //绌挎杞﹀嚭鎻愬崌鏈哄簱浣嶅彿
             String liftLocNoFrom = shuttleStandbyFrom.getDeviceLoc();
 
-            //绌挎杞﹁繘鎻愬崌鏈哄緟鏈轰綅搴撲綅鍙�
+            //绌挎杞﹁繘鎻愬崌鏈哄緟鏈轰綅搴撲綅鍙� 杈撻�佺嚎浣嶇疆
             String standbyLocNoTo = shuttleStandbyTo.getDeviceStandbyLoc();
+
+            //绌挎杞︽崲灞傛椂寰呮満浣嶇疆 浣跨敤琛ㄥ垪 memo鏁版嵁
+            String standbyLocNoMemo = shuttleStandbyTo.getMemo();
 
             //绌挎杞﹀嚭鎻愬崌鏈哄緟鏈轰綅搴撲綅鍙�
             String standbyLocNoFrom = shuttleStandbyFrom.getDeviceStandbyLoc();
@@ -506,11 +508,11 @@
                 return motionList;
             }
 
-            //鍒嗘瀽鍑哄簱璺緞寰呮満搴撲綅
-            String lastPathStartLoc = shuttleDispatcher.analyzeOutPathWaitLoc(originLoc, standbyLocNoTo, shuttleDevice);
-            if (lastPathStartLoc == null) {
-                return motionList;//鏈垎鏋愭垚鍔�
-            }
+//            //鍒嗘瀽鍑哄簱璺緞寰呮満搴撲綅
+//            String lastPathStartLoc = shuttleDispatcher.analyzeOutPathWaitLoc(originLoc, standbyLocNoTo, shuttleDevice);
+//            if (lastPathStartLoc == null) {
+//                return motionList;//鏈垎鏋愭垚鍔�
+//            }
 
             /**
              * 鍑哄簱
@@ -543,27 +545,43 @@
                         MotionCtgType.SHUTTLE_PALLET_LIFT
                 ));
 
-                if (!originLoc.equals(lastPathStartLoc)) {
-                    // 绌挎杞﹁浇璐у嚭搴撹嚦鏈�鍚庝竴娈佃矾寰勭瓑寰�
-                    motionList.addAll(kernelService.shuttleMove(
-                            MotionDto.build((dto -> {
-                                dto.setShuttleNo(shuttleDevice.getId().intValue());
-                                dto.setLocNo(originLoc);
-                            })),
-                            MotionDto.build((dto -> {
-                                dto.setShuttleNo(shuttleDevice.getId().intValue());
-                                dto.setShuttleDevice(shuttleDevice);
-                                dto.setLocNo(lastPathStartLoc);
-                            })),
-                            MotionCtgType.SHUTTLE_TRANSPORT
-                    ));
-                }
+//                if (!originLoc.equals(lastPathStartLoc)) {
+//                    // 绌挎杞﹁浇璐у嚭搴撹嚦鏈�鍚庝竴娈佃矾寰勭瓑寰�
+//                    motionList.addAll(kernelService.shuttleMove(
+//                            MotionDto.build((dto -> {
+//                                dto.setShuttleNo(shuttleDevice.getId().intValue());
+//                                dto.setLocNo(originLoc);
+//                            })),
+//                            MotionDto.build((dto -> {
+//                                dto.setShuttleNo(shuttleDevice.getId().intValue());
+//                                dto.setShuttleDevice(shuttleDevice);
+//                                dto.setLocNo(lastPathStartLoc);
+//                            })),
+//                            MotionCtgType.SHUTTLE_TRANSPORT
+//                    ));
+//                }
+//
+//                // 绌挎杞﹁浇璐ц嚦鎻愬崌鏈哄緟鏈轰綅
+//                motionList.addAll(kernelService.shuttleMove(
+//                        MotionDto.build((dto -> {
+//                            dto.setShuttleNo(shuttleDevice.getId().intValue());
+//                            dto.setLocNo(lastPathStartLoc);
+//                        })),
+//                        MotionDto.build((dto -> {
+//                            dto.setShuttleNo(shuttleDevice.getId().intValue());
+//                            dto.setShuttleDevice(shuttleDevice);
+//                            dto.setLiftNo(transferLiftDevice.getId().intValue());
+//                            dto.setLocNo(standbyLocNoTo);
+//                            dto.setStaNo(getStaByLev(Utils.getLev(task.getOriginLoc())));//杈撻�佺珯
+//                        })),
+//                        MotionCtgType.SHUTTLE_TRANSPORT_TO_CONVEYOR
+//                ));
 
                 // 绌挎杞﹁浇璐ц嚦鎻愬崌鏈哄緟鏈轰綅
                 motionList.addAll(kernelService.shuttleMove(
                         MotionDto.build((dto -> {
                             dto.setShuttleNo(shuttleDevice.getId().intValue());
-                            dto.setLocNo(lastPathStartLoc);
+                            dto.setLocNo(originLoc);
                         })),
                         MotionDto.build((dto -> {
                             dto.setShuttleNo(shuttleDevice.getId().intValue());
@@ -644,19 +662,19 @@
                             dto.setShuttleNo(shuttleDevice.getId().intValue());
                             dto.setShuttleDevice(shuttleDevice);
                             dto.setLiftNo(transferLiftDevice.getId().intValue());
-                            dto.setLocNo(standbyLocNoTo);
+                            dto.setLocNo(standbyLocNoMemo);
                         })),
                         MotionCtgType.SHUTTLE_MOVE
                 ));
 
-                // 閿佸畾鎹㈠眰璺緞
-                motionList.addAll(kernelService.mapLockPath(
-                        null,
-                        MotionDto.build((dto -> {
-                            dto.setShuttleNo(shuttleDevice.getId().intValue());
-                            dto.setLocNo(JSON.toJSONString(lockPath));
-                        }))
-                ));
+//                // 閿佸畾鎹㈠眰璺緞
+//                motionList.addAll(kernelService.mapLockPath(
+//                        null,
+//                        MotionDto.build((dto -> {
+//                            dto.setShuttleNo(shuttleDevice.getId().intValue());
+//                            dto.setLocNo(JSON.toJSONString(lockPath));
+//                        }))
+//                ));
 
                 // 鎻愬崌鏈虹┖杞界Щ鍔ㄥ埌绌挎杞﹀眰
                 motionList.addAll(kernelService.liftMove(
@@ -679,7 +697,7 @@
                 motionList.addAll(kernelService.shuttleMove(
                         MotionDto.build((dto -> {
                             dto.setShuttleNo(shuttleDevice.getId().intValue());
-                            dto.setLocNo(standbyLocNoTo);
+                            dto.setLocNo(standbyLocNoMemo);
                         })),
                         MotionDto.build((dto -> {
                             dto.setShuttleNo(shuttleDevice.getId().intValue());
@@ -751,14 +769,14 @@
                         }))
                 ));
 
-                // 瑙i攣鎹㈠眰璺緞
-                motionList.addAll(kernelService.mapUnlockPath(
-                        null,
-                        MotionDto.build((dto -> {
-                            dto.setShuttleNo(shuttleDevice.getId().intValue());
-                            dto.setLocNo(JSON.toJSONString(lockPath));
-                        }))
-                ));
+//                // 瑙i攣鎹㈠眰璺緞
+//                motionList.addAll(kernelService.mapUnlockPath(
+//                        null,
+//                        MotionDto.build((dto -> {
+//                            dto.setShuttleNo(shuttleDevice.getId().intValue());
+//                            dto.setLocNo(JSON.toJSONString(lockPath));
+//                        }))
+//                ));
 
                 // 绌挎杞︽彁鍗囨満寰呮満浣嶈嚦鍑哄簱搴撲綅
                 motionList.addAll(kernelService.shuttleMove(
@@ -784,27 +802,43 @@
                         MotionCtgType.SHUTTLE_PALLET_LIFT
                 ));
 
-                if (!originLoc.equals(lastPathStartLoc)) {
-                    // 绌挎杞﹁浇璐у嚭搴撹嚦鏈�鍚庝竴娈佃矾寰勭瓑寰�
-                    motionList.addAll(kernelService.shuttleMove(
-                            MotionDto.build((dto -> {
-                                dto.setShuttleNo(shuttleDevice.getId().intValue());
-                                dto.setLocNo(originLoc);
-                            })),
-                            MotionDto.build((dto -> {
-                                dto.setShuttleNo(shuttleDevice.getId().intValue());
-                                dto.setShuttleDevice(shuttleDevice);
-                                dto.setLocNo(lastPathStartLoc);
-                            })),
-                            MotionCtgType.SHUTTLE_TRANSPORT
-                    ));
-                }
+//                if (!originLoc.equals(lastPathStartLoc)) {
+//                    // 绌挎杞﹁浇璐у嚭搴撹嚦鏈�鍚庝竴娈佃矾寰勭瓑寰�
+//                    motionList.addAll(kernelService.shuttleMove(
+//                            MotionDto.build((dto -> {
+//                                dto.setShuttleNo(shuttleDevice.getId().intValue());
+//                                dto.setLocNo(originLoc);
+//                            })),
+//                            MotionDto.build((dto -> {
+//                                dto.setShuttleNo(shuttleDevice.getId().intValue());
+//                                dto.setShuttleDevice(shuttleDevice);
+//                                dto.setLocNo(lastPathStartLoc);
+//                            })),
+//                            MotionCtgType.SHUTTLE_TRANSPORT
+//                    ));
+//                }
+//
+//                // 绌挎杞﹁浇璐ц嚦鎻愬崌鏈哄緟鏈轰綅
+//                motionList.addAll(kernelService.shuttleMove(
+//                        MotionDto.build((dto -> {
+//                            dto.setShuttleNo(shuttleDevice.getId().intValue());
+//                            dto.setLocNo(lastPathStartLoc);
+//                        })),
+//                        MotionDto.build((dto -> {
+//                            dto.setShuttleNo(shuttleDevice.getId().intValue());
+//                            dto.setShuttleDevice(shuttleDevice);
+//                            dto.setLiftNo(transferLiftDevice.getId().intValue());
+//                            dto.setLocNo(standbyLocNoFrom);
+//                            dto.setStaNo(getStaByLev(Utils.getLev(task.getOriginLoc())));//杈撻�佺珯
+//                        })),
+//                        MotionCtgType.SHUTTLE_TRANSPORT_TO_CONVEYOR
+//                ));
 
                 // 绌挎杞﹁浇璐ц嚦鎻愬崌鏈哄緟鏈轰綅
                 motionList.addAll(kernelService.shuttleMove(
                         MotionDto.build((dto -> {
                             dto.setShuttleNo(shuttleDevice.getId().intValue());
-                            dto.setLocNo(lastPathStartLoc);
+                            dto.setLocNo(originLoc);
                         })),
                         MotionDto.build((dto -> {
                             dto.setShuttleNo(shuttleDevice.getId().intValue());
@@ -950,6 +984,9 @@
         //绌挎杞﹀嚭鎻愬崌鏈哄簱浣嶅彿
         String liftLocNoFrom = shuttleStandbyFrom.getDeviceLoc();
 
+        //绌挎杞︽崲灞傛椂寰呮満浣嶇疆 浣跨敤琛ㄥ垪 memo鏁版嵁
+        String standbyLocNoMemo = shuttleStandbyTo.getMemo();
+
         //绌挎杞﹁繘鎻愬崌鏈哄緟鏈轰綅搴撲綅鍙�
         String standbyLocNoTo = shuttleStandbyTo.getDeviceStandbyLoc();
 
@@ -984,7 +1021,7 @@
                     MotionDto.build((dto -> {
                         dto.setShuttleNo(shuttleDevice.getId().intValue());
                         dto.setShuttleDevice(shuttleDevice);
-                        dto.setLocNo(standbyLocNoTo);
+                        dto.setLocNo(standbyLocNoMemo);
                     })),
                     MotionCtgType.SHUTTLE_MOVE
             ));
@@ -1010,7 +1047,7 @@
             motionList.addAll(kernelService.shuttleMove(
                     MotionDto.build((dto -> {
                         dto.setShuttleNo(shuttleDevice.getId().intValue());
-                        dto.setLocNo(standbyLocNoTo);
+                        dto.setLocNo(standbyLocNoMemo);
                     })),
                     MotionDto.build((dto -> {
                         dto.setShuttleNo(shuttleDevice.getId().intValue());
@@ -1239,6 +1276,9 @@
             //绌挎杞﹀埌鎻愬崌鏈哄緟鏈轰綅搴撲綅鍙�
             String standbyLocNoTo = liftDispatcher.getLiftStandByLocNo(liftThread, Utils.getLev(shuttleLocNo));
 
+            //绌挎杞︽崲灞傛椂寰呮満浣嶇疆 浣跨敤琛ㄥ垪 memo鏁版嵁
+            String standbyLocNoMemo = liftDispatcher.getInLiftStandByLocNo(liftThread, Utils.getLev(shuttleLocNo));
+
             //绌挎杞﹀嚭鎻愬崌鏈哄緟鏈轰綅搴撲綅鍙�
             String standbyLocNoFrom = liftDispatcher.getLiftStandByLocNo(liftThread, Utils.getLev(task.getDestLoc()));
 
@@ -1256,19 +1296,19 @@
                         dto.setShuttleNo(shuttleDevice.getId().intValue());
                         dto.setShuttleDevice(shuttleDevice);
                         dto.setLiftNo(liftDevice.getId().intValue());
-                        dto.setLocNo(standbyLocNoTo);
+                        dto.setLocNo(standbyLocNoMemo);
                     })),
                     MotionCtgType.SHUTTLE_MOVE
             ));
 
-            // 閿佸畾鎹㈠眰璺緞
-            motionList.addAll(kernelService.mapLockPath(
-                    null,
-                    MotionDto.build((dto -> {
-                        dto.setShuttleNo(shuttleDevice.getId().intValue());
-                        dto.setLocNo(JSON.toJSONString(lockPath));
-                    }))
-            ));
+//            // 閿佸畾鎹㈠眰璺緞
+//            motionList.addAll(kernelService.mapLockPath(
+//                    null,
+//                    MotionDto.build((dto -> {
+//                        dto.setShuttleNo(shuttleDevice.getId().intValue());
+//                        dto.setLocNo(JSON.toJSONString(lockPath));
+//                    }))
+//            ));
 
             // 鎻愬崌鏈虹┖杞界Щ鍔ㄥ埌绌挎杞﹀眰
             motionList.addAll(kernelService.liftMove(
@@ -1291,7 +1331,7 @@
             motionList.addAll(kernelService.shuttleMove(
                     MotionDto.build((dto -> {
                         dto.setShuttleNo(shuttleDevice.getId().intValue());
-                        dto.setLocNo(standbyLocNoTo);
+                        dto.setLocNo(standbyLocNoMemo);
                     })),
                     MotionDto.build((dto -> {
                         dto.setShuttleNo(shuttleDevice.getId().intValue());
@@ -1359,17 +1399,18 @@
                     null
                     , MotionDto.build((dto -> {
                         dto.setLiftNo(liftDevice.getId().intValue());
+                        dto.setReleaseLift(1);//鎵ц瀹屾垚鍚庨噴鏀炬彁鍗囨満
                     }))
             ));
 
-            // 瑙i攣鎹㈠眰璺緞
-            motionList.addAll(kernelService.mapUnlockPath(
-                    null,
-                    MotionDto.build((dto -> {
-                        dto.setShuttleNo(shuttleDevice.getId().intValue());
-                        dto.setLocNo(JSON.toJSONString(lockPath));
-                    }))
-            ));
+//            // 瑙i攣鎹㈠眰璺緞
+//            motionList.addAll(kernelService.mapUnlockPath(
+//                    null,
+//                    MotionDto.build((dto -> {
+//                        dto.setShuttleNo(shuttleDevice.getId().intValue());
+//                        dto.setLocNo(JSON.toJSONString(lockPath));
+//                    }))
+//            ));
 
             // 绌挎杞︽彁鍗囨満寰呮満浣嶈嚦鐩爣浣嶇疆
             motionList.addAll(kernelService.shuttleMove(
@@ -1650,11 +1691,6 @@
             return motionList;
         }
 
-        BasConveyorSta basConveyorStaOrigin = basConveyorStaService.selectBySiteNo(task.getOriginSite());
-        if (basConveyorStaOrigin == null) {
-            return motionList;
-        }
-
         //妫�娴嬬┛姊溅鏄惁鏈変换鍔$粦瀹�
         boolean shuttleResult = Utils.checkShuttleHasBinding(shuttleDevice, task.getTaskNo());
         if (shuttleResult) {
@@ -1683,8 +1719,11 @@
         //绌挎杞﹀嚭鎻愬崌鏈哄簱浣嶅彿
         String liftLocNoFrom = shuttleStandbyFrom.getDeviceLoc();
 
-        //绌挎杞﹁繘鎻愬崌鏈哄緟鏈轰綅搴撲綅鍙�
+        //绌挎杞﹁繘鎻愬崌鏈哄緟鏈轰綅搴撲綅鍙� 杈撻�佺嚎浣嶇疆
         String standbyLocNoTo = shuttleStandbyTo.getDeviceStandbyLoc();
+
+        //绌挎杞︽崲灞傛椂寰呮満浣嶇疆 浣跨敤琛ㄥ垪 memo鏁版嵁
+        String standbyLocNoMemo = shuttleStandbyTo.getMemo();
 
         //绌挎杞﹀嚭鎻愬崌鏈哄緟鏈轰綅搴撲綅鍙�
         String standbyLocNoFrom = shuttleStandbyFrom.getDeviceStandbyLoc();
@@ -1697,25 +1736,14 @@
 
         //鑾峰彇鍑哄簱浠诲姟绫诲瀷
         TaskCtg taskCtg = taskCtgService.getOne(new LambdaQueryWrapper<TaskCtg>()
-                .eq(TaskCtg::getFlag, String.valueOf(TaskCtgType.OUT))
+                .eq(TaskCtg::getFlag, String.valueOf(TaskCtgType.MOVE))
                 .eq(TaskCtg::getStatus, 1));
         if (taskCtg == null) {
             return motionList;
         }
-        //鑾峰彇杈撻�佺嚎璺緞
-        BasConveyorPath basConveyorPath = basConveyorPathService.getOne(new LambdaQueryWrapper<BasConveyorPath>()
-                .eq(BasConveyorPath::getDeviceStn, task.getOriginSite())
-                .eq(BasConveyorPath::getDeviceNo, liftProtocol.getLiftNo())
-                .eq(BasConveyorPath::getTypeNo, taskCtg.getId()));
-        if (basConveyorPath == null) {
-            return motionList;
-        }
 
-        //鍒嗘瀽鍑哄簱璺緞寰呮満搴撲綅
-        String lastPathStartLoc = shuttleDispatcher.analyzeOutPathWaitLoc(originLoc, standbyLocNoTo, shuttleDevice);
-        if (lastPathStartLoc == null) {
-            return motionList;//鏈垎鏋愭垚鍔�
-        }
+
+
 
         /**
          * 鍑哄簱
@@ -1748,50 +1776,18 @@
                     MotionCtgType.SHUTTLE_PALLET_LIFT
             ));
 
-            if (!originLoc.equals(lastPathStartLoc)) {
-                // 绌挎杞﹁浇璐у嚭搴撹嚦鏈�鍚庝竴娈佃矾寰勭瓑寰�
-                motionList.addAll(kernelService.shuttleMove(
-                        MotionDto.build((dto -> {
-                            dto.setShuttleNo(shuttleDevice.getId().intValue());
-                            dto.setLocNo(originLoc);
-                        })),
-                        MotionDto.build((dto -> {
-                            dto.setShuttleNo(shuttleDevice.getId().intValue());
-                            dto.setShuttleDevice(shuttleDevice);
-                            dto.setLocNo(lastPathStartLoc);
-                        })),
-                        MotionCtgType.SHUTTLE_TRANSPORT
-                ));
-            }
-
-//            // 绌挎杞﹁浇璐ц嚦鎻愬崌鏈哄緟鏈轰綅
-//            motionList.addAll(kernelService.shuttleMove(
-//                    MotionDto.build((dto -> {
-//                        dto.setShuttleNo(shuttleDevice.getId().intValue());
-//                        dto.setLocNo(lastPathStartLoc);
-//                    })),
-//                    MotionDto.build((dto -> {
-//                        dto.setShuttleNo(shuttleDevice.getId().intValue());
-//                        dto.setShuttleDevice(shuttleDevice);
-//                        dto.setLiftNo(transferLiftDevice.getId().intValue());
-//                        dto.setLocNo(standbyLocNoTo);
-//                        dto.setStaNo(getStaByLev(Utils.getLev(task.getOriginLoc())));//杈撻�佺珯
-//                    })),
-//                    MotionCtgType.SHUTTLE_TRANSPORT_TO_CONVEYOR
-//            ));
-
             // 绌挎杞﹁蛋琛岃嚦鐩爣搴撲綅
             motionList.addAll(kernelService.shuttleMove(
                     MotionDto.build((dto -> {
                         dto.setShuttleNo(shuttleDevice.getId().intValue());
-                        dto.setLocNo(lastPathStartLoc);
+                        dto.setLocNo(originLoc);
                     })),
                     MotionDto.build((dto -> {
                         dto.setShuttleNo(shuttleDevice.getId().intValue());
                         dto.setShuttleDevice(shuttleDevice);
                         dto.setLocNo(locNo);
                     })),
-                    MotionCtgType.SHUTTLE_MOVE
+                    MotionCtgType.SHUTTLE_TRANSPORT
             ));
 
             // 绌挎杞﹀嚭搴撴墭鐩樹笅闄�
@@ -1820,19 +1816,19 @@
                         dto.setShuttleNo(shuttleDevice.getId().intValue());
                         dto.setShuttleDevice(shuttleDevice);
                         dto.setLiftNo(transferLiftDevice.getId().intValue());
-                        dto.setLocNo(standbyLocNoTo);
+                        dto.setLocNo(standbyLocNoMemo);
                     })),
                     MotionCtgType.SHUTTLE_MOVE
             ));
 
-            // 閿佸畾鎹㈠眰璺緞
-            motionList.addAll(kernelService.mapLockPath(
-                    null,
-                    MotionDto.build((dto -> {
-                        dto.setShuttleNo(shuttleDevice.getId().intValue());
-                        dto.setLocNo(JSON.toJSONString(lockPath));
-                    }))
-            ));
+//            // 閿佸畾鎹㈠眰璺緞
+//            motionList.addAll(kernelService.mapLockPath(
+//                    null,
+//                    MotionDto.build((dto -> {
+//                        dto.setShuttleNo(shuttleDevice.getId().intValue());
+//                        dto.setLocNo(JSON.toJSONString(lockPath));
+//                    }))
+//            ));
 
             // 鎻愬崌鏈虹┖杞界Щ鍔ㄥ埌绌挎杞﹀眰
             motionList.addAll(kernelService.liftMove(
@@ -1855,7 +1851,7 @@
             motionList.addAll(kernelService.shuttleMove(
                     MotionDto.build((dto -> {
                         dto.setShuttleNo(shuttleDevice.getId().intValue());
-                        dto.setLocNo(standbyLocNoTo);
+                        dto.setLocNo(standbyLocNoMemo);
                     })),
                     MotionDto.build((dto -> {
                         dto.setShuttleNo(shuttleDevice.getId().intValue());
@@ -1927,14 +1923,14 @@
                     }))
             ));
 
-            // 瑙i攣鎹㈠眰璺緞
-            motionList.addAll(kernelService.mapUnlockPath(
-                    null,
-                    MotionDto.build((dto -> {
-                        dto.setShuttleNo(shuttleDevice.getId().intValue());
-                        dto.setLocNo(JSON.toJSONString(lockPath));
-                    }))
-            ));
+//            // 瑙i攣鎹㈠眰璺緞
+//            motionList.addAll(kernelService.mapUnlockPath(
+//                    null,
+//                    MotionDto.build((dto -> {
+//                        dto.setShuttleNo(shuttleDevice.getId().intValue());
+//                        dto.setLocNo(JSON.toJSONString(lockPath));
+//                    }))
+//            ));
 
             // 绌挎杞︽彁鍗囨満寰呮満浣嶈嚦鍑哄簱搴撲綅
             motionList.addAll(kernelService.shuttleMove(
@@ -1960,34 +1956,18 @@
                     MotionCtgType.SHUTTLE_PALLET_LIFT
             ));
 
-            if (!originLoc.equals(lastPathStartLoc)) {
-                // 绌挎杞﹁浇璐у嚭搴撹嚦鏈�鍚庝竴娈佃矾寰勭瓑寰�
-                motionList.addAll(kernelService.shuttleMove(
-                        MotionDto.build((dto -> {
-                            dto.setShuttleNo(shuttleDevice.getId().intValue());
-                            dto.setLocNo(originLoc);
-                        })),
-                        MotionDto.build((dto -> {
-                            dto.setShuttleNo(shuttleDevice.getId().intValue());
-                            dto.setShuttleDevice(shuttleDevice);
-                            dto.setLocNo(lastPathStartLoc);
-                        })),
-                        MotionCtgType.SHUTTLE_TRANSPORT
-                ));
-            }
-
             // 绌挎杞﹁蛋琛岃嚦鐩爣搴撲綅
             motionList.addAll(kernelService.shuttleMove(
                     MotionDto.build((dto -> {
                         dto.setShuttleNo(shuttleDevice.getId().intValue());
-                        dto.setLocNo(lastPathStartLoc);
+                        dto.setLocNo(originLoc);
                     })),
                     MotionDto.build((dto -> {
                         dto.setShuttleNo(shuttleDevice.getId().intValue());
                         dto.setShuttleDevice(shuttleDevice);
                         dto.setLocNo(locNo);
                     })),
-                    MotionCtgType.SHUTTLE_MOVE
+                    MotionCtgType.SHUTTLE_TRANSPORT
             ));
 
             // 绌挎杞﹀嚭搴撴墭鐩樹笅闄�

--
Gitblit v1.9.1