From f397cc784ec8594890cc03dc12f062cf4ecd8dc7 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期五, 13 十二月 2024 08:21:39 +0800
Subject: [PATCH] #入库逻辑优化
---
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/AnalyzeService.java | 379 ++++++++++++++++++++++++++++++++++++++---------------
1 files changed, 268 insertions(+), 111 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 edde4cb..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
@@ -1,17 +1,14 @@
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.enums.DeviceCtgType;
-import com.zy.asrs.wcs.core.model.enums.MotionCtgType;
-import com.zy.asrs.wcs.core.model.enums.TaskCtgType;
-import com.zy.asrs.wcs.core.model.enums.TaskStsType;
+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.ConveyorDispatcher;
-import com.zy.asrs.wcs.core.utils.LiftDispatcher;
-import com.zy.asrs.wcs.core.utils.ShuttleDispatcher;
-import com.zy.asrs.wcs.core.utils.Utils;
+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;
@@ -24,6 +21,7 @@
import org.springframework.stereotype.Service;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
/**
@@ -57,6 +55,15 @@
private BasConveyorService basConveyorService;
@Autowired
private TaskCtgService taskCtgService;
+
+ public Integer getStaByLev(Integer lev) {
+ HashMap<Integer, Integer> map = new HashMap<>();
+ map.put(1, 31006);
+ map.put(2, 31007);
+ map.put(3, 31008);
+
+ return map.get(lev);
+ }
public List<Motion> generateMotion(Task task) {
List<Motion> motionList = new ArrayList<>();
@@ -94,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;
}
@@ -103,6 +110,11 @@
LiftProtocol liftProtocol = liftThread.getStatus();
if (liftProtocol == null || liftProtocol.getLiftNo() == null) {
+ return motionList;
+ }
+
+ BasConveyorSta basConveyorStaDest = basConveyorStaService.selectBySiteNo(task.getDestSite());
+ if (basConveyorStaDest == null) {
return motionList;
}
@@ -140,23 +152,27 @@
//绌挎杞﹀嚭鎻愬崌鏈哄緟鏈轰綅搴撲綅鍙�
String standbyLocNoFrom = shuttleStandbyFrom.getDeviceStandbyLoc();
+ //鎹㈠眰闇�瑕侀攣瀹氱殑璺緞
+ List<String> lockPath = shuttleStandbyFrom.getLockPath$();
+
// 鍏ュ簱鐩爣灞傛湁绌挎杞�
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(Integer.parseInt(task.getDestSite()));
- dto.setSync(0);//寮傛鎵ц
- }))
- ));
+// // 鎻愬崌鏈鸿浇璐хЩ鍔�
+// 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(
@@ -166,6 +182,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLocNo(standbyLocNoTo);
})),
MotionCtgType.SHUTTLE_MOVE
@@ -180,7 +197,7 @@
MotionCtgType.SHUTTLE_PALLET_LIFT
));
- // 绌挎杞﹁蛋琛岃嚦鐩爣搴撲綅
+ // 绌挎杞﹁浇璐ц蛋琛岃嚦鐩爣搴撲綅
motionList.addAll(kernelService.shuttleMove(
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
@@ -188,10 +205,12 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLiftNo(transferLiftDevice.getId().intValue());
dto.setLocNo(destLoc);
+// dto.setReleaseLift(2);//鎵ц涓噴鏀炬彁鍗囨満
})),
- MotionCtgType.SHUTTLE_MOVE
+ MotionCtgType.SHUTTLE_TRANSPORT
));
// 绌挎杞﹀叆搴撴墭鐩樹笅闄�
@@ -208,19 +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(Integer.parseInt(task.getDestSite()));
- }))
- ));
+// // 鎻愬崌鏈鸿浇璐хЩ鍔�
+// 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(
@@ -230,10 +251,20 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLiftNo(transferLiftDevice.getId().intValue());
dto.setLocNo(standbyLocNoTo);
})),
MotionCtgType.SHUTTLE_MOVE
+ ));
+
+ // 閿佸畾鎹㈠眰璺緞
+ motionList.addAll(kernelService.mapLockPath(
+ null,
+ MotionDto.build((dto -> {
+ dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setLocNo(JSON.toJSONString(lockPath));
+ }))
));
// 鎻愬崌鏈虹┖杞界Щ鍔ㄥ埌绌挎杞﹀眰
@@ -261,6 +292,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLiftNo(transferLiftDevice.getId().intValue());
dto.setLocNo(liftLocNoTo);
})),
@@ -313,6 +345,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLocNo(standbyLocNoFrom);
})),
MotionCtgType.SHUTTLE_MOVE_FROM_LIFT
@@ -327,6 +360,15 @@
}))
));
+ // 瑙i攣鎹㈠眰璺緞
+ motionList.addAll(kernelService.mapUnlockPath(
+ null,
+ MotionDto.build((dto -> {
+ dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setLocNo(JSON.toJSONString(lockPath));
+ }))
+ ));
+
// 绌挎杞﹀叆搴撻《鍗�
motionList.addAll(kernelService.shuttleAction(
null,
@@ -336,7 +378,7 @@
MotionCtgType.SHUTTLE_PALLET_LIFT
));
- // 绌挎杞﹁蛋琛岃嚦鐩爣搴撲綅
+ // 绌挎杞﹁浇璐ц蛋琛岃嚦鐩爣搴撲綅
motionList.addAll(kernelService.shuttleMove(
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
@@ -344,10 +386,11 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLiftNo(transferLiftDevice.getId().intValue());
dto.setLocNo(destLoc);
})),
- MotionCtgType.SHUTTLE_MOVE
+ MotionCtgType.SHUTTLE_TRANSPORT
));
// 绌挎杞﹀叆搴撴墭鐩樹笅闄�
@@ -402,6 +445,11 @@
return motionList;
}
+ BasConveyorSta basConveyorStaOrigin = basConveyorStaService.selectBySiteNo(task.getOriginSite());
+ if (basConveyorStaOrigin == null) {
+ return motionList;
+ }
+
//妫�娴嬬┛姊溅鏄惁鏈変换鍔$粦瀹�
boolean shuttleResult = Utils.checkShuttleHasBinding(shuttleDevice, task.getTaskNo());
if (shuttleResult) {
@@ -436,8 +484,11 @@
//绌挎杞﹀嚭鎻愬崌鏈哄緟鏈轰綅搴撲綅鍙�
String standbyLocNoFrom = shuttleStandbyFrom.getDeviceStandbyLoc();
- //绌挎杞﹀嚭鎻愬崌鏈哄悗灏忚溅寰呮満浣�
- String shuttleFromLiftStandbyLoc = shuttleStandbyFrom.getStandbyLoc();
+ //绌挎杞﹀嚭鎻愬崌鏈哄悗鍏ㄩ儴寰呮満浣�
+ String standbyLocs = shuttleStandbyFrom.getStandbyLoc();//鑾峰彇鍏ㄩ儴寰呮満浣�
+
+ //鎹㈠眰闇�瑕侀攣瀹氱殑璺緞
+ List<String> lockPath = shuttleStandbyFrom.getLockPath$();
//鑾峰彇鍑哄簱浠诲姟绫诲瀷
TaskCtg taskCtg = taskCtgService.getOne(new LambdaQueryWrapper<TaskCtg>()
@@ -455,6 +506,12 @@
return motionList;
}
+ //鍒嗘瀽鍑哄簱璺緞寰呮満搴撲綅
+ String lastPathStartLoc = shuttleDispatcher.analyzeOutPathWaitLoc(originLoc, standbyLocNoTo, shuttleDevice);
+ if (lastPathStartLoc == null) {
+ return motionList;//鏈垎鏋愭垚鍔�
+ }
+
/**
* 鍑哄簱
*/
@@ -470,6 +527,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLocNo(originLoc);
})),
MotionCtgType.SHUTTLE_MOVE
@@ -485,18 +543,36 @@
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(originLoc);
+ 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_MOVE
+ MotionCtgType.SHUTTLE_TRANSPORT_TO_CONVEYOR
));
// 绌挎杞﹀嚭搴撴墭鐩樹笅闄�
@@ -508,23 +584,7 @@
MotionCtgType.SHUTTLE_PALLET_DOWN
));
- // 鎻愬崌鏈鸿浇璐хЩ鍔�
- motionList.addAll(kernelService.liftMoveGoods(
- MotionDto.build((dto -> {
- dto.setLiftNo(transferLiftDevice.getId().intValue());
- dto.setLev(Utils.getLev(task.getOriginLoc()));
- dto.setStaNo(Integer.parseInt(task.getOriginSite()));//璧峰绔欑偣
- }))
- , MotionDto.build((dto -> {
- dto.setLiftNo(transferLiftDevice.getId().intValue());
- dto.setLev(1);//鍏夋嘲1灞傛槸杈撻�佺嚎灞�
- dto.setStaNo(31004);//鍑哄簱绔欑偣
- dto.setSync(0);//寮傛鎵ц
- dto.setReleaseLift(1);//鎵ц瀹屾垚鍚庨噴鏀炬彁鍗囨満
- }))
- ));
-
- // 绌挎杞︽彁鍗囨満寰呮満浣� - 鍒板緟鏈轰綅
+ // 绌挎杞︽彁鍗囨満寰呮満浣� - 鍒板緟鏈轰綅(鑷姩閫夋嫨鍚堥�傚緟鏈轰綅)
motionList.addAll(kernelService.shuttleMove(
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
@@ -532,23 +592,42 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
- dto.setLocNo(shuttleFromLiftStandbyLoc);
+ dto.setShuttleDevice(shuttleDevice);
+ dto.setLocNo(standbyLocs);
+ dto.setSync(0);//寮傛鎵ц
+ dto.setReleaseShuttle(1);//鎵ц瀹屾垚鍚庨噴鏀惧皬杞�
})),
- MotionCtgType.SHUTTLE_MOVE
+ MotionCtgType.SHUTTLE_MOVE_STANDBY
+ ));
+
+ // 鎻愬崌鏈鸿浇璐хЩ鍔�
+ motionList.addAll(kernelService.liftMoveGoods(
+ MotionDto.build((dto -> {
+ dto.setLiftNo(transferLiftDevice.getId().intValue());
+ dto.setLev(Utils.getLev(task.getOriginLoc()));
+ dto.setStaNo(getStaByLev(Utils.getLev(task.getOriginLoc())));//璧峰绔欑偣
+ }))
+ , MotionDto.build((dto -> {
+ dto.setLiftNo(transferLiftDevice.getId().intValue());
+ dto.setLev(1);//鍏夋嘲1灞傛槸杈撻�佺嚎灞�
+ dto.setStaNo(31001);//鍑哄簱绔欑偣
+ dto.setDevpNo(basConveyorStaOrigin.getConveyorDeviceId().intValue());
+ dto.setReleaseLift(1);//鎵ц瀹屾垚鍚庨噴鏀炬彁鍗囨満
+ }))
));
// 杈撻�佺嚎杩愯緭鑷冲嚭搴撳彛
- motionList.addAll(kernelService.conveyorOutbound(
- MotionDto.build((dto -> {
- dto.setDevpNo(basConveyorPath.getDeviceId().intValue());
- dto.setStaNo(basConveyorPath.getDeviceStn());
- })),
- MotionDto.build((dto -> {
- dto.setDevpNo(basConveyorPath.getDeviceId().intValue());
- dto.setStaNo(basConveyorPath.getStnNo());
- })),
- MotionCtgType.CONVEYOR_OUTBOUND
- ));
+// motionList.addAll(kernelService.conveyorOutbound(
+// MotionDto.build((dto -> {
+// dto.setDevpNo(basConveyorPath.getDeviceId().intValue());
+// dto.setStaNo(basConveyorPath.getDeviceStn());
+// })),
+// MotionDto.build((dto -> {
+// dto.setDevpNo(basConveyorPath.getDeviceId().intValue());
+// dto.setStaNo(basConveyorPath.getStnNo());
+// })),
+// MotionCtgType.CONVEYOR_OUTBOUND
+// ));
/**
* 浜屻�佸嚭搴撹捣濮嬪眰娌℃湁绌挎杞�
@@ -563,10 +642,20 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLiftNo(transferLiftDevice.getId().intValue());
dto.setLocNo(standbyLocNoTo);
})),
MotionCtgType.SHUTTLE_MOVE
+ ));
+
+ // 閿佸畾鎹㈠眰璺緞
+ motionList.addAll(kernelService.mapLockPath(
+ null,
+ MotionDto.build((dto -> {
+ dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setLocNo(JSON.toJSONString(lockPath));
+ }))
));
// 鎻愬崌鏈虹┖杞界Щ鍔ㄥ埌绌挎杞﹀眰
@@ -594,6 +683,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLiftNo(transferLiftDevice.getId().intValue());
dto.setLocNo(liftLocNoTo);
})),
@@ -646,6 +736,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLocNo(standbyLocNoFrom);
})),
MotionCtgType.SHUTTLE_MOVE_FROM_LIFT
@@ -660,6 +751,15 @@
}))
));
+ // 瑙i攣鎹㈠眰璺緞
+ motionList.addAll(kernelService.mapUnlockPath(
+ null,
+ MotionDto.build((dto -> {
+ dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setLocNo(JSON.toJSONString(lockPath));
+ }))
+ ));
+
// 绌挎杞︽彁鍗囨満寰呮満浣嶈嚦鍑哄簱搴撲綅
motionList.addAll(kernelService.shuttleMove(
MotionDto.build((dto -> {
@@ -669,6 +769,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLocNo(originLoc);
})),
MotionCtgType.SHUTTLE_MOVE
@@ -683,18 +784,36 @@
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(originLoc);
+ 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_MOVE
+ MotionCtgType.SHUTTLE_TRANSPORT_TO_CONVEYOR
));
// 绌挎杞﹀嚭搴撴墭鐩樹笅闄�
@@ -706,23 +825,7 @@
MotionCtgType.SHUTTLE_PALLET_DOWN
));
- // 鎻愬崌鏈鸿浇璐хЩ鍔�
- motionList.addAll(kernelService.liftMoveGoods(
- MotionDto.build((dto -> {
- dto.setLiftNo(transferLiftDevice.getId().intValue());
- dto.setLev(Utils.getLev(task.getOriginLoc()));
- dto.setStaNo(Integer.parseInt(task.getOriginSite()));//璧峰绔欑偣
- }))
- , MotionDto.build((dto -> {
- dto.setLiftNo(transferLiftDevice.getId().intValue());
- dto.setLev(1);//鍏夋嘲1灞傛槸杈撻�佺嚎灞�
- dto.setStaNo(31004);//鍑哄簱绔欑偣
- dto.setSync(0);//寮傛鎵ц
- dto.setReleaseLift(1);//鎵ц瀹屾垚鍚庨噴鏀炬彁鍗囨満
- }))
- ));
-
- // 绌挎杞︽彁鍗囨満寰呮満浣� - 鍒板緟鏈轰綅
+ // 绌挎杞︽彁鍗囨満寰呮満浣� - 鍒板緟鏈轰綅(鑷姩閫夋嫨鍚堥�傚緟鏈轰綅)
motionList.addAll(kernelService.shuttleMove(
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
@@ -730,23 +833,42 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
- dto.setLocNo(shuttleFromLiftStandbyLoc);
+ dto.setShuttleDevice(shuttleDevice);
+ dto.setLocNo(standbyLocs);
+ dto.setSync(0);//寮傛鎵ц
+ dto.setReleaseShuttle(1);//鎵ц瀹屾垚鍚庨噴鏀惧皬杞�
})),
- MotionCtgType.SHUTTLE_MOVE
+ MotionCtgType.SHUTTLE_MOVE_STANDBY
+ ));
+
+ // 鎻愬崌鏈鸿浇璐хЩ鍔�
+ motionList.addAll(kernelService.liftMoveGoods(
+ MotionDto.build((dto -> {
+ dto.setLiftNo(transferLiftDevice.getId().intValue());
+ dto.setLev(Utils.getLev(task.getOriginLoc()));
+ dto.setStaNo(getStaByLev(Utils.getLev(task.getOriginLoc())));//璧峰绔欑偣
+ }))
+ , MotionDto.build((dto -> {
+ dto.setLiftNo(transferLiftDevice.getId().intValue());
+ dto.setLev(1);//鍏夋嘲1灞傛槸杈撻�佺嚎灞�
+ dto.setStaNo(31001);//鍑哄簱绔欑偣
+ dto.setDevpNo(basConveyorStaOrigin.getConveyorDeviceId().intValue());
+ dto.setReleaseLift(1);//鎵ц瀹屾垚鍚庨噴鏀炬彁鍗囨満
+ }))
));
// 杈撻�佺嚎杩愯緭鑷冲嚭搴撳彛
- motionList.addAll(kernelService.conveyorOutbound(
- MotionDto.build((dto -> {
- dto.setDevpNo(basConveyorPath.getDeviceId().intValue());
- dto.setStaNo(basConveyorPath.getDeviceStn());
- })),
- MotionDto.build((dto -> {
- dto.setDevpNo(basConveyorPath.getDeviceId().intValue());
- dto.setStaNo(basConveyorPath.getStnNo());
- })),
- MotionCtgType.CONVEYOR_OUTBOUND
- ));
+// motionList.addAll(kernelService.conveyorOutbound(
+// MotionDto.build((dto -> {
+// dto.setDevpNo(basConveyorPath.getDeviceId().intValue());
+// dto.setStaNo(basConveyorPath.getDeviceStn());
+// })),
+// MotionDto.build((dto -> {
+// dto.setDevpNo(basConveyorPath.getDeviceId().intValue());
+// dto.setStaNo(basConveyorPath.getStnNo());
+// })),
+// MotionCtgType.CONVEYOR_OUTBOUND
+// ));
}
@@ -845,6 +967,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLocNo(chargeLocNo);
})),
MotionCtgType.SHUTTLE_MOVE
@@ -860,6 +983,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLocNo(standbyLocNoTo);
})),
MotionCtgType.SHUTTLE_MOVE
@@ -890,6 +1014,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLiftNo(transferLiftDevice.getId().intValue());
dto.setLocNo(liftLocNoTo);
})),
@@ -942,6 +1067,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLocNo(standbyLocNoFrom);
})),
MotionCtgType.SHUTTLE_MOVE_FROM_LIFT
@@ -963,6 +1089,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLocNo(chargeLocNo);
})),
MotionCtgType.SHUTTLE_MOVE
@@ -1031,6 +1158,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLocNo(locNo);
})),
MotionCtgType.SHUTTLE_MOVE
@@ -1085,6 +1213,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLocNo(locNo);
})),
MotionCtgType.SHUTTLE_MOVE
@@ -1113,6 +1242,9 @@
//绌挎杞﹀嚭鎻愬崌鏈哄緟鏈轰綅搴撲綅鍙�
String standbyLocNoFrom = liftDispatcher.getLiftStandByLocNo(liftThread, Utils.getLev(task.getDestLoc()));
+ //鎹㈠眰闇�瑕侀攣瀹氱殑璺緞
+ List<String> lockPath = liftDispatcher.getLockPathByLocNo(liftThread, Utils.getLev(task.getDestLoc()));
+
// 绌挎杞﹁蛋琛岃嚦鎻愬崌鏈哄簱浣嶅緟鏈轰綅
motionList.addAll(kernelService.shuttleMove(
@@ -1122,10 +1254,20 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLiftNo(liftDevice.getId().intValue());
dto.setLocNo(standbyLocNoTo);
})),
MotionCtgType.SHUTTLE_MOVE
+ ));
+
+ // 閿佸畾鎹㈠眰璺緞
+ motionList.addAll(kernelService.mapLockPath(
+ null,
+ MotionDto.build((dto -> {
+ dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setLocNo(JSON.toJSONString(lockPath));
+ }))
));
// 鎻愬崌鏈虹┖杞界Щ鍔ㄥ埌绌挎杞﹀眰
@@ -1153,6 +1295,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLiftNo(liftDevice.getId().intValue());
dto.setLocNo(liftLocNoTo);
})),
@@ -1205,6 +1348,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLocNo(standbyLocNoFrom);
})),
MotionCtgType.SHUTTLE_MOVE_FROM_LIFT
@@ -1218,6 +1362,15 @@
}))
));
+ // 瑙i攣鎹㈠眰璺緞
+ motionList.addAll(kernelService.mapUnlockPath(
+ null,
+ MotionDto.build((dto -> {
+ dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setLocNo(JSON.toJSONString(lockPath));
+ }))
+ ));
+
// 绌挎杞︽彁鍗囨満寰呮満浣嶈嚦鐩爣浣嶇疆
motionList.addAll(kernelService.shuttleMove(
MotionDto.build((dto -> {
@@ -1227,6 +1380,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(shuttleDevice.getId().intValue());
+ dto.setShuttleDevice(shuttleDevice);
dto.setLocNo(locNo);
})),
MotionCtgType.SHUTTLE_MOVE
@@ -1282,6 +1436,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(device.getId().intValue());
+ dto.setShuttleDevice(device);
dto.setLocNo(targetLoc);
})),
MotionCtgType.SHUTTLE_MOVE
@@ -1334,6 +1489,7 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(device.getId().intValue());
+ dto.setShuttleDevice(device);
dto.setLocNo(sourceLoc);
})),
MotionCtgType.SHUTTLE_MOVE
@@ -1347,7 +1503,7 @@
motion.setMotionCtg(MotionCtgType.SHUTTLE_PALLET_LIFT.val());
}));
- // 绌挎杞﹁蛋琛岃嚦鐩爣搴撲綅
+ // 绌挎杞﹁浇璐ц蛋琛岃嚦鐩爣搴撲綅
motionList.addAll(kernelService.shuttleMove(
MotionDto.build((dto -> {
dto.setShuttleNo(device.getId().intValue());
@@ -1355,9 +1511,10 @@
})),
MotionDto.build((dto -> {
dto.setShuttleNo(device.getId().intValue());
+ dto.setShuttleDevice(device);
dto.setLocNo(targetLoc);
})),
- MotionCtgType.SHUTTLE_MOVE
+ MotionCtgType.SHUTTLE_TRANSPORT
));
//鎵樼洏涓嬮檷
--
Gitblit v1.9.1