From 35188af778496c29dc74254df1e07f777b769620 Mon Sep 17 00:00:00 2001
From: LSH <1>
Date: 星期五, 17 五月 2024 10:15:57 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/utils/Utils.java |   40 +++++++++++++++++-----------------------
 1 files changed, 17 insertions(+), 23 deletions(-)

diff --git a/src/main/java/com/zy/asrs/utils/Utils.java b/src/main/java/com/zy/asrs/utils/Utils.java
index a45713b..2109368 100644
--- a/src/main/java/com/zy/asrs/utils/Utils.java
+++ b/src/main/java/com/zy/asrs/utils/Utils.java
@@ -1,5 +1,6 @@
 package com.zy.asrs.utils;
 
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
 import com.core.common.Arith;
 import com.core.common.Cools;
 import com.core.common.SpringUtils;
@@ -226,24 +227,17 @@
 //    }
 
     public static Integer GetWhsType(Integer sourceStaNo) {
-        switch (sourceStaNo){
-            case 104:
-            case 173:
-            case 174:
-            case 175:
-            case 130:
-            case 125:
-                return 5;
-            case 204:
-            case 273:
-            case 274:
-            case 275:
-            case 230:
-            case 225:
-                return 2;
-            default:
-                return 0;
+        RowLastnoService rowLastnoService = SpringUtils.getBean(RowLastnoService.class);
+        List<RowLastno> rowLastnos = rowLastnoService.selectList(new EntityWrapper<RowLastno>());
+        for (RowLastno rowLastno:rowLastnos){
+            String[] staNoList = rowLastno.getStaNoList().split(";");
+            for (String staNo : staNoList){
+                if (staNo.equals(sourceStaNo.toString())){
+                    return rowLastno.getWhsType();
+                }
+            }
         }
+        return 0;
     }
 
     public static boolean BooleanWhsTypeStaIoType(Integer whsType) {  //鏌ヨ鐩镐技鐗╂枡寮�鍏�
@@ -565,12 +559,12 @@
 
 
     /*
-    * 鏈�娣卞簱浣嶆帓鍙� 锛� curRow
-    * 鏈�娴呭簱浣嶆帓鍙� 锛� nearRow
-    * 鏈�娴呭簱浣嶅彿锛岀敤浜庨攣瀹氬垪銆佸眰 锛� nearRow
-    * 鍏ュ簱  true:pakin
-    * 鍑哄簱  false:pakin
-    * */
+     * 鏈�娣卞簱浣嶆帓鍙� 锛� curRow
+     * 鏈�娴呭簱浣嶆帓鍙� 锛� nearRow
+     * 鏈�娴呭簱浣嶅彿锛岀敤浜庨攣瀹氬垪銆佸眰 锛� nearRow
+     * 鍏ュ簱  true:pakin
+     * 鍑哄簱  false:pakin
+     * */
     // 澶栦晶鏂瑰悜鐨勮揣浣�  浼樺厛鍏ュ簱鏂瑰悜 ===>> 鍙嶄箣
     public static List<String> getGroupOutLocCrn(Integer curRow,Integer nearRow,String locNo,boolean pakin){
         List<String> result = new ArrayList<>();

--
Gitblit v1.9.1