From ccbcfdb4241951a36c1d2fe1e0bca6e8b8deb719 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期一, 19 九月 2022 12:48:47 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/utils/Utils.java |   50 ++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 46 insertions(+), 4 deletions(-)

diff --git a/src/main/java/com/zy/asrs/utils/Utils.java b/src/main/java/com/zy/asrs/utils/Utils.java
index a708bfb..2fd4f42 100644
--- a/src/main/java/com/zy/asrs/utils/Utils.java
+++ b/src/main/java/com/zy/asrs/utils/Utils.java
@@ -2,6 +2,7 @@
 
 import com.core.common.Arith;
 import com.core.common.Cools;
+import com.zy.core.enums.SteABType;
 import com.zy.core.properties.SlaveProperties;
 
 import java.text.DecimalFormat;
@@ -36,9 +37,12 @@
         }
     }
 
-
     public static Integer getGroupRow(String locNo){
         int row = getRow(locNo);
+        return getGroupRow(row);
+    }
+
+    public static Integer getGroupRow(Integer row) {
         switch (row) {
             case 1:
             case 2:
@@ -72,9 +76,39 @@
         }
     }
 
-
-
-
+    public static SteABType selectAB(Integer row) {
+        switch (row) {
+            case 1:
+            case 2:
+            case 3:
+                return SteABType.B;
+            case 4:
+            case 5:
+            case 6:
+            case 7:
+                return SteABType.A;
+            case 8:
+            case 9:
+            case 10:
+            case 11:
+                return SteABType.B;
+            case 12:
+            case 13:
+            case 14:
+                return SteABType.A;
+            case 15:
+            case 16:
+            case 17:
+            case 18:
+                return SteABType.B;
+            case 19:
+            case 20:
+            case 21:
+                return SteABType.A;
+            default:
+                throw new RuntimeException("搴撲綅瑙f瀽寮傚父");
+        }
+    }
 
 
 
@@ -225,6 +259,14 @@
     }
 
     /**
+     * 閫氳繃鎺掑垪灞傛嫾鎺ュ嚭搴撲綅鍙�
+     */
+    public static String append(int row, int bay, int lev) {
+        return zerofill(String.valueOf(row), 2) + zerofill(String.valueOf(bay), 3) + zerofill(String.valueOf(lev), 2);
+    }
+
+
+    /**
      * 褰撴绱㈠埌鍙屾繁搴撲綅鐨勬祬搴撲綅鏃讹紝濡傛灉娣卞簱浣嶆棤璐э紝鍒欐斁鍏ュ搴旂殑娣卞簱浣�
      */
     public static void toDeepIfEmptyByShallow(String shallowLoc) {

--
Gitblit v1.9.1