From d9cea3d7757a8d580bb0574d419ba6dd9c2478e7 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期五, 13 十二月 2024 15:11:50 +0800
Subject: [PATCH] #search shuttle
---
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/AnalyzeService.java | 95 +++++++++++++++++++++++++++++++----------------
1 files changed, 63 insertions(+), 32 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 6660003..e645221 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
@@ -101,8 +101,8 @@
String shuttleLocNo = shuttleProtocol.getCurrentLocNo();
- //鑾峰彇璺濈鐩爣浣嶇疆鏈�杩戠殑绌洪棽鍙崲灞傛彁鍗囨満
- LiftThread liftThread = liftDispatcher.searchIdleLift(shuttleLocNo, task.getHostId(), true);
+ //鑾峰彇璺濈鐩爣浣嶇疆鏈�杩戠殑鍙崲灞傛彁鍗囨満(鍙兘涓嶇┖闂�)
+ LiftThread liftThread = liftDispatcher.searchLift(shuttleLocNo, task.getHostId(), true);
if (liftThread == null) {
return motionList;
}
@@ -158,21 +158,21 @@
// 鍏ュ簱鐩爣灞傛湁绌挎杞�
if (Utils.getLev(shuttleLocNo) == Utils.getLev(task.getDestLoc())) {
- // 鎻愬崌鏈鸿浇璐хЩ鍔�
- motionList.addAll(kernelService.liftMoveGoods(
- MotionDto.build((dto -> {
- dto.setLiftNo(transferLiftDevice.getId().intValue());
- dto.setLev(1);//鍏夋嘲1灞傛槸杈撻�佺嚎灞�
- dto.setStaNo(31004);//鍏ュ簱绔欑偣
- }))
- , MotionDto.build((dto -> {
- dto.setLiftNo(transferLiftDevice.getId().intValue());
- dto.setLev(Utils.getLev(task.getDestLoc()));
- dto.setStaNo(getStaByLev(Utils.getLev(task.getDestLoc())));
- dto.setDevpNo(basConveyorStaDest.getConveyorDeviceId().intValue());
- dto.setReleaseLift(1);//鎵ц瀹屾垚鍚庨噴鏀炬彁鍗囨満
- }))
- ));
+// // 鎻愬崌鏈鸿浇璐хЩ鍔�
+// motionList.addAll(kernelService.liftMoveGoods(
+// MotionDto.build((dto -> {
+// dto.setLiftNo(transferLiftDevice.getId().intValue());
+// dto.setLev(1);//鍏夋嘲1灞傛槸杈撻�佺嚎灞�
+// dto.setStaNo(31004);//鍏ュ簱绔欑偣
+// }))
+// , MotionDto.build((dto -> {
+// dto.setLiftNo(transferLiftDevice.getId().intValue());
+// dto.setLev(Utils.getLev(task.getDestLoc()));
+// dto.setStaNo(getStaByLev(Utils.getLev(task.getDestLoc())));
+// dto.setDevpNo(basConveyorStaDest.getConveyorDeviceId().intValue());
+// dto.setReleaseLift(1);//鎵ц瀹屾垚鍚庨噴鏀炬彁鍗囨満
+// }))
+// ));
// 绌挎杞﹁蛋琛岃嚦鎻愬崌鏈哄簱浣嶅緟鏈轰綅
motionList.addAll(kernelService.shuttleMove(
@@ -182,6 +182,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLocNo(standbyLocNoTo);
})),
MotionCtgType.SHUTTLE_MOVE
@@ -204,6 +205,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLiftNo(transferLiftDevice.getId().intValue());
dto.setLocNo(destLoc);
// dto.setReleaseLift(2);//鎵ц涓噴鏀炬彁鍗囨満
@@ -225,21 +227,21 @@
*/
} else {
- // 鎻愬崌鏈鸿浇璐хЩ鍔�
- motionList.addAll(kernelService.liftMoveGoods(
- MotionDto.build((dto -> {
- dto.setLiftNo(transferLiftDevice.getId().intValue());
- dto.setLev(1);//鍏夋嘲1灞傛槸杈撻�佺嚎灞�
- dto.setStaNo(31004);//鍏ュ簱绔欑偣
- }))
- , MotionDto.build((dto -> {
- dto.setLiftNo(transferLiftDevice.getId().intValue());
- dto.setLev(Utils.getLev(task.getDestLoc()));
- dto.setStaNo(getStaByLev(Utils.getLev(task.getDestLoc())));
- dto.setDevpNo(basConveyorStaDest.getConveyorDeviceId().intValue());
- dto.setReleaseLift(1);//鎵ц瀹屾垚鍚庨噴鏀炬彁鍗囨満
- }))
- ));
+// // 鎻愬崌鏈鸿浇璐хЩ鍔�
+// motionList.addAll(kernelService.liftMoveGoods(
+// MotionDto.build((dto -> {
+// dto.setLiftNo(transferLiftDevice.getId().intValue());
+// dto.setLev(1);//鍏夋嘲1灞傛槸杈撻�佺嚎灞�
+// dto.setStaNo(31004);//鍏ュ簱绔欑偣
+// }))
+// , MotionDto.build((dto -> {
+// dto.setLiftNo(transferLiftDevice.getId().intValue());
+// dto.setLev(Utils.getLev(task.getDestLoc()));
+// dto.setStaNo(getStaByLev(Utils.getLev(task.getDestLoc())));
+// dto.setDevpNo(basConveyorStaDest.getConveyorDeviceId().intValue());
+// dto.setReleaseLift(1);//鎵ц瀹屾垚鍚庨噴鏀炬彁鍗囨満
+// }))
+// ));
// 绌挎杞﹁蛋琛岃嚦鎻愬崌鏈哄簱浣嶅緟鏈轰綅
motionList.addAll(kernelService.shuttleMove(
@@ -249,6 +251,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLiftNo(transferLiftDevice.getId().intValue());
dto.setLocNo(standbyLocNoTo);
})),
@@ -289,6 +292,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLiftNo(transferLiftDevice.getId().intValue());
dto.setLocNo(liftLocNoTo);
})),
@@ -341,6 +345,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLocNo(standbyLocNoFrom);
})),
MotionCtgType.SHUTTLE_MOVE_FROM_LIFT
@@ -381,6 +386,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLiftNo(transferLiftDevice.getId().intValue());
dto.setLocNo(destLoc);
})),
@@ -521,6 +527,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLocNo(originLoc);
})),
MotionCtgType.SHUTTLE_MOVE
@@ -545,6 +552,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLocNo(lastPathStartLoc);
})),
MotionCtgType.SHUTTLE_TRANSPORT
@@ -559,6 +567,7 @@
})),
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())));//杈撻�佺珯
@@ -583,6 +592,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLocNo(standbyLocs);
dto.setSync(0);//寮傛鎵ц
dto.setReleaseShuttle(1);//鎵ц瀹屾垚鍚庨噴鏀惧皬杞�
@@ -632,6 +642,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLiftNo(transferLiftDevice.getId().intValue());
dto.setLocNo(standbyLocNoTo);
})),
@@ -672,6 +683,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLiftNo(transferLiftDevice.getId().intValue());
dto.setLocNo(liftLocNoTo);
})),
@@ -724,6 +736,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLocNo(standbyLocNoFrom);
})),
MotionCtgType.SHUTTLE_MOVE_FROM_LIFT
@@ -756,6 +769,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLocNo(originLoc);
})),
MotionCtgType.SHUTTLE_MOVE
@@ -779,6 +793,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLocNo(lastPathStartLoc);
})),
MotionCtgType.SHUTTLE_TRANSPORT
@@ -793,6 +808,7 @@
})),
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())));//杈撻�佺珯
@@ -817,6 +833,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLocNo(standbyLocs);
dto.setSync(0);//寮傛鎵ц
dto.setReleaseShuttle(1);//鎵ц瀹屾垚鍚庨噴鏀惧皬杞�
@@ -950,6 +967,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLocNo(chargeLocNo);
})),
MotionCtgType.SHUTTLE_MOVE
@@ -965,6 +983,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLocNo(standbyLocNoTo);
})),
MotionCtgType.SHUTTLE_MOVE
@@ -995,6 +1014,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLiftNo(transferLiftDevice.getId().intValue());
dto.setLocNo(liftLocNoTo);
})),
@@ -1047,6 +1067,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLocNo(standbyLocNoFrom);
})),
MotionCtgType.SHUTTLE_MOVE_FROM_LIFT
@@ -1068,6 +1089,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLocNo(chargeLocNo);
})),
MotionCtgType.SHUTTLE_MOVE
@@ -1136,6 +1158,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLocNo(locNo);
})),
MotionCtgType.SHUTTLE_MOVE
@@ -1190,6 +1213,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLocNo(locNo);
})),
MotionCtgType.SHUTTLE_MOVE
@@ -1230,6 +1254,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLiftNo(liftDevice.getId().intValue());
dto.setLocNo(standbyLocNoTo);
})),
@@ -1270,6 +1295,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLiftNo(liftDevice.getId().intValue());
dto.setLocNo(liftLocNoTo);
})),
@@ -1322,6 +1348,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLocNo(standbyLocNoFrom);
})),
MotionCtgType.SHUTTLE_MOVE_FROM_LIFT
@@ -1353,6 +1380,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLocNo(locNo);
})),
MotionCtgType.SHUTTLE_MOVE
@@ -1408,6 +1436,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(device.getId().intValue());
+ dto.setShuttleDevice(device);
dto.setLocNo(targetLoc);
})),
MotionCtgType.SHUTTLE_MOVE
@@ -1460,6 +1489,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(device.getId().intValue());
+ dto.setShuttleDevice(device);
dto.setLocNo(sourceLoc);
})),
MotionCtgType.SHUTTLE_MOVE
@@ -1481,6 +1511,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(device.getId().intValue());
+ dto.setShuttleDevice(device);
dto.setLocNo(targetLoc);
})),
MotionCtgType.SHUTTLE_TRANSPORT
--
Gitblit v1.9.1