From 7ea8883ca6b47ec014a32ed57c3bea64544e893e Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期四, 19 三月 2026 17:09:34 +0800
Subject: [PATCH] feat: 生产订单绑定工艺路线、BOM、工艺路线、工序参数新增修改
---
src/main/resources/mapper/production/ProductMaterialSkuMapper.xml | 33 +++++++++++++++++++++++++++++++--
1 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/src/main/resources/mapper/production/ProductMaterialSkuMapper.xml b/src/main/resources/mapper/production/ProductMaterialSkuMapper.xml
index ccd26ed..678bb12 100644
--- a/src/main/resources/mapper/production/ProductMaterialSkuMapper.xml
+++ b/src/main/resources/mapper/production/ProductMaterialSkuMapper.xml
@@ -6,10 +6,10 @@
<resultMap id="ProductMaterialSkuResultMap" type="com.ruoyi.production.pojo.ProductMaterialSku">
<id property="id" column="id"/>
- <result property="materialId" column="material_id"/>
+ <result property="productId" column="product_id"/>
<result property="identifierCode" column="identifier_code"/>
<result property="materialCode" column="material_code"/>
- <result property="specification" column="specification"/>
+ <result property="model" column="model"/>
<result property="supplyType" column="supply_type"/>
<result property="originatorName" column="originator_name"/>
<result property="originatorOrg" column="originator_org"/>
@@ -19,4 +19,33 @@
<result property="updateTime" column="update_time"/>
</resultMap>
+ <select id="selectSkuWithMaterialPage" resultType="com.ruoyi.production.dto.ProductMaterialSkuDto">
+ SELECT
+ sku.id AS id,
+ sku.product_id AS productId,
+ sku.material_code AS materialCode,
+ sku.model AS model,
+ sku.supply_type AS supplyType,
+ m.product_name AS productName,
+ m.unit AS unit
+ FROM product_material_sku sku
+ LEFT JOIN product_material m ON sku.product_id = m.id
+ <where>
+ <if test="dto.productId != null">
+ AND sku.product_id = #{dto.productId}
+ </if>
+ <if test="dto.model != null and dto.model != ''">
+ AND sku.model LIKE CONCAT('%', #{dto.model}, '%')
+ </if>
+ <if test="dto.materialCode != null and dto.materialCode != ''">
+ AND sku.material_code LIKE CONCAT('%', #{dto.materialCode}, '%')
+ </if>
+
+ <if test="type != null and type == 1 and dto.productName != null and dto.productName != ''">
+ AND m.product_name LIKE CONCAT('%', #{dto.productName}, '%')
+ </if>
+ </where>
+ ORDER BY sku.id ASC
+ </select>
+
</mapper>
\ No newline at end of file
--
Gitblit v1.9.3