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 |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/main/resources/mapper/stock/StockInventoryMapper.xml b/src/main/resources/mapper/stock/StockInventoryMapper.xml
index 6ca5bf7..aaf33c9 100644
--- a/src/main/resources/mapper/stock/StockInventoryMapper.xml
+++ b/src/main/resources/mapper/stock/StockInventoryMapper.xml
@@ -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