From 32e151c9022eb8b00a76bfff8ac66bbccee9b6b9 Mon Sep 17 00:00:00 2001
From: qlsxk <qlsxk@qq.com>
Date: 星期五, 26 九月 2025 14:11:12 +0800
Subject: [PATCH] #

---
 src/main/webapp/views/locMast/locMast.html                  |    5 -----
 src/main/java/com/zy/asrs/controller/LocMastController.java |    1 -
 src/main/resources/mapper/LocMastMapper.xml                 |    2 --
 src/main/webapp/views/stoMan/stoQue.html                    |    5 -----
 src/main/java/com/zy/common/service/CommonService.java      |   41 ++++++++++++++++++++++++++++++++++++-----
 5 files changed, 36 insertions(+), 18 deletions(-)

diff --git a/src/main/java/com/zy/asrs/controller/LocMastController.java b/src/main/java/com/zy/asrs/controller/LocMastController.java
index bbcb7e9..5a9fba3 100644
--- a/src/main/java/com/zy/asrs/controller/LocMastController.java
+++ b/src/main/java/com/zy/asrs/controller/LocMastController.java
@@ -64,7 +64,6 @@
         if (!Cools.isEmpty(orderByField)) {
             wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));
         }
-        wrapper.orderBy("loc_attribute",false);
         return R.ok(locMastService.selectPage(new Page<>(curr, limit), wrapper));
     }
 
diff --git a/src/main/java/com/zy/common/service/CommonService.java b/src/main/java/com/zy/common/service/CommonService.java
index fa5eb7c..e1761f0 100644
--- a/src/main/java/com/zy/common/service/CommonService.java
+++ b/src/main/java/com/zy/common/service/CommonService.java
@@ -175,6 +175,10 @@
             for (Integer row : locRowGroupDesc) {
                 String deepLocNo = Utils.getLocNo(row, Utils.getBay(locNo), Utils.getLev(locNo));
                 LocMast deepLoc = locMastService.selectById(deepLocNo);
+                if (deepLoc == null) {
+                    continue;
+                }
+
                 if (deepLoc.getLocSts().equals("F")) {
                     continue;
                 } else if (deepLoc.getLocSts().equals("O")) {
@@ -208,6 +212,10 @@
                     for (Integer row : locRowGroupDesc) {
                         String deepLocNo = Utils.getLocNo(row, Utils.getBay(locNo), Utils.getLev(locNo));
                         LocMast deepLoc = locMastService.selectById(deepLocNo);
+                        if (deepLoc == null) {
+                            continue;
+                        }
+
                         if (!deepLoc.getLocSts().equals("O")) {
                             flag = false;
                             break;
@@ -215,10 +223,16 @@
                     }
 
                     if (flag) {
-                        Integer firstRow = locRowGroupDesc.get(0);
-                        String deepLocNo = Utils.getLocNo(firstRow, Utils.getBay(locNo), Utils.getLev(locNo));
-                        LocMast deepLoc = locMastService.selectById(deepLocNo);
-                        targetLocMast = deepLoc;
+                        for (Integer row : locRowGroupDesc) {
+                            String deepLocNo = Utils.getLocNo(row, Utils.getBay(locNo), Utils.getLev(locNo));
+                            LocMast deepLoc = locMastService.selectById(deepLocNo);
+                            if (deepLoc == null) {
+                                continue;
+                            }
+
+                            targetLocMast = deepLoc;
+                            break;
+                        }
                         break;
                     }
                 }
@@ -245,6 +259,10 @@
             for (Integer row : locRowGroupDesc) {
                 String deepLocNo = Utils.getLocNo(row, Utils.getBay(locNo), Utils.getLev(locNo));
                 LocMast deepLoc = locMastService.selectById(deepLocNo);
+                if (deepLoc == null) {
+                    continue;
+                }
+
                 if (deepLoc.getLocSts().equals("F")) {
                     continue;
                 } else if (deepLoc.getLocSts().equals("O")) {
@@ -278,6 +296,10 @@
                     for (Integer row : locRowGroupDesc) {
                         String deepLocNo = Utils.getLocNo(row, Utils.getBay(locNo), Utils.getLev(locNo));
                         LocMast deepLoc = locMastService.selectById(deepLocNo);
+                        if (deepLoc == null) {
+                            continue;
+                        }
+
                         if (!deepLoc.getLocSts().equals("O")) {
                             flag = false;
                             break;
@@ -285,7 +307,16 @@
                     }
 
                     if (flag) {
-                        targetLocMast = locMast;
+                        for (Integer row : locRowGroupDesc) {
+                            String deepLocNo = Utils.getLocNo(row, Utils.getBay(locNo), Utils.getLev(locNo));
+                            LocMast deepLoc = locMastService.selectById(deepLocNo);
+                            if (deepLoc == null) {
+                                continue;
+                            }
+
+                            targetLocMast = deepLoc;
+                            break;
+                        }
                         break;
                     }
                 }
diff --git a/src/main/resources/mapper/LocMastMapper.xml b/src/main/resources/mapper/LocMastMapper.xml
index 23d2330..cafcb93 100644
--- a/src/main/resources/mapper/LocMastMapper.xml
+++ b/src/main/resources/mapper/LocMastMapper.xml
@@ -81,8 +81,6 @@
     and l.loc_no = d.loc_no
     and d.matnr = #{matnr}
     and l.lev1 = #{lev1}
-    and l.loc_attribute = 1
-    and l.loc_type1 = 1
     and l.loc_sts = 'F'
     </select>
 
diff --git a/src/main/webapp/views/locMast/locMast.html b/src/main/webapp/views/locMast/locMast.html
index cd4c937..9a4e6e4 100644
--- a/src/main/webapp/views/locMast/locMast.html
+++ b/src/main/webapp/views/locMast/locMast.html
@@ -65,11 +65,6 @@
             <input class="layui-input" type="text" name="group1" placeholder="缁�" autocomplete="off">
         </div>
     </div>
-    <div class="layui-inline">
-        <div class="layui-input-inline">
-            <input class="layui-input" type="text" name="loc_attribute" placeholder="娣辨祬搴撲綅鍙�" autocomplete="off">
-        </div>
-    </div>
     <!-- 寰呮坊鍔� -->
     <div id="data-search-btn" class="layui-btn-container layui-form-item" style="display: inline-block">
         <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">鎼滅储</button>
diff --git a/src/main/webapp/views/stoMan/stoQue.html b/src/main/webapp/views/stoMan/stoQue.html
index 86510b4..ab0863c 100644
--- a/src/main/webapp/views/stoMan/stoQue.html
+++ b/src/main/webapp/views/stoMan/stoQue.html
@@ -58,11 +58,6 @@
             <input class="layui-input" type="text" name="group1" placeholder="缁�" autocomplete="off">
         </div>
     </div>
-    <div class="layui-inline">
-        <div class="layui-input-inline">
-            <input class="layui-input" type="text" name="loc_attribute" placeholder="娣辨祬搴撲綅" autocomplete="off">
-        </div>
-    </div>
     <!-- 鏃ユ湡鑼冨洿 -->
     <div class="layui-inline" style="width: 300px">
         <div class="layui-input-inline">

--
Gitblit v1.9.1