|
|
@@ -30,7 +30,7 @@
|
|
|
a.alarm_host_code as deviceCode,
|
|
|
a.iot_token as iotToken,
|
|
|
a.source, c.path
|
|
|
- from iot_alarm_subsystem a inner join sys_device d on (d.business_device_id = a.id) and d.device_status = 1 and d.del_flag=0
|
|
|
+ from iot_alarm_subsystem a inner join sys_device d on (d.business_device_id = a.id) and d.device_status = 1 and d.del_flag=0 and a.deleted=0
|
|
|
inner join sys_org c on a.org_id = c.id and c.deleted=0 and c.is_lock=0
|
|
|
UNION ALL
|
|
|
select a.id,
|
|
|
@@ -49,7 +49,7 @@
|
|
|
a.alarm_host_code as deviceCode,
|
|
|
a.iot_token as iotToken,
|
|
|
a.source, c.path
|
|
|
- from iot_alarm_subsystem a inner join sys_device d on (d.id=a.device_id) and d.device_status = 1 and d.del_flag=0
|
|
|
+ from iot_alarm_subsystem a inner join sys_device d on (d.id=a.device_id) and d.device_status = 1 and d.del_flag=0 and a.deleted=0
|
|
|
inner join sys_org c on a.org_id = c.id and c.deleted=0 and c.is_lock=0 ) t where 1= 1
|
|
|
<if test="request.checkSub==true">
|
|
|
and t.path like concat((select path from sys_org where id=#{request.orgId}), '%')
|