From 0617c5edd84b4b63047226797b066ac79426542e Mon Sep 17 00:00:00 2001
From: liyong <18434998025@163.com>
Date: 星期一, 11 五月 2026 16:19:20 +0800
Subject: [PATCH] refactor(stock): 优化盘点计划编辑功能的商品关联处理

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

diff --git a/src/main/resources/mapper/stock/StockInventoryMapper.xml b/src/main/resources/mapper/stock/StockInventoryMapper.xml
index 65c1c41..a71dcf6 100644
--- a/src/main/resources/mapper/stock/StockInventoryMapper.xml
+++ b/src/main/resources/mapper/stock/StockInventoryMapper.xml
@@ -66,12 +66,12 @@
     <update id="updateLocked">
         update stock_inventory
         set locked = #{locked}
-        where product_model_id = #{ew.productModelId}
+        where product_model_id = #{productModelId}
         <if test="batchNo == null">
             and batch_no is null
         </if>
             <if test="batchNo != null">
-                and batch_no = #{ew.batchNo}
+                and batch_no = #{batchNo}
             </if>
     </update>
     <select id="pagestockInventory" resultType="com.ruoyi.stock.dto.StockInventoryDto">
@@ -487,7 +487,7 @@
         from stock_inventory si
         left join product_model pm on si.product_model_id = pm.id
         left join product p on pm.product_id = p.id
-        where 1 = 1
+        where 1 = 1 and si.locked = 0
         <if test="ew.productName != null and ew.productName !=''">
             and p.product_name like concat('%',#{ew.productName},'%')
         </if>

--
Gitblit v1.9.3