物联设备优化

This commit is contained in:
曹磊 2026-03-18 18:13:51 +08:00
parent 943ceb565a
commit c24db81f7e
2 changed files with 30 additions and 8 deletions

View File

@ -149,6 +149,10 @@ public class CameraInfo implements Serializable {
/**护理单元*/ /**护理单元*/
@ApiModelProperty(value = "护理单元") @ApiModelProperty(value = "护理单元")
private String nuName; private String nuName;
/**区域属性*/
@TableField(exist = false)
@Dict(dicCode = "nu_type")
private java.lang.String areaFlag;
@ApiModelProperty(value = "码流类型 0 代表主码流1 代码子码流") @ApiModelProperty(value = "码流类型 0 代表主码流1 代码子码流")
@TableField(exist = false) @TableField(exist = false)
private int streamType; private int streamType;

View File

@ -281,14 +281,31 @@
</update> </update>
<select id="previewList" parameterType="com.nu.modules.tplink.camera.entity.CameraInfo" resultType="com.nu.modules.tplink.camera.entity.CameraInfo"> <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 a.*,b.nu_name,b.area_flag
select id,nu_id,device_index,mac as sn,device_model,device_type,device_status,dimension from nu_iot_tplink_camera from (
union all select id,nu_id,device_index,mac as sn,device_model,device_type,
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 ( case device_status when '0' then '离线' when '1' then '在线' end ) as device_status,
union all dimension,
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 maintain_status
union all from nu_iot_tplink_camera
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 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 ) a
left join nu_base_info b on a.nu_id = b.nu_id left join nu_base_info b on a.nu_id = b.nu_id
<where> <where>
@ -305,6 +322,7 @@
and a.dimension = #{params.dimension} and a.dimension = #{params.dimension}
</if> </if>
</where> </where>
order by a.nu_id,a.device_type,a.sn
</select> </select>
</mapper> </mapper>