This commit is contained in:
gongjiale 2024-12-02 14:30:41 +08:00
parent 326bbe8296
commit fc6255ded5
2 changed files with 4 additions and 4 deletions

View File

@ -242,7 +242,7 @@ select t.id,t. name,t.unit_no,t.system_no,t.status,t.sn,t.file_url,t.note,t.crea
LEFT JOIN th_device_deal d ON th_device_report.id = d.report_id
<where>
(th_device_report.zt='一级报警' or th_device_report.zt='二级报警')
<if test="deptId != null">
<if test="deptId != null and deptId != 228">
and th_device_report.sn IN (
SELECT td.sn
FROM th_device td
@ -330,7 +330,7 @@ select t.id,t. name,t.unit_no,t.system_no,t.status,t.sn,t.file_url,t.note,t.crea
<if test="endTime != null">and report_time &lt;= #{endTime,jdbcType=TIMESTAMP}</if>
<if test="sn != null">and th_device_report.sn= #{sn}</if>
<if test="name != null">and t.name like concat('%', #{name}, '%')</if>
<if test="deptId != null">and t.dept_id IN
<if test="deptId != null and deptId != 228">and t.dept_id IN
(SELECT dept_id
FROM sys_dept START WITH dept_id = #{deptId}
CONNECT BY PRIOR dept_id = parent_id)</if>