From f641bad60c3c50f2bf66845252e73fa28ecaab67 Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期二, 10 九月 2024 13:19:08 +0800
Subject: [PATCH] #fs

---
 src/main/java/com/zy/asrs/utils/Utils.java |   43 +++++++++++++++++++++++++++++++------------
 1 files changed, 31 insertions(+), 12 deletions(-)

diff --git a/src/main/java/com/zy/asrs/utils/Utils.java b/src/main/java/com/zy/asrs/utils/Utils.java
index 31ebd6a..0f8c14a 100644
--- a/src/main/java/com/zy/asrs/utils/Utils.java
+++ b/src/main/java/com/zy/asrs/utils/Utils.java
@@ -1,9 +1,12 @@
 package com.zy.asrs.utils;
 
 import com.core.common.Arith;
+import com.core.common.Cools;
+import com.zy.core.properties.SlaveProperties;
 
-import java.math.BigDecimal;
 import java.text.DecimalFormat;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * Created by vincent on 2020/8/27
@@ -19,18 +22,34 @@
         return (float) Arith.multiplys(2, f, 1);
     }
 
-    public static String zerofill(String msg, Integer count){
-        if (msg.length() == count){
-            return msg;
-        } else if (msg.length() > count){
-            return msg.substring(0, 16);
-        } else {
-            StringBuilder msgBuilder = new StringBuilder(msg);
-            for (int i = 0; i<count-msg.length(); i++){
-                msgBuilder.insert(0,"0");
-            }
-            return msgBuilder.toString();
+    /**
+     * 閫氳繃搴撲綅鍙疯幏鍙� 鎺�
+     */
+    public static int getRow(String locNo) {
+        if (!Cools.isEmpty(locNo)) {
+            return Integer.parseInt(locNo.substring(0, 2));
         }
+        throw new RuntimeException("搴撲綅瑙f瀽寮傚父");
+    }
+
+    /**
+     * 閫氳繃搴撲綅鍙疯幏鍙� 鎺�
+     */
+    public static int getBay(String locNo) {
+        if (!Cools.isEmpty(locNo)) {
+            return Integer.parseInt(locNo.substring(2, 5));
+        }
+        throw new RuntimeException("搴撲綅瑙f瀽寮傚父");
+    }
+
+    /**
+     * 閫氳繃搴撲綅鍙疯幏鍙� 鎺�
+     */
+    public static int getLev(String locNo) {
+        if (!Cools.isEmpty(locNo)) {
+            return Integer.parseInt(locNo.substring(5, 7));
+        }
+        throw new RuntimeException("搴撲綅瑙f瀽寮傚父");
     }
 
 

--
Gitblit v1.9.1