From e0c8edd1d949fae5883a60019d02a9c5f7cb7a29 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期三, 18 三月 2026 09:08:18 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_宁夏_中盛建材' into dev_宁夏_中盛建材

---
 src/main/resources/mapper/production/ProductStructureMapper.xml |   29 +++++++++++++++++++----------
 1 files changed, 19 insertions(+), 10 deletions(-)

diff --git a/src/main/resources/mapper/production/ProductStructureMapper.xml b/src/main/resources/mapper/production/ProductStructureMapper.xml
index 995be50..f92a9d0 100644
--- a/src/main/resources/mapper/production/ProductStructureMapper.xml
+++ b/src/main/resources/mapper/production/ProductStructureMapper.xml
@@ -9,20 +9,29 @@
         <result property="unitQuantity" column="unit_quantity"/>
         <result property="demandedQuantity" column="demanded_quantity"/>
         <result property="unit" column="unit"/>
-        <result property="diskQuantity" column="disk_quantity"/>
         <result property="tenantId" column="tenant_id"/>
     </resultMap>
 
+    <select id="listByBomId" resultType="com.ruoyi.production.dto.ProductStructureDto">
+        SELECT ps.id,
+               ps.parent_id,
+               ps.bom_id,
+               ps.unit_quantity,
+               ps.process_id,
+               pp.name AS process_name
+        FROM product_structure ps
+                 LEFT JOIN product_process pp ON ps.process_id = pp.id
+        WHERE ps.bom_id = #{bomId}
+        ORDER BY ps.id
+    </select>
 
-
-    <select id="listByproductModelId" resultType="com.ruoyi.production.dto.ProductStructureDto">
+    <select id="listByBomAndProcess" resultType="com.ruoyi.production.dto.ProductStructureDto">
         select ps.*,
-        pm.speculative_trading_name ,
-        pp.name as  process_name
-        from
-        product_structure ps
-        left join product_model pm on ps.product_model_id = pm.id
-        left join product_process pp on ps.process_id = pp.id
-        where pm.id = #{productId}
+               pp.name as process_name
+        from product_structure ps
+                 left join product_process pp on ps.process_id = pp.id
+        where ps.bom_id = #{bomId}
+          and ps.process_id = #{processId}
+        order by ps.id
     </select>
 </mapper>

--
Gitblit v1.9.3