| | |
| | | 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 != ''"> |
| | |
| | | <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, |