From 2683793796366a4b6361baf4a16e5c65c8dce068 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期二, 21 四月 2026 16:05:03 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_New_pro' into dev_New_pro

---
 src/main/resources/mapper/production/ProductStructureMapper.xml |   23 ++++++++++++++++++-----
 1 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/src/main/resources/mapper/production/ProductStructureMapper.xml b/src/main/resources/mapper/production/ProductStructureMapper.xml
index df5a966..920db52 100644
--- a/src/main/resources/mapper/production/ProductStructureMapper.xml
+++ b/src/main/resources/mapper/production/ProductStructureMapper.xml
@@ -2,18 +2,16 @@
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.ruoyi.production.mapper.ProductStructureMapper">
 
-    <resultMap id="basicMap" type="com.ruoyi.production.pojo.ProductStructure">
+    <resultMap id="basicMap" type="com.ruoyi.production2.pojo.ProductStructure">
         <id property="id" column="id"/>
         <result property="productModelId" column="product_model_id"/>
         <result property="processId" column="process_id"/>
         <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="listByproductModelId" resultType="com.ruoyi.production.dto.ProductStructureDto">
+    <select id="listBybomId" resultType="com.ruoyi.production2.dto.ProductStructureDto">
         select ps.*,
                p.product_name,
                pp.name as  process_name,
@@ -24,7 +22,22 @@
                 left join product_model pm on ps.product_model_id = pm.id
                 left join product p on pm.product_id = p.id
                 left join product_process pp on ps.process_id = pp.id
-        where ps.parent_id = #{productModelId}
+        where ps.bom_id = #{bomId}
+        order by ps.id
+    </select>
+    <select id="listBybomAndProcess" resultType="com.ruoyi.production2.dto.ProductStructureDto">
+        select ps.*,
+               p.product_name,
+               pp.name as  process_name,
+               pm.product_id,
+               pm.model
+        from
+            product_structure ps
+                left join product_model pm on ps.product_model_id = pm.id
+                left join product p on pm.product_id = p.id
+                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