From e9a90e489207e03936cf62dcda0494530fbebadb Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期二, 18 七月 2023 13:39:11 +0800
Subject: [PATCH] 判断输送站点是否有物,只有无物情况才能继续调度提升机
---
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 28 +++++++++++++++++-----------
1 files changed, 17 insertions(+), 11 deletions(-)
diff --git a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
index 42df8f9..95b3269 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -797,7 +797,7 @@
Short endStartCode = Short.parseShort(basDevp.getQrCodeValue());//绔欑偣浜岀淮鐮�
//澧炲姞绉诲姩杩涙彁鍗囨満鍛戒护
- ShuttleCommand moveCommand = shuttleThread.getMoveCommand(endStartCode, liftProtocol.getBarcode(), 1400, ShuttleRunDirection.TOP.id, null, null, 500);
+ ShuttleCommand moveCommand = shuttleThread.getMoveCommand(endStartCode, liftProtocol.getBarcode(), 1600, ShuttleRunDirection.TOP.id, null, null, 500);
commands.add(moveCommand);
//鍒嗛厤鐩爣搴撲綅
@@ -822,7 +822,7 @@
Short distCode = Short.parseShort(basDevp.getQrCodeValue());//鎻愬崌鏈哄彛绔欑偣浜岀淮鐮�
Short runDirection = ShuttleRunDirection.BOTTOM.id;//杩愯鏂瑰悜
//鑾峰彇鍛戒护
- ShuttleCommand moveCommand = shuttleThread.getMoveCommand(startCode, distCode, 1400, runDirection, null, null, 500);
+ ShuttleCommand moveCommand = shuttleThread.getMoveCommand(startCode, distCode, 1600, runDirection, null, null, 500);
commands.add(0, moveCommand);//灏嗚鎸囦护娣诲姞鍒伴槦澶�
assignCommand.setCommands(commands);
@@ -849,7 +849,7 @@
// Short distCode = Short.parseShort(basDevp.getQrCodeValue());//鎻愬崌鏈哄彛绔欑偣浜岀淮鐮�
// Short runDirection = ShuttleRunDirection.BOTTOM.id;//杩愯鏂瑰悜
// //鑾峰彇鍛戒护
-// ShuttleCommand moveCommand = shuttleThread.getMoveCommand(startCode, distCode, 1400, runDirection, startCode, 1400, 500);
+// ShuttleCommand moveCommand = shuttleThread.getMoveCommand(startCode, distCode, 1600, runDirection, startCode, 1600, 500);
// commands.add(0, moveCommand);//灏嗚鎸囦护娣诲姞鍒伴槦澶�
// }
// assignCommand.setCommands(commands);
@@ -872,7 +872,7 @@
// Short endStartCode = Short.parseShort(basDevp.getQrCodeValue());//绔欑偣浜岀淮鐮�
//
// //澧炲姞绉诲姩杩涙彁鍗囨満鍛戒护
-// ShuttleCommand moveCommand = shuttleThread.getMoveCommand(endStartCode, liftProtocol.getBarcode(), 1400, ShuttleRunDirection.TOP.id, endStartCode, 1400, 500);
+// ShuttleCommand moveCommand = shuttleThread.getMoveCommand(endStartCode, liftProtocol.getBarcode(), 1600, ShuttleRunDirection.TOP.id, endStartCode, 1600, 500);
// commands.add(moveCommand);
//
// //鍒嗛厤鐩爣搴撲綅
@@ -1262,7 +1262,7 @@
Short endStartCode = Short.parseShort(basDevp.getQrCodeValue());//绔欑偣浜岀淮鐮�
//澧炲姞绉诲姩杩涙彁鍗囨満鍛戒护
- ShuttleCommand moveCommand = shuttleThread.getMoveCommand(endStartCode, liftProtocol.getBarcode(), 1400, ShuttleRunDirection.TOP.id, null, null, 500);
+ ShuttleCommand moveCommand = shuttleThread.getMoveCommand(endStartCode, liftProtocol.getBarcode(), 1600, ShuttleRunDirection.TOP.id, null, null, 500);
commands.add(moveCommand);
//鐩爣搴撲綅
@@ -1303,7 +1303,7 @@
short startCode = liftProtocol.getBarcode();//鎻愬崌鏈哄唴閮ㄤ簩缁寸爜
Short distCode = commands.get(0).getStartCodeNum();//鐩爣浜岀淮鐮�
//鑾峰彇绉诲姩鍛戒护
- ShuttleCommand moveCommand = shuttleThread.getMoveCommand(startCode, distCode, 1400, commands.get(0).getRunDirection(), null, null, 500);
+ ShuttleCommand moveCommand = shuttleThread.getMoveCommand(startCode, distCode, 1600, commands.get(0).getRunDirection(), null, null, 500);
commands.add(0, moveCommand);//灏嗚鎸囦护娣诲姞鍒伴槦澶�
//鍒嗛厤鐩爣搴撲綅
@@ -1817,6 +1817,12 @@
//鍒ゆ柇鎻愬崌鏈烘槸鍚﹀埌浣�
StaProtocol staProtocol = devpThread.getStation().get(Utils.levToOutInStaNo(wrkMastLocNoLey >= 2 ? wrkMastLocNoLey + 1 : wrkMastLocNoLey));//璧峰绔欑偣
+ //鍒ゆ柇杈撻�佺珯鐐规槸鍚︽湁鐗╋紝鍙湁鏃犵墿鎯呭喌鎵嶈兘缁х画璋冨害鎻愬崌鏈�
+ if (staProtocol.isLoading()) {
+ //鏈夌墿绂佹璋冨害
+ continue;
+ }
+
if (liftLev != wrkMastLocNoLey && !staProtocol.isLiftArrival()) {
//鎻愬崌鏈轰笉鍦ㄥ伐浣滄。婧愬簱浣嶆ゼ灞傦紝璋冨害鎻愬崌鏈�
LiftCommand command1 = liftThread.getLiftUpDownCommand(liftProtocol.getLiftNo(), liftProtocol.getTaskNo(), wrkMastLocNoLey);
@@ -2787,7 +2793,7 @@
shuttleProtocol.setProtocolStatus(ShuttleProtocolStatusType.CHARGING);
assignCommand.setShuttleNo(shuttleProtocol.getShuttleNo());
- assignCommand.setTaskMode((short) 9);//鍏呯數
+ assignCommand.setTaskMode(ShuttleTaskModeType.CHARGE.id.shortValue());//鍏呯數
assignCommand.setTaskNo(wrkCharge.getWrkNo().shortValue());
assignCommand.setCharge(true);//鍏呯數浠诲姟
@@ -2825,13 +2831,13 @@
Short basDevpQrCode = Short.parseShort(basDevp.getQrCodeValue());//绔欑偣浜岀淮鐮�
//澧炲姞绉诲姩杩涙彁鍗囨満鍛戒护
- ShuttleCommand moveCommand = shuttleThread.getMoveCommand(basDevpQrCode, liftProtocol.getBarcode(), 1400, ShuttleRunDirection.TOP.id, basDevpQrCode, 1400, 500);
+ ShuttleCommand moveCommand = shuttleThread.getMoveCommand(basDevpQrCode, liftProtocol.getBarcode(), 1600, ShuttleRunDirection.TOP.id, basDevpQrCode, 1600, 500);
commands.add(moveCommand);
//鍒嗛厤鐩爣搴撲綅
shuttleProtocol.setLocNo(chargeLocNo);
assignCommand.setShuttleNo(shuttleProtocol.getShuttleNo());
- assignCommand.setTaskMode((short) 9);//鍏呯數
+ assignCommand.setTaskMode(ShuttleTaskModeType.CHARGE.id.shortValue());//鍏呯數
assignCommand.setTaskNo(wrkCharge.getWrkNo().shortValue());
assignCommand.setCharge(true);//鍏呯數浠诲姟
//鐩爣搴撲綅
@@ -2915,14 +2921,14 @@
Short distCode = Short.parseShort(basDevp.getQrCodeValue());//鎻愬崌鏈哄彛绔欑偣浜岀淮鐮�
Short runDirection = ShuttleRunDirection.BOTTOM.id;//杩愯鏂瑰悜
//鑾峰彇鍛戒护
- ShuttleCommand moveCommand = shuttleThread.getMoveCommand(startCode, distCode, 1400, runDirection, startCode, 1400, 500);
+ ShuttleCommand moveCommand = shuttleThread.getMoveCommand(startCode, distCode, 1600, runDirection, startCode, 1600, 500);
commands.add(0, moveCommand);//灏嗚鎸囦护娣诲姞鍒伴槦澶�
//杩涜鍏呯數涓�
shuttleProtocol.setProtocolStatus(ShuttleProtocolStatusType.CHARGING);
assignCommand.setShuttleNo(shuttleProtocol.getShuttleNo());
- assignCommand.setTaskMode((short) 9);//鍏呯數
+ assignCommand.setTaskMode(ShuttleTaskModeType.CHARGE.id.shortValue());//鍏呯數
assignCommand.setTaskNo(wrkCharge.getWrkNo().shortValue());
assignCommand.setCharge(true);//鍏呯數浠诲姟
--
Gitblit v1.9.1