From 91acbe8b56194bbd834b1169b5578de8a5ed442c Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期六, 14 三月 2026 17:53:10 +0800
Subject: [PATCH] fix: BOM产品查询调整、重命名字段
---
src/main/resources/mapper/production/ProductMaterialSkuMapper.xml | 28 ++++++++++++++--------------
1 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/src/main/resources/mapper/production/ProductMaterialSkuMapper.xml b/src/main/resources/mapper/production/ProductMaterialSkuMapper.xml
index 31720c9..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"/>
@@ -21,28 +21,28 @@
<select id="selectSkuWithMaterialPage" resultType="com.ruoyi.production.dto.ProductMaterialSkuDto">
SELECT
- sku.id AS skuId,
- sku.material_id AS materialId,
+ sku.id AS id,
+ sku.product_id AS productId,
sku.material_code AS materialCode,
- sku.specification AS specification,
+ sku.model AS model,
sku.supply_type AS supplyType,
- m.material_name AS materialName,
- m.base_unit AS baseUnit
+ m.product_name AS productName,
+ m.unit AS unit
FROM product_material_sku sku
- LEFT JOIN product_material m ON sku.material_id = m.id
+ LEFT JOIN product_material m ON sku.product_id = m.id
<where>
- <if test="dto.materialId != null">
- AND sku.material_id = #{dto.materialId}
+ <if test="dto.productId != null">
+ AND sku.product_id = #{dto.productId}
</if>
- <if test="dto.specification != null and dto.specification != ''">
- AND sku.specification LIKE CONCAT('%', #{dto.specification}, '%')
+ <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.materialName != null and dto.materialName != ''">
- AND m.material_name LIKE CONCAT('%', #{dto.materialName}, '%')
+ <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
--
Gitblit v1.9.3