From 8957203bdb94c0119e9e86e56f5f0c82b5ce3869 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期一, 23 三月 2026 14:34:31 +0800
Subject: [PATCH] 产品需求汇总添加过滤条件
---
src/main/resources/mapper/productionPlan/ProductionPlanMapper.xml | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/main/resources/mapper/productionPlan/ProductionPlanMapper.xml b/src/main/resources/mapper/productionPlan/ProductionPlanMapper.xml
index 91a587e..f7a3f17 100644
--- a/src/main/resources/mapper/productionPlan/ProductionPlanMapper.xml
+++ b/src/main/resources/mapper/productionPlan/ProductionPlanMapper.xml
@@ -83,13 +83,14 @@
pp.height,
pm.unit AS unit,
COALESCE(SUM(pp.quantity),0) AS quantity,
- COALESCE(SUM(pp.volume),0) AS volume
+ COALESCE(SUM(pp.volume-pp.assigned_quantity),0) AS volume
FROM production_plan pp
LEFT JOIN product_material_sku sku
ON pp.product_material_sku_id = sku.id
LEFT JOIN product_material pm
ON sku.product_id = pm.id
- <where>
+ where
+ pp.status!=2
<if test="materialCode != null and materialCode != ''">
AND sku.material_code LIKE CONCAT('%', #{materialCode}, '%')
</if>
@@ -101,7 +102,6 @@
<if test="model != null and model != ''">
AND sku.model LIKE CONCAT('%', #{model}, '%')
</if>
- </where>
GROUP BY
sku.material_code,
pm.product_name,
--
Gitblit v1.9.3