From 2c19f00b211b7ffb1a265d67991d92f2b194b1f5 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期一, 08 六月 2026 11:33:47 +0800
Subject: [PATCH] feat(financial): 新增凭证分录科目明细字段

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

diff --git a/src/main/resources/mapper/stock/StockInventoryMapper.xml b/src/main/resources/mapper/stock/StockInventoryMapper.xml
index 15d08b3..aaf33c9 100644
--- a/src/main/resources/mapper/stock/StockInventoryMapper.xml
+++ b/src/main/resources/mapper/stock/StockInventoryMapper.xml
@@ -506,7 +506,7 @@
         where si.product_model_id in
         <foreach collection="productModelIds" item="productModelId" open="(" separator="," close=")">
             #{productModelId}
-        </foreach>c
+        </foreach>
           and si.batch_no is not null
           and si.batch_no != ''
           and (si.qualitity - ifnull(si.locked_quantity, 0)) > 0
@@ -514,7 +514,7 @@
     </select>
     <select id="getByModelId" resultType="com.ruoyi.stock.dto.StockInventoryDto">
         select si.id, si.batch_no, si.locked_quantity, (si.qualitity - IFNULL(sd.qualitity, 0)) as qualitity,
-               p.product_name, pm.model, pm.unit
+               p.product_name, pm.model, pm.unit,si.create_time
         from stock_inventory si
                  left join (
                     select spd.stock_inventory_id, sum(spd.quantity) as qualitity
@@ -535,6 +535,7 @@
                  left join product p on pm.product_id = p.id
         where si.product_model_id = #{productModelId}
         and si.qualitity > IFNULL(sd.qualitity, 0)
+        order by si.create_time asc
     </select>
 
     <select id="getBatchNoQty" resultType="com.ruoyi.stock.dto.StockInventoryDto">

--
Gitblit v1.9.3