From 8f2e8522daf081ad4da027c39a776fdd9483b97e Mon Sep 17 00:00:00 2001 From: zxl <763096477@qq.com> Date: 星期一, 15 九月 2025 15:20:51 +0800 Subject: [PATCH] 新需求 --- ycl-server/src/main/resources/mapper/zgyw/ReportMapper.xml | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/ycl-server/src/main/resources/mapper/zgyw/ReportMapper.xml b/ycl-server/src/main/resources/mapper/zgyw/ReportMapper.xml index 92adff2..814d354 100644 --- a/ycl-server/src/main/resources/mapper/zgyw/ReportMapper.xml +++ b/ycl-server/src/main/resources/mapper/zgyw/ReportMapper.xml @@ -37,7 +37,7 @@ LEFT JOIN t_yw_point pt ON r.serial_number = pt.serial_number and pt.deleted = 0 INNER JOIN t_report_error_type ret ON ret.report_id = r.id and ret.deleted = 0 <if test="query.errorTypeList != null and query.errorTypeList.size() > 0"> AND ret.error_type in <foreach collection="query.errorTypeList" open="(" separator="," close=")" item="errorType">#{errorType}</foreach> - </if> + </if> WHERE r.deleted = 0 <if test="query.reportType != null and query.reportType != ''"> @@ -52,6 +52,15 @@ <if test="query.keyword != null and query.keyword != ''"> AND (pt.point_name like concat('%', #{query.keyword}, '%') OR p.yw_person_name like concat('%', #{query.keyword}, '%')) </if> + <if test="query.reportTimeStart != null and query.reportTimeEnd != null"> + AND r.create_time BETWEEN #{query.reportTimeStart} AND #{query.reportTimeEnd} + </if> + <if test="query.effectTimeStart != null"> + AND r.begin_create_time >= #{query.effectTimeStart} + </if> + <if test="query.effectTimeEnd != null"> + AND r.end_create_time <= #{query.effectTimeEnd} + </if> GROUP BY r.id, r.report_materials, r.create_time, r.report_type, r.report_content, r.status, r.serial_number, r.begin_create_time, -- Gitblit v1.8.0