From 9f095733d13185290cfedd242b5f299585fbcad0 Mon Sep 17 00:00:00 2001
From: Junjie <xjj@123>
Date: 星期一, 07 四月 2025 10:05:34 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/service/impl/AgvLocMastServiceImpl.java | 77 +++++++++++++++++++++++++++++++-------
1 files changed, 63 insertions(+), 14 deletions(-)
diff --git a/src/main/java/com/zy/asrs/service/impl/AgvLocMastServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/AgvLocMastServiceImpl.java
index e67221b..9df60a7 100644
--- a/src/main/java/com/zy/asrs/service/impl/AgvLocMastServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/AgvLocMastServiceImpl.java
@@ -33,20 +33,20 @@
public void initLocFloor3() {
- //3妤� 1-33鎺� 1-14鍒� 8灞�
- this.insertBatch(getLocMastList(1, 33, 1, 14, 1, 8, 3));
+ //3妤� 1-33鎺� 1-14鍒� 8灞� ------> 1-33鎺� 1-17鍒� 8灞�
+// this.insertBatch(getLocMastList(1, 33, 1, 17, 1, 8, 3));
+//
+// //3妤� 1-27鎺� 15-34鍒� 8灞� ------> 1-26鎺� 18-25鍒� 8灞�
+// this.insertBatch(getLocMastList(1, 27, 18, 25, 1, 8, 3));
+//
+// //3妤� 1-25鎺� 35-46鍒� 8灞� ------> 1-25鎺� 26-35鍒� 8灞�
+// this.insertBatch(getLocMastList(1, 25, 26, 35, 1, 8, 3));
+//
+// //3妤� 3-25鎺� 47-60鍒� 8灞� ------> 1-23鎺� 36-70鍒� 8灞�
+// this.insertBatch(getLocMastList(1, 23, 36, 70, 1, 8, 3));
- //3妤� 1-27鎺� 15-34鍒� 8灞�
- this.insertBatch(getLocMastList(1, 27, 15, 34, 1, 8, 3));
-
- //3妤� 1-25鎺� 35-46鍒� 8灞�
- this.insertBatch(getLocMastList(1, 25, 35, 46, 1, 8, 3));
-
- //3妤� 3-25鎺� 47-60鍒� 8灞�
- this.insertBatch(getLocMastList(3, 25, 47, 60, 1, 8, 3));
-
- //3妤� 4-25鎺� 61-70鍒� 8灞�
- this.insertBatch(getLocMastList(4, 25, 61, 70, 1, 8, 3));
+ //3妤� 3-23鎺� 71-72鍒� 8灞�
+ this.insertBatch(getLocMastList(3, 23, 71, 72, 1, 8, 3));
}
@@ -57,6 +57,22 @@
for(int row=rowIndex; row<=rowMax; row++) {
for (int bay = bayIndex; bay <= bayMax; bay++) {
for (int lev = levIndex; lev <= levMax; lev++) {
+
+ if(!checkLocExist(row,bay,floor)){
+ continue;
+ }
+
+// if(floor == 1 && (row == 8 || row == 9)){
+// if((bay >=8 && bay <=11)
+// || (bay >= 20 && bay <=23)
+// || (bay>=37 && bay <=39)
+// || (bay>=50 && bay <=52)
+// || (bay>=63 && bay <=64)
+// || (bay>=79 && bay <=80)){
+// continue;
+// }
+// }
+
AgvLocMast loc = new AgvLocMast();
String locRow = row < 10 ? "-00" + row : "-0" + row;
String locBay = bay < 10 ? "-00" + bay : "-0" + bay;
@@ -79,6 +95,38 @@
return agvLocMastList;
}
+ private boolean checkLocExist(int row, int bay, int floor){
+ if(floor == 1 && (row == 8 || row == 9)){
+ if((bay >=8 && bay <=11)
+ || (bay >= 20 && bay <=23)
+ || (bay>=37 && bay <=39)
+ || (bay>=50 && bay <=52)
+ || (bay>=63 && bay <=64)
+ || (bay>=79 && bay <=80)){
+ return false;
+ }
+ }
+
+ if(floor == 3){
+ if(row == 1 && bay > 63){
+ return false;
+ }
+ if(row == 2 && bay > 65){
+ return false;
+ }
+ if(row > 23 && bay == 1){
+ return false;
+ }
+
+ if(bay > 35 && bay < 39){
+ if(row == 4 || row == 5 || row == 10 || row == 11 || row == 17 || row == 18){
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
@Override
public List<AgvLocMast> queryFreeLocMast2(Short locType1, Integer rowBeg, Integer rowEnd, Integer bayBeg, Integer bayEnd, Integer levBeg, Integer levEnd) {
return this.baseMapper.queryFreeLocMast2(locType1, rowBeg, rowEnd, bayBeg, bayEnd, levBeg, levEnd);
@@ -89,9 +137,10 @@
this.baseMapper.updateLocType2(locType2,locRule.getRowBeg(),locRule.getRowEnd(),locRule.getBayBeg(),locRule.getBayEnd(),locRule.getLevBeg(),locRule.getLevEnd(),locRule.getFloor());
}
- public void updateLocStsByLocNo(String locNo, String locSts) {
+ public void updateLocStsByLocNo(String locNo, String locSts, String barcode) {
AgvLocMast agvLocMast = this.selectById(locNo);
agvLocMast.setLocSts(locSts);
+ agvLocMast.setBarcode(barcode);
this.updateById(agvLocMast);
}
--
Gitblit v1.9.1