From 973b5221a85660b3b1e026e119256e35e95336ea Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期五, 13 三月 2026 16:31:58 +0800
Subject: [PATCH] fix: 产品规则返回命名修改
---
src/main/resources/mapper/productionPlan/ProductionPlanMapper.xml | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/src/main/resources/mapper/productionPlan/ProductionPlanMapper.xml b/src/main/resources/mapper/productionPlan/ProductionPlanMapper.xml
index de06cf1..7192a76 100644
--- a/src/main/resources/mapper/productionPlan/ProductionPlanMapper.xml
+++ b/src/main/resources/mapper/productionPlan/ProductionPlanMapper.xml
@@ -28,7 +28,6 @@
<result property="modifierName" column="modifier_name"/>
<result property="formCreatedTime" column="form_created_time"/>
<result property="formModifiedTime" column="form_modified_time"/>
- <result property="dataSyncType" column="data_sync_type"/>
<result property="dataSourceType" column="data_source_type"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
@@ -59,22 +58,27 @@
<if test="c.specification != null and c.specification != '' ">
AND pms.specification LIKE CONCAT('%',#{c.specification},'%')
</if>
+ <if test="c.applyNo != null and c.applyNo != '' ">
+ AND pp.apply_no LIKE CONCAT('%',#{c.applyNo},'%')
+ </if>
<if test="c.startDate != null">
AND pp.start_date >= DATE_FORMAT(#{c.startDate},'%Y-%m-%d')
</if>
<if test="c.endDate != null">
AND pp.end_date <= DATE_FORMAT(#{c.endDate},'%Y-%m-%d')
</if>
+ ORDER BY COALESCE(pp.form_modified_time, pp.id) DESC
</select>
<select id="selectSummaryByProductType" resultType="com.ruoyi.productionPlan.dto.ProductionPlanSummaryDto">
SELECT
- sku.material_code,
- pm.material_name AS product_name,
- sku.specification AS product_spec,
+ sku.material_code AS materialCode,
+ pm.material_name AS productName,
+ sku.specification AS specification,
pp.length,
pp.width,
pp.height,
+ pm.base_unit AS baseUnit,
COALESCE(SUM(pp.quantity),0) AS quantity,
COALESCE(SUM(pp.volume),0) AS volume
FROM production_plan pp
@@ -90,6 +94,10 @@
<if test="productName != null and productName != ''">
AND pm.material_name LIKE CONCAT('%', #{productName}, '%')
</if>
+
+ <if test="specification != null and specification != ''">
+ AND sku.specification LIKE CONCAT('%', #{specification}, '%')
+ </if>
</where>
GROUP BY
sku.material_code,
@@ -97,7 +105,8 @@
sku.specification,
pp.length,
pp.width,
- pp.height
+ pp.height,
+ pm.base_unit
</select>
<select id="selectWithMaterialByIds" resultType="com.ruoyi.productionPlan.dto.ProductionPlanDto">
--
Gitblit v1.9.3