From 54b83f755d687fbc87bd9c93ac459feccc7e12d1 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期三, 19 八月 2026 10:19:55 +0800
Subject: [PATCH] feat: 生产订单新增销售号查询

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

diff --git a/src/main/resources/mapper/production/ProductionOrderMapper.xml b/src/main/resources/mapper/production/ProductionOrderMapper.xml
index 8e64413..0028120 100644
--- a/src/main/resources/mapper/production/ProductionOrderMapper.xml
+++ b/src/main/resources/mapper/production/ProductionOrderMapper.xml
@@ -113,6 +113,9 @@
                 <if test="c.npsNo != null and c.npsNo != ''">
                     and po.nps_no like concat('%', #{c.npsNo}, '%')
                 </if>
+                <if test="c.salesContractNo != null and c.salesContractNo != ''">
+                    and po_sales.salesContractNo like concat('%', #{c.salesContractNo}, '%')
+                </if>
                 <if test="c.productionPlanIds != null and c.productionPlanIds != ''">
                     and po.production_plan_ids like concat('%', #{c.productionPlanIds}, '%')
                 </if>
@@ -134,7 +137,7 @@
         <include refid="ProductionOrderVoColumns" />
         <include refid="ProductionOrderVoFrom" />
         <include refid="ProductionOrderWhere" />
-        order by po.id desc
+        order by po.nps_no desc
     </select>
 
     <select id="listProductionOrder" resultMap="ProductionOrderVoResultMap">
@@ -232,7 +235,7 @@
                 and po.create_time &lt; #{endTime}
             </if>
         </where>
-        order by po.id desc
+        order by po.nps_no desc
         limit #{offset}, #{size}
     </select>
 

--
Gitblit v1.9.3