物联设备优化
This commit is contained in:
parent
943ceb565a
commit
c24db81f7e
|
|
@ -149,6 +149,10 @@ public class CameraInfo implements Serializable {
|
|||
/**护理单元*/
|
||||
@ApiModelProperty(value = "护理单元")
|
||||
private String nuName;
|
||||
/**区域属性*/
|
||||
@TableField(exist = false)
|
||||
@Dict(dicCode = "nu_type")
|
||||
private java.lang.String areaFlag;
|
||||
@ApiModelProperty(value = "码流类型 0 代表主码流,1 代码子码流")
|
||||
@TableField(exist = false)
|
||||
private int streamType;
|
||||
|
|
|
|||
|
|
@ -281,14 +281,31 @@
|
|||
</update>
|
||||
|
||||
<select id="previewList" parameterType="com.nu.modules.tplink.camera.entity.CameraInfo" resultType="com.nu.modules.tplink.camera.entity.CameraInfo">
|
||||
select a.*,b.nu_name from (
|
||||
select id,nu_id,device_index,mac as sn,device_model,device_type,device_status,dimension from nu_iot_tplink_camera
|
||||
union all
|
||||
select id,nu_id,cid as device_index,cid as sn,'' as device_model,'sb' as device_type,relay_state as device_status,dimension from nu_iot_tq_water_meter
|
||||
union all
|
||||
select id,nu_id,sn as device_index,sn,'' as device_model,'db' as device_type,relay_state as device_status,dimension from nu_iot_ds_electricity_meter
|
||||
union all
|
||||
select id,nu_id,sn as device_index,sn,'' as device_model,'wsdj' as device_type,status as device_status,dimension from nu_iot_yiweilian_humid_device
|
||||
select a.*,b.nu_name,b.area_flag
|
||||
from (
|
||||
select id,nu_id,device_index,mac as sn,device_model,device_type,
|
||||
( case device_status when '0' then '离线' when '1' then '在线' end ) as device_status,
|
||||
dimension,
|
||||
maintain_status
|
||||
from nu_iot_tplink_camera
|
||||
union all
|
||||
select id,nu_id,sn as device_index,sn,'' as device_model,'db' as device_type,
|
||||
( case relay_state when '0' then '拉闸' else '合闸' end ) as device_status,
|
||||
dimension,
|
||||
maintain_status
|
||||
from nu_iot_ds_electricity_meter
|
||||
union all
|
||||
select id,nu_id,cid as device_index,cid as sn,'' as device_model,'sb' as device_type,
|
||||
( case relay_state when '0' then '关阀' else '开阀' end ) as device_status,
|
||||
dimension,
|
||||
maintain_status
|
||||
from nu_iot_tq_water_meter
|
||||
union all
|
||||
select id,nu_id,sn as device_index,sn,'' as device_model,'wsdj' as device_type,
|
||||
( case status when '0' then '在线' else '离线' end ) as device_status,
|
||||
dimension,
|
||||
maintain_status
|
||||
from nu_iot_yiweilian_humid_device
|
||||
) a
|
||||
left join nu_base_info b on a.nu_id = b.nu_id
|
||||
<where>
|
||||
|
|
@ -305,6 +322,7 @@
|
|||
and a.dimension = #{params.dimension}
|
||||
</if>
|
||||
</where>
|
||||
order by a.nu_id,a.device_type,a.sn
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue