From 720f154250c5a9aff4ac3cf6a28e001ad038d7e9 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期五, 19 十一月 2021 14:10:20 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/utils/Utils.java             |    6 ++++--
 src/main/java/com/zy/common/model/Shelves.java         |    2 +-
 src/main/java/com/zy/common/service/CommonService.java |   24 +++++++++++++-----------
 3 files changed, 18 insertions(+), 14 deletions(-)

diff --git a/src/main/java/com/zy/asrs/utils/Utils.java b/src/main/java/com/zy/asrs/utils/Utils.java
index e80f7e5..5c5b739 100644
--- a/src/main/java/com/zy/asrs/utils/Utils.java
+++ b/src/main/java/com/zy/asrs/utils/Utils.java
@@ -112,7 +112,8 @@
         } else if (remainder == 3) {
             targetRow = row + 1;
         } else {
-            throw new RuntimeException(shallowLoc + "涓嶆槸娴呭簱浣嶏紝绯荤粺绻佸繖");
+            return shallowLoc;
+//            throw new RuntimeException(shallowLoc + "涓嶆槸娴呭簱浣嶏紝绯荤粺绻佸繖");
         }
         return zerofill(String.valueOf(targetRow), 2) + shallowLoc.substring(2);
     }
@@ -128,7 +129,8 @@
         } else if (remainder == 3) {
             targetRow = shallowRow + 1;
         } else {
-            throw new RuntimeException(shallowRow + "涓嶆槸娴呭簱浣嶆帓锛岀郴缁熺箒蹇�");
+            return shallowRow;
+//            throw new RuntimeException(shallowRow + "涓嶆槸娴呭簱浣嶆帓锛岀郴缁熺箒蹇�");
         }
         return targetRow;
     }
diff --git a/src/main/java/com/zy/common/model/Shelves.java b/src/main/java/com/zy/common/model/Shelves.java
index 8e0e2a9..313b6da 100644
--- a/src/main/java/com/zy/common/model/Shelves.java
+++ b/src/main/java/com/zy/common/model/Shelves.java
@@ -112,7 +112,7 @@
 
 
     public static void main(String[] args) throws InterruptedException {
-        Shelves shelves = new Shelves(8,2);
+        Shelves shelves = new Shelves(4,1);
         System.out.println(shelves.nodes.toString());
         int start = 1;
         while (true) {
diff --git a/src/main/java/com/zy/common/service/CommonService.java b/src/main/java/com/zy/common/service/CommonService.java
index 20fc60e..ebe039b 100644
--- a/src/main/java/com/zy/common/service/CommonService.java
+++ b/src/main/java/com/zy/common/service/CommonService.java
@@ -105,12 +105,12 @@
     public StartupDto getLocNo(Integer whsType, Integer staDescId, Integer sourceStaNo, boolean emptyMk, List<String> matNos, LocTypeDto locTypeDto, LocTypeDto oldLocType, int times) {
         StartupDto startupDto = new StartupDto();
         // 鐢熸垚宸ヤ綔鍙�
+        if (sourceStaNo == 103) {
+            whsType = 1;
+        } else if (sourceStaNo == 203) {
+            whsType = 2;
+        }
         int workNo = getWorkNo(0);
-//        if (locTypeDto.getLocType3() == 1) { // 杞昏揣淇″彿
-//            whsType = 2;    // 5 - 12 杞讳粨
-//        } else if (locTypeDto.getLocType3() == 2) { // 閲嶈揣淇″彿
-//            whsType = 1;    // 1 - 4 閲嶄粨
-//        }
         RowLastno rowLastno = rowLastnoService.selectById(whsType);
         if (Cools.isEmpty(rowLastno)) {
             throw new CoolException("鏁版嵁寮傚父锛岃鑱旂郴绠$悊鍛�");
@@ -192,15 +192,17 @@
                         if (curRow == 3 || curRow == 4) {
                             curRow = 3;
                         }
-                        if (curRow == 5 || curRow == 6) {
-                            curRow = 4;
-                        }
-                        if (curRow == 7 || curRow == 8) {
-                            curRow = 5;
-                        }
                         break;
                     }
                 }
+            } else if (whsType == 2) {
+                if (curRow == sRow) {
+                    curRow = eRow;
+                } else {
+                    curRow = sRow;
+                }
+                crnNo = whsType;
+                basCrnpService.checkSiteStatus(crnNo, true);
             }
         }
 

--
Gitblit v1.9.1