From 036af8cd158f5768c83cd98ad6dd6256a22feec6 Mon Sep 17 00:00:00 2001 From: 龚焕茏 <2842157468@qq.com> Date: 星期五, 23 八月 2024 16:33:37 +0800 Subject: [PATCH] fix:调整 --- ycl-server/src/main/resources/mapper/zgyw/ReportMapper.xml | 23 ++++++++++------------- 1 files changed, 10 insertions(+), 13 deletions(-) diff --git a/ycl-server/src/main/resources/mapper/zgyw/ReportMapper.xml b/ycl-server/src/main/resources/mapper/zgyw/ReportMapper.xml index 9da4ca5..c97ca6c 100644 --- a/ycl-server/src/main/resources/mapper/zgyw/ReportMapper.xml +++ b/ycl-server/src/main/resources/mapper/zgyw/ReportMapper.xml @@ -9,7 +9,7 @@ <result column="update_time" property="updateTime" /> <result column="unit_id" property="unitId" /> <result column="people_id" property="peopleId" /> - <result column="point_id" property="pointId" /> + <result column="serial_number" property="serialNumber" /> <result column="auditing_time" property="auditingTime" /> <result column="report_content" property="reportContent" /> <result column="report_materials" property="reportMaterials" /> @@ -23,13 +23,13 @@ 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_point pt ON r.point_id = pt.id and pt.deleted = 0 - INNER JOIN ( + LEFT JOIN t_yw_point pt ON r.serial_number = pt.serial_number and pt.deleted = 0 + /* INNER JOIN ( SELECT identify,MAX(create_time) AS create_time FROM t_report WHERE deleted = 0 GROUP BY identify - ) as rr ON r.create_time = rr.create_time + ) as rr ON r.create_time = rr.create_time*/ WHERE r.deleted = 0 <if test="query.reportType != null and query.reportType != ''"> @@ -38,11 +38,8 @@ <if test="query.status != null"> AND r.status = #{query.status} </if> - <if test="query.pointId != null and query.pointId != ''"> - AND pt.point_name like concat('%', #{query.pointId}, '%') - </if> - <if test="query.peopleId != null and query.peopleId != ''"> - AND p.yw_person_name like concat('%', #{query.peopleId}, '%') + <if test="query.keyword != null and query.keyword != ''"> + AND (pt.point_name like concat('%', #{query.pointId}, '%') OR p.yw_person_name like concat('%', #{query.peopleId}, '%')) </if> ORDER BY r.update_time DESC </select> @@ -54,7 +51,7 @@ 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_point pt ON r.point_id = pt.id and pt.deleted = 0 + LEFT JOIN t_yw_point pt ON r.serial_number = pt.serial_number and pt.deleted = 0 INNER JOIN ( SELECT identify, create_time FROM t_report @@ -66,17 +63,17 @@ <select id="selectNumberList" resultType="java.lang.String"> SELECT yp.serial_number FROM t_report r - LEFT JOIN t_yw_point yp ON r.point_id = yp.id + LEFT JOIN t_yw_point yp ON r.serial_number = yp.serial_number WHERE r.status = #{status} AND #{date} between r.begin_create_time and r.end_create_time </select> <select id="checkPointReported" resultType="com.ycl.platform.domain.vo.ReportVO"> SELECT - r.id, r.errorType + r.id, r.error_type FROM t_report r - INNER JOIN t_yw_point yo ON r.point_id = yo.id AND yo.deleted = 0 + INNER JOIN t_yw_point yo ON r.serial_number = yo.serial_number AND yo.deleted = 0 INNER JOIN t_work_order wo ON yo.serial_number = wo.serial_number AND wo.serial_number = #{serialNumber} AND wo.deleted = 0 WHERE r.status = 1 -- Gitblit v1.8.0