From 9af152509959409830bf542f147aca01d7616221 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期六, 02 八月 2025 13:48:41 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 36 ++++++++++++++++++++++++++++++++++--
1 files changed, 34 insertions(+), 2 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 3f01cfd..63ca0b6 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -386,6 +386,13 @@
return false;
}
+ //妫�娴嬫槸鍚﹀瓨鍦ㄧЩ鍔ㄤ换鍔�
+ WrkMast moveWorking = wrkMastService.selectShuttleHasMoveWorking(wrkMast.getShuttleNo());
+ if (moveWorking != null) {
+ News.taskInfo(wrkMast.getWrkNo(), "{}浠诲姟锛屽皬杞﹀瓨鍦ㄧЩ鍔ㄤ换鍔�", wrkMast.getWrkNo());
+ return false;
+ }
+
ShuttleAssignCommand assignCommand = new ShuttleAssignCommand();
assignCommand.setShuttleNo(shuttleProtocol.getShuttleNo()); // 鍥涘悜绌挎杞︾紪鍙�
assignCommand.setTaskMode(ShuttleTaskModeType.TRANSPORT.id);//灏忚溅绉诲簱浠诲姟
@@ -487,8 +494,22 @@
return false;
}
+ if (shuttleProtocol.getCurrentLocNo() == null) {
+ return false;
+ }
+
+ //鍒ゆ柇灏忚溅鏄惁鍒拌揪璐х墿搴撲綅
if (!shuttleProtocol.getCurrentLocNo().equals(wrkMast.getSourceLocNo())) {
+ //灏忚溅鏈埌杈惧彇璐т綅缃�
+ shuttleDispatchUtils.dispatchShuttle(wrkMast.getWrkNo(), wrkMast.getSourceLocNo(), wrkMast.getShuttleNo());//璋冨害灏忚溅鍒拌揣鐗╂墍鍦ㄥ簱浣嶈繘琛屽彇璐�
News.taskInfo(wrkMast.getWrkNo(), "{}浠诲姟锛屽皬杞︽湭鍒拌揪鍙栬揣浣嶇疆", wrkMast.getWrkNo(), wrkMast.getSourceLocNo());
+ return false;
+ }
+
+ //妫�娴嬫槸鍚﹀瓨鍦ㄧЩ鍔ㄤ换鍔�
+ WrkMast moveWorking = wrkMastService.selectShuttleHasMoveWorking(wrkMast.getShuttleNo());
+ if (moveWorking != null) {
+ News.taskInfo(wrkMast.getWrkNo(), "{}浠诲姟锛屽皬杞﹀瓨鍦ㄧЩ鍔ㄤ换鍔�", wrkMast.getWrkNo());
return false;
}
@@ -506,9 +527,10 @@
assignCommand.setTaskMode(ShuttleTaskModeType.TRANSPORT.id);//灏忚溅绉诲簱浠诲姟
assignCommand.setTaskNo(wrkMast.getWrkNo());//浠诲姟鍙�
assignCommand.setAuto(true);//鑷姩妯″紡
+ assignCommand.setLocNo(wrkMast.getLocNo());
//鑾峰彇灏忚溅鍒拌緭閫佺珯鐐硅璧板懡浠�
- List<ShuttleCommand> commands = shuttleOperaUtils.getStartToTargetCommands(wrkMast.getSourceLocNo(), wrkMast.getLocNo(), NavigationMapType.getDfxWithDevice(), assignCommand, shuttleThread);
+ List<ShuttleCommand> commands = shuttleOperaUtils.getStartToTargetCommands(wrkMast.getSourceLocNo(), wrkMast.getLocNo(), NavigationMapType.getMapTypes(NavigationMapType.DFX), assignCommand, shuttleThread);
if (commands == null) {
News.taskInfo(wrkMast.getWrkNo(), "{}浠诲姟锛寋}灏忚溅锛岃矾寰勮绠楀け璐�", wrkMast.getWrkNo(), shuttleProtocol.getShuttleNo());
return false;
@@ -1070,6 +1092,16 @@
//鍒ゆ柇褰撳墠灏忚溅鏄惁婊¤冻闇�瑕佸厖鐢佃姹�
if (!shuttleThread.isRequireCharge()) {
+ continue;
+ }
+
+ WrkMast wrkMast1 = wrkMastService.selectShuttleWorking(shuttleProtocol.getShuttleNo());
+ if (wrkMast1 != null) {
+ continue;
+ }
+
+ WrkMast wrkMast2 = wrkMastService.selectShuttleHasMoveWorking(shuttleProtocol.getShuttleNo());
+ if (wrkMast2 != null) {
continue;
}
@@ -1807,7 +1839,7 @@
assignCommand.setLocNo(wrkMast.getLocNo());//鐩爣搴撲綅
//鑾峰彇灏忚溅鍒扮洰鏍囧簱浣嶅懡浠�
- List<ShuttleCommand> commands = shuttleOperaUtils.getStartToTargetCommands(shuttleProtocol.getCurrentLocNo(), wrkMast.getLocNo(), NavigationMapType.getNormalWithDevice(), assignCommand, shuttleThread);
+ List<ShuttleCommand> commands = shuttleOperaUtils.getStartToTargetCommands(shuttleProtocol.getCurrentLocNo(), wrkMast.getLocNo(), NavigationMapType.getMapTypes(NavigationMapType.NORMAL), assignCommand, shuttleThread);
if (commands == null) {
News.taskInfo(wrkMast.getWrkNo(), "{}浠诲姟锛寋}灏忚溅锛岃矾寰勮绠楀け璐�", wrkMast.getWrkNo(), shuttleProtocol.getShuttleNo());
return false;//璺緞璁$畻澶辫触
--
Gitblit v1.9.1