From 72a32c227fdf10f34fe563a7de35169da5729eea Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期二, 07 七月 2026 15:50:31 +0800
Subject: [PATCH] Merge branch 'dev_New_pro' into dev_平遥县盛达铸造厂
---
src/main/resources/mapper/stock/StockInventoryMapper.xml | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/main/resources/mapper/stock/StockInventoryMapper.xml b/src/main/resources/mapper/stock/StockInventoryMapper.xml
index ed780a7..ac9c49b 100644
--- a/src/main/resources/mapper/stock/StockInventoryMapper.xml
+++ b/src/main/resources/mapper/stock/StockInventoryMapper.xml
@@ -352,7 +352,11 @@
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 (
+ select product_model_id, sum(qualitity) as qualitity
+ from stock_inventory
+ group by product_model_id
+ ) 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
--
Gitblit v1.9.3