From cc8efc81d2d35bed40e47d0a5b0920a4b6f8095f Mon Sep 17 00:00:00 2001
From: guoyujie <guoyujie@ng.com>
Date: 星期四, 23 十月 2025 11:04:05 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override

---
 north-glass-erp/src/main/resources/mapper/mm/MaterialStore.xml |   38 +++++++++++++++++++++++++++++++++++++-
 1 files changed, 37 insertions(+), 1 deletions(-)

diff --git a/north-glass-erp/src/main/resources/mapper/mm/MaterialStore.xml b/north-glass-erp/src/main/resources/mapper/mm/MaterialStore.xml
index 51ffa8c..de24da0 100644
--- a/north-glass-erp/src/main/resources/mapper/mm/MaterialStore.xml
+++ b/north-glass-erp/src/main/resources/mapper/mm/MaterialStore.xml
@@ -6,6 +6,42 @@
 
     <select id="getSelectMaterialStore">
         select
+        m.id,m.type,m.json,m.create_time,bb.consume,bb.type as bomType,bb.price
+        from
+        mm.material_store m
+        left join sd.bom_base as bb on bb.material_id=m.id
+        <where>
+            <if test="materialStore.id != null and materialStore.id != ''">
+                and m.id regexp #{materialStore.id}
+            </if>
+            <if test="materialStore.type != null and materialStore.type != ''">
+                and m.type regexp #{materialStore.type}
+            </if>
+        </where>
+        order by m.id desc
+        limit #{offset},#{pageSize};
+    </select>
+
+    <select id="getSelectProductBOM">
+        select
+        m.id,m.type,m.json,m.create_time,bb.consume,bb.type as bomType,bb.price,bb.id as tabId
+        from
+        sd.bom_base as bb
+        left join   mm.material_store m on bb.material_id=m.id
+        <where>
+            <if test="materialStore.id != null and materialStore.id != ''">
+                and m.id regexp #{materialStore.id}
+            </if>
+            <if test="materialStore.type != null and materialStore.type != ''">
+                and m.type regexp #{materialStore.type}
+            </if>
+        </where>
+        order by m.id desc
+        limit #{offset},#{pageSize};
+    </select>
+
+    <select id="getSelectMaterialStores">
+        select
         *
         from
         mm.material_store m
@@ -17,7 +53,7 @@
                 and m.type regexp #{materialStore.type}
             </if>
         </where>
-        limit #{offset},#{pageSize};
+        order by m.id desc
     </select>
 
     <select id="getSelectMaterialStoreById">

--
Gitblit v1.8.0