From fec6c1c27cc4333f1f3b39bd09bd3f4cc201772b Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期日, 10 五月 2026 11:31:22 +0800
Subject: [PATCH] fix: 开票台账创建日期相同未保证排序
---
src/main/resources/mapper/production/ProductionProductMainMapper.xml | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/src/main/resources/mapper/production/ProductionProductMainMapper.xml b/src/main/resources/mapper/production/ProductionProductMainMapper.xml
index 133cfaf..ff9f34e 100644
--- a/src/main/resources/mapper/production/ProductionProductMainMapper.xml
+++ b/src/main/resources/mapper/production/ProductionProductMainMapper.xml
@@ -71,6 +71,14 @@
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>
+ and ppm.status = 1
+ and ifnull(ppo.quantity, 0) > 0
+ <if test="c.workOrderIds != null and c.workOrderIds.size() > 0">
+ and ppm.work_order_id in
+ <foreach collection="c.workOrderIds" item="workOrderId" open="(" separator="," close=")">
+ #{workOrderId}
+ </foreach>
+ </if>
<if test="c.nickName != null and c.nickName != ''">
and u.nick_name like concat('%',#{c.nickName},'%')
</if>
@@ -139,6 +147,14 @@
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>
+ and ppm.status = 1
+ and ifnull(ppo.quantity, 0) > 0
+ <if test="c.workOrderIds != null and c.workOrderIds.size() > 0">
+ and ppm.work_order_id in
+ <foreach collection="c.workOrderIds" item="workOrderId" open="(" separator="," close=")">
+ #{workOrderId}
+ </foreach>
+ </if>
<if test="c.workOrderId != null">
and ppm.work_order_id = #{c.workOrderId}
</if>
--
Gitblit v1.9.3