From 436c0a68d698955d0d4eda827d398257b9e4dafc Mon Sep 17 00:00:00 2001
From: liyong <18434998025@163.com>
Date: 星期四, 16 四月 2026 15:56:00 +0800
Subject: [PATCH] fix(mapper): 修复销售台账和生产工单查询逻辑
---
src/main/resources/mapper/production/ProductWorkOrderMapper.xml | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/main/resources/mapper/production/ProductWorkOrderMapper.xml b/src/main/resources/mapper/production/ProductWorkOrderMapper.xml
index fef6bef..ab3911e 100644
--- a/src/main/resources/mapper/production/ProductWorkOrderMapper.xml
+++ b/src/main/resources/mapper/production/ProductWorkOrderMapper.xml
@@ -45,8 +45,8 @@
<if test="c.planStartTime != null and c.planEndTime != null">
and DATE(pwo.create_time) between #{c.planStartTime} and #{c.planEndTime}
</if>
- <if test="c.productOrderId != null and c.productOrderId != ''">
- and pwo.product_order_id = #{c.productOrderId}
+ <if test="c.productOrderNpsNo != null and c.productOrderNpsNo != ''">
+ and po.nps_no like concat('%',#{c.productOrderNpsNo},'%')
</if>
</select>
<select id="getProductWorkOrderFlowCard" resultType="com.ruoyi.production.dto.ProductWorkOrderDto">
@@ -87,4 +87,12 @@
actual_start_time >= #{startDate}
AND actual_start_time <= #{endDate}
</select>
+ <select id="selectMax" resultType="com.ruoyi.production.pojo.ProductWorkOrder">
+ SELECT SUBSTRING(work_order_no, 3) as work_order_no
+ FROM product_work_order
+ WHERE SUBSTRING(work_order_no, 3) like concat(#{datePrefix},'%')
+ order by work_order_no desc
+ limit 1
+ ;
+ </select>
</mapper>
--
Gitblit v1.9.3