From 39e8f88af6d3c07c183cda4e7c1d1b1c850209f5 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期四, 18 六月 2026 15:58:59 +0800
Subject: [PATCH] 生产报废、废品发货退货后、不合格处理报废的产品都要进到废品库

---
 src/main/resources/mapper/stock/StockUninventoryMapper.xml |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/main/resources/mapper/stock/StockUninventoryMapper.xml b/src/main/resources/mapper/stock/StockUninventoryMapper.xml
index b484666..1d3f3e9 100644
--- a/src/main/resources/mapper/stock/StockUninventoryMapper.xml
+++ b/src/main/resources/mapper/stock/StockUninventoryMapper.xml
@@ -103,6 +103,9 @@
             <if test="ew.type != null and ew.type != ''">
                 type = #{ew.type},
             </if>
+            <if test="ew.source != null and ew.source != ''">
+                source = #{ew.source},
+            </if>
             update_time = now()
         </set>
         where product_model_id = #{ew.productModelId}
@@ -131,7 +134,8 @@
         (su.qualitity - COALESCE(su.locked_quantity, 0)) as un_locked_quantity,
         pm.model,
         pm.unit,
-        p.product_name
+        p.product_name,
+        su.source
         <include refid="BaseWasteFromClause" />
         <where>
             <if test="ew.type != null and ew.type != ''">

--
Gitblit v1.9.3