|
@@ -88,7 +88,7 @@
|
|
|
<sql id="sceneDeviceJoins">
|
|
|
inner join sms_scene_type t3 on t3.id = t1.scene_type_id and t3. status = 1
|
|
|
left join sms_device_scene t2 on t2.parent_scene_id=t1.id and t2. status = 1
|
|
|
- left join sms_device t4 on t2.device_id=t4.id and t4. status = 1 and t4. enable_state = 1
|
|
|
+ left join sms_device t4 on t2.device_id=t4.id and t4. status = 1
|
|
|
left join sms_device_parm t5 on t5.scene_id = t2.scene_id and t5.device_id=t2.device_id and t5. status = 1
|
|
|
<if test="type == 3 ">
|
|
|
and t5.is_suspension = 1
|
|
@@ -135,7 +135,7 @@
|
|
|
<sql id="deviceInnerJoins">
|
|
|
inner join sms_scene_type t3 on t1.scene_type_id=t3.id and t3. status = 1
|
|
|
inner join sms_device_scene t2 on t2.parent_scene_id=t1.id and t2. status = 1
|
|
|
- inner join sms_device t6 on t2.device_id=t6.id and t6. status = 1 and t6.enable_state = 1
|
|
|
+ inner join sms_device t6 on t2.device_id=t6.id and t6. status = 1
|
|
|
inner join sms_scene t4 on t2.scene_id=t4.id and t4. status = 1
|
|
|
inner join sms_scene_type t5 on t4.scene_type_id=t5.id and t5. status = 1
|
|
|
</sql>
|
|
@@ -143,7 +143,7 @@
|
|
|
<sql id="deviceLeftJoins">
|
|
|
inner join sms_scene_type t3 on t1.scene_type_id=t3.id and t3. status = 1
|
|
|
left join sms_device_scene t2 on t2.parent_scene_id=t1.id and t2. status = 1
|
|
|
- left join sms_device t6 on t2.device_id=t6.id and t6. status = 1 and t6.enable_state = 1
|
|
|
+ left join sms_device t6 on t2.device_id=t6.id and t6. status = 1
|
|
|
left join sms_scene t4 on t2.scene_id=t4.id and t4. status = 1
|
|
|
left join sms_scene_type t5 on t4.scene_type_id=t5.id and t5. status = 1 and t5.scene_type_name = #{sceneTypeName}
|
|
|
</sql>
|
|
@@ -318,7 +318,7 @@
|
|
|
from sms_scene t1
|
|
|
inner join sms_scene_type t3 on t3.id = t1.scene_type_id and t3. status = 1
|
|
|
inner join sms_alarm_details t6 on t1.id=t6.parent_scene_id and t6.`status`=1
|
|
|
- inner join sms_device t4 on t4.id=t6.device_id and t4.`status`=1 and t4. enable_state = 1
|
|
|
+ inner join sms_device t4 on t4.id=t6.device_id and t4.`status`=1
|
|
|
where t1.parent_scene_id = 0 and t1. status = 1 and t1. enable_state = 1 and t1.id = #{id}
|
|
|
<if test="sceneIds != null and sceneIds.size() > 0">
|
|
|
and t1.id in
|
|
@@ -852,7 +852,7 @@
|
|
|
from sms_scene t1
|
|
|
inner join sms_scene_type t3 on t3.id = t1.scene_type_id and t3. status = 1
|
|
|
inner join sms_alarm_details t6 on t1.id=t6.parent_scene_id and t6.`status`=1
|
|
|
- inner join sms_device t4 on t4.id=t6.device_id and t4.`status`=1 and t4. enable_state = 1
|
|
|
+ inner join sms_device t4 on t4.id=t6.device_id and t4.`status`=1
|
|
|
where t1.parent_scene_id = 0 and t1. status = 1 and t1. enable_state = 1 and t1.id = #{id}
|
|
|
<if test="sceneIds != null and sceneIds.size() > 0">
|
|
|
and t1.id in
|