From c477506a6d672f71c6353608f3cf3424d8026790 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期一, 13 四月 2026 18:18:40 +0800
Subject: [PATCH] refactor(approve): 优化审批流程ID生成逻辑
---
src/main/resources/mapper/measuringinstrumentledger/MeasuringInstrumentLedgerMapper.xml | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/main/resources/mapper/measuringinstrumentledger/MeasuringInstrumentLedgerMapper.xml b/src/main/resources/mapper/measuringinstrumentledger/MeasuringInstrumentLedgerMapper.xml
index 505011f..266d8b0 100644
--- a/src/main/resources/mapper/measuringinstrumentledger/MeasuringInstrumentLedgerMapper.xml
+++ b/src/main/resources/mapper/measuringinstrumentledger/MeasuringInstrumentLedgerMapper.xml
@@ -15,7 +15,7 @@
next_date,
record_date,
CASE
- WHEN next_date >= DATE_FORMAT(now(),'%Y-%m-%d') THEN 1
+ WHEN DATE_ADD(most_date, INTERVAL IFNULL(cycle, 0) DAY) >= CURDATE() THEN 1
ELSE 2
END AS status,
create_user,
@@ -40,10 +40,10 @@
<if test="req.status != null">
<choose>
<when test="req.status == 1">
- AND next_date >= DATE_FORMAT(now(),'%Y-%m-%d')
+ AND DATE_ADD(most_date, INTERVAL IFNULL(cycle, 0) DAY) >= CURDATE()
</when>
<when test="req.status == 2">
- AND next_date < DATE_FORMAT(now(),'%Y-%m-%d')
+ AND DATE_ADD(most_date, INTERVAL IFNULL(cycle, 0) DAY) < CURDATE()
</when>
</choose>
</if>
@@ -56,4 +56,4 @@
</where>
ORDER BY update_time DESC
</select>
-</mapper>
\ No newline at end of file
+</mapper>
--
Gitblit v1.9.3