From 061977e873182b0c7249d02fe0253a291fa4e69d Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期五, 12 六月 2026 09:46:31 +0800
Subject: [PATCH] fix(customer): 修复客户数据查询中的空值问题并优化生产订单状态管理

---
 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