From fea22e82e7e49691f6e0c20a29b228d0ab3173e9 Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期三, 29 十月 2025 17:08:38 +0800
Subject: [PATCH] 修改问题
---
ycl-server/src/main/resources/mapper/zgyw/ReportMapper.xml | 43 +++++++++++++++++++++++++++++++++++++++++--
1 files changed, 41 insertions(+), 2 deletions(-)
diff --git a/ycl-server/src/main/resources/mapper/zgyw/ReportMapper.xml b/ycl-server/src/main/resources/mapper/zgyw/ReportMapper.xml
index 1b7816b..814d354 100644
--- a/ycl-server/src/main/resources/mapper/zgyw/ReportMapper.xml
+++ b/ycl-server/src/main/resources/mapper/zgyw/ReportMapper.xml
@@ -16,6 +16,8 @@
<result column="report_content" property="reportContent" />
<result column="report_materials" property="reportMaterials" />
<result column="error_type" property="errorType" />
+ <result column="begin_create_time" property="beginCreateTime"/>
+ <result column="end_create_time" property="endCreateTime"/>
</resultMap>
<select id="page" resultType="com.ycl.platform.domain.vo.ReportVO">
@@ -31,11 +33,11 @@
FROM
t_report r
LEFT JOIN t_yw_unit u ON r.unit_id = u.id and u.deleted = 0
- LEFT JOIN t_yw_people p ON r.people_id = p.id and p.deleted = 0
+ LEFT JOIN t_yw_people p ON r.people_id = p.user_id and p.deleted = 0
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 != ''">
@@ -50,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,
@@ -61,6 +72,34 @@
ORDER BY r.update_time DESC
</select>
+ <select id="getListByGb" resultType="com.ycl.platform.domain.vo.ReportVO">
+ SELECT
+ DISTINCT
+ r.id,
+ r.report_materials,
+ r.create_time,
+ r.report_type,
+ r.report_content,
+ r.status,
+ r.serial_number as pointId,
+ r.begin_create_time,
+ r.end_create_time,
+ r.import_batch_number,
+ r.update_time,
+ u.unit_name,
+ p.yw_person_name as peopleName,
+ pt.point_name
+ FROM
+ t_report r
+ INNER JOIN t_report_error_type ret ON ret.report_id = r.id and ret.deleted = 0
+ LEFT JOIN t_yw_unit u ON r.unit_id = u.id and u.deleted = 0
+ LEFT JOIN t_yw_people p ON r.people_id = p.id and p.deleted = 0
+ LEFT JOIN t_yw_point pt ON r.serial_number = pt.serial_number and pt.deleted = 0
+ WHERE
+ r.serial_number = #{gb} AND r.deleted = 0
+ ORDER BY r.update_time DESC
+ </select>
+
<select id="examineRecord" resultMap="BaseResultMap">
SELECT
r.*, u.unit_name, p.yw_person_name as peopleName, pt.point_name, ar.result, ar.result_remark, ar.create_time as auditing_time
--
Gitblit v1.8.0