From 1bbe6f787d58b768dce5370aa4e0d242c5e4b62d Mon Sep 17 00:00:00 2001
From: chenhj <1263187585@qq.com>
Date: 星期二, 21 四月 2026 17:26:53 +0800
Subject: [PATCH] Merge branch 'dev_New_pro' of http://114.132.189.42:9002/r/product-inventory-management-after into dev_New_pro

---
 src/main/resources/mapper/production/ProductStructureMapper.xml |   39 ++++++++++++++++++++++++++-------------
 1 files changed, 26 insertions(+), 13 deletions(-)

diff --git a/src/main/resources/mapper/production/ProductStructureMapper.xml b/src/main/resources/mapper/production/ProductStructureMapper.xml
index 5cd2deb..920db52 100644
--- a/src/main/resources/mapper/production/ProductStructureMapper.xml
+++ b/src/main/resources/mapper/production/ProductStructureMapper.xml
@@ -2,29 +2,42 @@
         "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.*,
-        pm.speculative_trading_name ,
-        pp.name as  process_name,
-        pm.product_id
+               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_process pp on ps.process_id = pp.id
-        where pm.id = #{productId}
+            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}
+        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