|
|
@@ -10,17 +10,17 @@
|
|
|
FROM
|
|
|
iot_alarm_data a
|
|
|
LEFT JOIN sys_org b ON a.org_id = b.id
|
|
|
- LEFT JOIN iot_device_info d ON a.device_id = d.id
|
|
|
- where 1=1 and d.deleted = 0
|
|
|
+ <if test="param.orgPath != null and param.orgPath != ''">
|
|
|
+ and b.path like concat(#{param.orgPath},'%')
|
|
|
+ </if>
|
|
|
+ LEFT JOIN iot_device_info d ON a.device_id = d.id and d.deleted = 0
|
|
|
+ where 1=1
|
|
|
<if test="param.deviceName != null and param.deviceName != ''">
|
|
|
and a.device_name like concat('%',#{param.deviceName},'%')
|
|
|
</if>
|
|
|
<if test="param.orgId != null and param.orgId != ''">
|
|
|
and a.org_id = #{param.orgId}
|
|
|
</if>
|
|
|
- <if test="param.orgPath != null and param.orgPath != ''">
|
|
|
- and b.path like concat(#{param.orgPath},'%')
|
|
|
- </if>
|
|
|
<if test="param.dataType != null">
|
|
|
and a.data_type = #{param.dataType}
|
|
|
</if>
|