|
|
@ -346,7 +346,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
select distinct hd.device_id,hd.device_code,hd.device_name,hd.device_type,hd.publish_time,hmu.monitor_unit_name
|
|
|
|
select distinct hd.device_id,hd.device_code,hd.device_name,hd.device_type,hd.publish_time,hmu.monitor_unit_name
|
|
|
|
from hw_device hd left join hw_monitor_unit hmu on hd.monitor_unit_id = hmu.monitor_unit_id
|
|
|
|
from hw_device hd left join hw_monitor_unit hmu on hd.monitor_unit_id = hmu.monitor_unit_id
|
|
|
|
where hd.device_status != '9' and hd.scene_id=#{sceneId}
|
|
|
|
where hd.device_status != '9' and hd.scene_id=#{sceneId}
|
|
|
|
and not exists (select 1 from hw_offline_target hot where hot.target_id=hd.device_id and hot.offline_rule_id = #{offlineRuleId})
|
|
|
|
and not exists (select 1 from hw_offline_target hot where hot.target_id=hd.device_id and hot.target_type = 1)
|
|
|
|
<if test="deviceCode != null and deviceCode != ''">
|
|
|
|
<if test="deviceCode != null and deviceCode != ''">
|
|
|
|
AND hd.device_code like concat('%', #{deviceCode}, '%')
|
|
|
|
AND hd.device_code like concat('%', #{deviceCode}, '%')
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|