From f568916d4fc630a6c26a4de74d6a6853d87ef114 Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期五, 09 十月 2026 21:01:52 +0800
Subject: [PATCH] feat: 更新查询顺序以首先显示多个服务和映射器中的最新记录

---
 src/main/resources/mapper/production/ProductionProductMainMapper.xml |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/main/resources/mapper/production/ProductionProductMainMapper.xml b/src/main/resources/mapper/production/ProductionProductMainMapper.xml
index a122e90..ff9fda8 100644
--- a/src/main/resources/mapper/production/ProductionProductMainMapper.xml
+++ b/src/main/resources/mapper/production/ProductionProductMainMapper.xml
@@ -22,8 +22,7 @@
         pm.model as productModelName,
         ppo.quantity,
         ppo.scrap_qty,
-        pm.unit,
-        sl.sales_contract_no salesContractNo
+        pm.unit
         from
         production_product_main ppm
         left join product_work_order pwo on pwo.id = ppm.work_order_id
@@ -33,7 +32,6 @@
         left join production_product_output ppo on ppm.id = ppo.product_main_id
         left join product_model pm on pm.id = ppo.product_model_id
         left join product p on p.id = pm.product_id
-        left join sales_ledger sl on sl.id = po.sales_ledger_id
         left join sys_user u on u.user_id = ppm.user_id
         <where>
             <if test="c.nickName != null and c.nickName != ''">
@@ -49,7 +47,7 @@
                 and ppm.status = #{c.status}
             </if>
         </where>
-        order by ppm.id
+        order by ppm.create_time desc, ppm.id desc
 
     </select>
     <select id="getOrderByMainId" resultType="com.ruoyi.production.pojo.ProductOrder">

--
Gitblit v1.9.3