From 47cbc59169b787e8a5f9c6969e2a0259c06249ca Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期五, 24 四月 2026 13:31:48 +0800
Subject: [PATCH] feat:库存管理成品/半成品/原材料
---
src/main/resources/mapper/stock/StockInventoryMapper.xml | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/main/resources/mapper/stock/StockInventoryMapper.xml b/src/main/resources/mapper/stock/StockInventoryMapper.xml
index c67d021..517a17d 100644
--- a/src/main/resources/mapper/stock/StockInventoryMapper.xml
+++ b/src/main/resources/mapper/stock/StockInventoryMapper.xml
@@ -84,7 +84,7 @@
p.product_name,
si.batch_no,
si.customer,
- rp.product_name AS root_product_name,
+ rp.product_type AS productScope,
si.production_date
FROM
stock_inventory si
@@ -108,11 +108,15 @@
<if test="ew.productScope != null and ew.productScope != ''">
<choose>
<when test="ew.productScope == '鎴愬搧'">
- AND rp.product_name = '鎴愬搧'
+ AND rp.product_type = '鎴愬搧'
</when>
- <otherwise>
- AND rp.product_name != '鎴愬搧'
- </otherwise>
+ <when test="ew.productScope == '鍗婃垚鍝�'">
+ AND rp.product_type = '鍗婃垚鍝�'
+ </when>
+ <when test="ew.productScope == '鍘熸潗鏂�'">
+ AND (rp.product_type IS NULL
+ OR (rp.product_type != '鎴愬搧' AND rp.product_type != '鍗婃垚鍝�'))
+ </when>
</choose>
</if>
</where>
--
Gitblit v1.9.3