From 7782a7e1191a0e98ffb20bca8b59248e98c556a8 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期五, 24 四月 2026 14:38:13 +0800
Subject: [PATCH] feat(stock): 添加库存位置功能支持

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

diff --git a/src/main/resources/mapper/stock/StockUninventoryMapper.xml b/src/main/resources/mapper/stock/StockUninventoryMapper.xml
index 3265879..db13390 100644
--- a/src/main/resources/mapper/stock/StockUninventoryMapper.xml
+++ b/src/main/resources/mapper/stock/StockUninventoryMapper.xml
@@ -10,6 +10,9 @@
         <result column="create_time" property="createTime" />
         <result column="update_time" property="updateTime" />
         <result column="version" property="version" />
+        <result column="remark" property="remark" />
+        <result column="locked_quantity" property="lockedQuantity" />
+        <result column="stock_location" property="stockLocation" />
     </resultMap>
     <update id="updateSubtractStockUnInventory">
         update stock_uninventory
@@ -53,6 +56,8 @@
         su.version,
         su.update_time,
         (su.qualitity - COALESCE(su.locked_quantity, 0)) as un_locked_quantity,
+        su.remark,
+        su.stock_location,
         pm.model,
         pm.unit,
         p.product_name
@@ -62,6 +67,9 @@
         where pm.product_type = #{ew.productType}
         <if test="ew.productName != null and ew.productName !=''">
             and p.product_name like concat('%',#{ew.productName},'%')
+        </if>
+        <if test="ew.stockLocation != null and ew.stockLocation != ''">
+            and su.stock_location = #{ew.stockLocation}
         </if>
     </select>
     <select id="listStockInventoryExportData" resultType="com.ruoyi.stock.execl.StockUnInventoryExportData">
@@ -76,6 +84,9 @@
         <if test="ew.productName != null and ew.productName !=''">
             and p.product_name like concat('%',#{ew.productName},'%')
         </if>
+        <if test="ew.stockLocation != null and ew.stockLocation != ''">
+            and su.stock_location = #{ew.stockLocation}
+        </if>
     </select>
 
 </mapper>

--
Gitblit v1.9.3