5-15 - fix
parent
6f808fa9b2
commit
a331c3967e
|
|
@ -22,14 +22,15 @@
|
||||||
left join department hfd on hfd.id = hfu.department_id
|
left join department hfd on hfd.id = hfu.department_id
|
||||||
left join user au on au.id = h.accept_user_id
|
left join user au on au.id = h.accept_user_id
|
||||||
|
|
||||||
left join safety_environmental_inspection i on i.inspection_id = h.foreign_key and i.status = 3
|
left join safety_environmental_inspection i on i.inspection_id = h.foreign_key and i.status = 3 and h.source in (2, 3)
|
||||||
left join key_project kp on kp.key_project_id = i.key_project_id
|
left join key_project kp on kp.key_project_id = i.key_project_id
|
||||||
left join ai_alarm aa on h.source = 1 and h.foreign_key = aa.id
|
left join ai_alarm aa on h.foreign_key = aa.id and h.source = 1
|
||||||
left join key_project kp2 on kp2.key_project_id = aa.key_project_id
|
left join key_project kp2 on kp2.key_project_id = aa.key_project_id
|
||||||
left join hidden_rectification_record hrr on hrr.hidden_id = h.hidden_id and hrr.delete_enum = 'FALSE'
|
left join hidden_rectification_record hrr on hrr.hidden_id = h.hidden_id and hrr.delete_enum = 'FALSE'
|
||||||
left join hidden_accept_record har on har.hidden_id = h.hidden_id and har.delete_enum = 'FALSE' and har.state = 1
|
left join hidden_accept_record har on har.hidden_id = h.hidden_id and har.delete_enum = 'FALSE' and har.state = 1
|
||||||
<where>
|
<where>
|
||||||
h.delete_enum = 'FALSE'
|
h.delete_enum = 'FALSE'
|
||||||
|
AND (h.source NOT IN (2, 3) OR i.inspection_id IS NOT NULL)
|
||||||
<if test="params.hiddenDesc != null and params.hiddenDesc != ''">
|
<if test="params.hiddenDesc != null and params.hiddenDesc != ''">
|
||||||
and h.hidden_desc LIKE CONCAT('%', #{params.hiddenDesc}, '%')
|
and h.hidden_desc LIKE CONCAT('%', #{params.hiddenDesc}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue