From b4a9e12e00b78e1aef8acda070434de9ffd0d66a Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期五, 24 四月 2026 15:29:19 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_New_pro' into dev_New_pro
---
src/main/resources/mapper/stock/StockUninventoryMapper.xml | 19 ++++++++++++++++++-
1 files changed, 18 insertions(+), 1 deletions(-)
diff --git a/src/main/resources/mapper/stock/StockUninventoryMapper.xml b/src/main/resources/mapper/stock/StockUninventoryMapper.xml
index b171ae2..70943e7 100644
--- a/src/main/resources/mapper/stock/StockUninventoryMapper.xml
+++ b/src/main/resources/mapper/stock/StockUninventoryMapper.xml
@@ -25,13 +25,24 @@
</if>
update_time = now()
</set>
- where product_model_id = #{ew.productModelId} and qualitity >= #{ew.qualitity}
+ where
+ product_model_id = #{ew.productModelId} and qualitity >= #{ew.qualitity}
+ <if test="ew.batchNo == null">
+ and batch_no is null
+ </if>
+ <if test="ew.batchNo != null">
+ and batch_no = #{ew.batchNo}
+ </if>
+
</update>
<update id="updateAddStockUnInventory">
update stock_uninventory
<set>
<if test="ew.qualitity != null">
qualitity = qualitity + #{ew.qualitity},
+ </if>
+ <if test="ew.lockedQuantity != null">
+ locked_quantity = locked_quantity + #{ew.lockedQuantity},
</if>
<if test="ew.version != null">
version = version + 1,
@@ -42,6 +53,12 @@
update_time = now()
</set>
where product_model_id = #{ew.productModelId}
+ <if test="ew.batchNo == null">
+ and batch_no is null
+ </if>
+ <if test="ew.batchNo != null">
+ and batch_no = #{ew.batchNo}
+ </if>
</update>
<select id="pageStockUninventory" resultType="com.ruoyi.stock.dto.StockUninventoryDto">
select su.id,
--
Gitblit v1.9.3