From c65c2b5254add3b6975365df0be350cc99deae8c Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期三, 31 八月 2022 14:59:21 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/common/service/CommonService.java |   49 ++++++++++++++++---------------------------------
 1 files changed, 16 insertions(+), 33 deletions(-)

diff --git a/src/main/java/com/zy/common/service/CommonService.java b/src/main/java/com/zy/common/service/CommonService.java
index a7e31df..356d251 100644
--- a/src/main/java/com/zy/common/service/CommonService.java
+++ b/src/main/java/com/zy/common/service/CommonService.java
@@ -10,7 +10,6 @@
 import com.zy.asrs.utils.Utils;
 import com.zy.asrs.utils.VersionUtils;
 import com.zy.common.model.LocTypeDto;
-import com.zy.common.model.Shelves;
 import com.zy.common.model.StartupDto;
 import com.zy.common.properties.SlaveProperties;
 import lombok.extern.slf4j.Slf4j;
@@ -185,31 +184,31 @@
         if (null == locMast) {
             switch (whsType) {
                 case 1:
+                    if (curRow == 1) {
+                        curRow = 7;
+                    } else if (curRow == 7) {
+                        curRow = 1;
+                    }
                     crnNo = 1;
                     break;
                 case 2:
+                    if (curRow == 8) {
+                        curRow = 14;
+                    } else if (curRow == 14) {
+                        curRow = 8;
+                    }
                     crnNo = 2;
                     break;
                 case 3:
+                    if (curRow == 15) {
+                        curRow = 21;
+                    } else if (curRow == 21) {
+                        curRow = 15;
+                    }
                     crnNo = 3;
                     break;
                 default:
                     throw new CoolException("妫�绱㈠簱浣嶅け璐ワ紝璇疯仈绯荤鐞嗗憳");
-            }
-            Shelves shelves = new Shelves(rowCount, crn_qty);
-            for (int i = 0; i < shelves.group; i ++) {
-                curRow = shelves.start(curRow);
-                if (curRow < 0) {
-                    throw new CoolException("妫�绱㈠簱浣嶅け璐ワ紝璇疯仈绯荤鐞嗗憳");
-                }
-                Integer crnNo1 = shelves.get(curRow) + 1;
-                if (whsType != 1) {
-                    crnNo1 = whsType;
-                }
-                if (basCrnpService.checkSiteError(crnNo1, true)) {
-                    crnNo = crnNo1;
-                    break;
-                }
             }
         }
 
@@ -244,23 +243,7 @@
 
         // 1.褰撴绱㈠簱鎺掍负娴呭簱浣嶆帓鏃讹紝浼樺厛瀵绘壘褰撳墠搴撴帓鐨勬繁搴撲綅鎺�
         if (locMast == null) {
-            List<Integer> rows;
-            if (whsType == 2) {
-                rows = FIRST_GROUP_ROW_LIST;
-            } else if (whsType == 3) {
-                rows = SECOND_GROUP_ROW_LIST;
-            } else {
-                switch (curRow) {
-                    case 1:
-                        rows = FIRST_GROUP_ROW_LIST;
-                        break;
-                    case 2:
-                        rows = SECOND_GROUP_ROW_LIST;
-                        break;
-                    default:
-                        throw new CoolException("鍏ュ簱閫昏緫鏁呴殰銆�" + curRow + "銆�");
-                }
-            }
+            List<Integer> rows = Utils.getGroupLoc(curRow);
 
             locMast = locMastService.queryFreeLocMast(null, rows, locTypeDto.getLocType1());
             // 鍥犲簱浣嶇Щ杞�侀渶棰勭暀绌哄簱浣�

--
Gitblit v1.9.1