From f4d4d29368ccacb807f93e2033cd4a643a3ddade Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期一, 30 三月 2026 10:20:28 +0800
Subject: [PATCH] yys 1.修改bug
---
src/main/resources/mapper/stock/StockInventoryMapper.xml | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/main/resources/mapper/stock/StockInventoryMapper.xml b/src/main/resources/mapper/stock/StockInventoryMapper.xml
index 79b08cd..a1f65b0 100644
--- a/src/main/resources/mapper/stock/StockInventoryMapper.xml
+++ b/src/main/resources/mapper/stock/StockInventoryMapper.xml
@@ -68,9 +68,12 @@
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 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.productModelId != null">
+ and pm.id = #{ew.productModelId}
</if>
</select>
<select id="listStockInventoryExportData" resultType="com.ruoyi.stock.execl.StockInventoryExportData">
@@ -91,15 +94,17 @@
</if>
</select>
<select id="stockInventoryPage" resultType="com.ruoyi.stock.dto.StockInRecordDto">
- select sir.*,si.qualitity,
+ select sir.*,si.qualitity as current_stock,
pm.model,
pm.unit,
- p.product_name
+ p.product_name,
+ su.nick_name as create_by
from
stock_in_record sir
left join stock_inventory si on sir.product_model_id = si.product_model_id
left join product_model pm on sir.product_model_id = pm.id
left join product p on pm.product_id = p.id
+ left join sys_user su on sir.create_user = su.user_id
<where>
<if test="ew.reportDate != null">
and sir.create_time >= #{ew.reportDate}
--
Gitblit v1.9.3