From 61a22fc52fde9b2eb276f346dfd67fc57fc3a64f Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期五, 30 一月 2026 15:16:13 +0800
Subject: [PATCH] 日期筛选sql调整
---
src/main/resources/mapper/measuringinstrumentledger/MeasuringInstrumentLedgerMapper.xml | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/main/resources/mapper/measuringinstrumentledger/MeasuringInstrumentLedgerMapper.xml b/src/main/resources/mapper/measuringinstrumentledger/MeasuringInstrumentLedgerMapper.xml
index fc680d0..e4200af 100644
--- a/src/main/resources/mapper/measuringinstrumentledger/MeasuringInstrumentLedgerMapper.xml
+++ b/src/main/resources/mapper/measuringinstrumentledger/MeasuringInstrumentLedgerMapper.xml
@@ -15,14 +15,18 @@
next_date,
record_date,
CASE
- WHEN next_date >= DATE_FORMAT(now(),'%Y-%m-%d') THEN 1
+ WHEN most_date >= DATE_FORMAT(now(),'%Y-%m-%d') THEN 1
ELSE 2
END AS status,
create_user,
create_time,
update_user,
update_time,
- tenant_id
+ tenant_id,
+ unit,
+ dept_id,
+ instation_location,
+ cycle
FROM
measuring_instrument_ledger
<where>
@@ -36,10 +40,10 @@
<if test="req.status != null">
<choose>
<when test="req.status == 1">
- AND next_date >= DATE_FORMAT(now(),'%Y-%m-%d')
+ AND most_date >= DATE_FORMAT(now(),'%Y-%m-%d')
</when>
<when test="req.status == 2">
- AND next_date < DATE_FORMAT(now(),'%Y-%m-%d')
+ AND most_date < DATE_FORMAT(now(),'%Y-%m-%d')
</when>
</choose>
</if>
@@ -52,4 +56,4 @@
</where>
ORDER BY update_time DESC
</select>
-</mapper>
\ No newline at end of file
+</mapper>
--
Gitblit v1.9.3