From c2a5c9217c80fec859cdc9cb1bf9931887a077aa Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期一, 07 九月 2026 21:53:50 +0800
Subject: [PATCH] fix: 优化生产订单排序,库存查询报错问题

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

diff --git a/src/main/resources/mapper/production/ProductionOrderMapper.xml b/src/main/resources/mapper/production/ProductionOrderMapper.xml
index acade94..56a6b9e 100644
--- a/src/main/resources/mapper/production/ProductionOrderMapper.xml
+++ b/src/main/resources/mapper/production/ProductionOrderMapper.xml
@@ -134,7 +134,7 @@
         <include refid="ProductionOrderVoColumns" />
         <include refid="ProductionOrderVoFrom" />
         <include refid="ProductionOrderWhere" />
-        order by po.status  , po.plan_complete_time , po.nps_no desc
+        order by po.nps_no desc, po.status  , po.plan_complete_time
     </select>
 
     <select id="listProductionOrder" resultMap="ProductionOrderVoResultMap">
diff --git a/src/main/resources/mapper/stock/StockInventoryMapper.xml b/src/main/resources/mapper/stock/StockInventoryMapper.xml
index ed780a7..0e79e9d 100644
--- a/src/main/resources/mapper/stock/StockInventoryMapper.xml
+++ b/src/main/resources/mapper/stock/StockInventoryMapper.xml
@@ -222,7 +222,6 @@
         unit,
         product_name,
         product_id
-        order by combined.create_time desc
     </select>
 
     <select id="listStockInventoryExportData" resultType="com.ruoyi.stock.execl.StockInventoryExportData">

--
Gitblit v1.9.3