From 1e123568c2f561013f5636e45dc0db30b17a3517 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期四, 10 九月 2026 16:39:26 +0800
Subject: [PATCH] feat(basic): 添加产品条码功能并完善生产统计报表

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

diff --git a/src/main/resources/mapper/stock/StockInventoryMapper.xml b/src/main/resources/mapper/stock/StockInventoryMapper.xml
index 0e79e9d..f494732 100644
--- a/src/main/resources/mapper/stock/StockInventoryMapper.xml
+++ b/src/main/resources/mapper/stock/StockInventoryMapper.xml
@@ -84,6 +84,10 @@
         <if test="ew.productName != null and ew.productName !=''">
             and p.product_name like concat('%',#{ew.productName},'%')
         </if>
+        <if test="ew.warnOnly != null and ew.warnOnly">
+            and COALESCE(si.warn_num, 0) &gt; 0
+            and (si.qualitity - COALESCE(si.locked_quantity, 0)) &lt;= si.warn_num
+        </if>
     </select>
 
     <select id="pageListCombinedStockInventory" resultType="com.ruoyi.stock.dto.StockInventoryDto">

--
Gitblit v1.9.3