From 4f5133a1aa9ae7842fa808be6d082a036e408f12 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期四, 02 七月 2026 17:09:20 +0800
Subject: [PATCH] 采购退货时,对应批次库存已被销售发货出去一批(比如销售发货时,选择的采购入库的批次库存,剩下38个,但采购退货时,可退货数量还是显示150个。)
---
src/main/resources/mapper/staff/StaffLeaveMapper.xml | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/main/resources/mapper/staff/StaffLeaveMapper.xml b/src/main/resources/mapper/staff/StaffLeaveMapper.xml
index 8bc9607..fef5c81 100644
--- a/src/main/resources/mapper/staff/StaffLeaveMapper.xml
+++ b/src/main/resources/mapper/staff/StaffLeaveMapper.xml
@@ -35,6 +35,7 @@
<if test="c.staffName != null and c.staffName != '' ">
AND soj.staff_name LIKE CONCAT('%',#{c.staffName},'%')
</if>
+ order by staff_leave.create_time desc
</select>
<select id="staffLeaveList" resultType="com.ruoyi.staff.dto.StaffLeaveDto">
SELECT
@@ -61,10 +62,12 @@
sys_post sp ON sp.post_id = soj.sys_post_id
LEFT JOIN
sys_dept sd ON sd.dept_id = soj.sys_dept_id
- where 1=1
- <if test="c.staffName != null and c.staffName != '' ">
- AND soj.staff_name LIKE CONCAT('%',#{c.staffName},'%')
- </if>
+ <where>
+ <if test="c.staffName != null and c.staffName != '' ">
+ AND soj.staff_name LIKE CONCAT('%',#{c.staffName},'%')
+ </if>
+ </where>
+ order by staff_leave.create_time desc
</select>
<select id="staffLeaveReasonAnalytics" resultType="com.ruoyi.staff.dto.StaffLeaveDto">
--
Gitblit v1.9.3