物联设备预览时因为id重复出现重复数据
This commit is contained in:
parent
04e9eeb645
commit
44b4628c54
|
|
@ -32,7 +32,7 @@ public class CameraInfo implements Serializable {
|
||||||
/**ID*/
|
/**ID*/
|
||||||
@TableId(type = IdType.AUTO)
|
@TableId(type = IdType.AUTO)
|
||||||
@ApiModelProperty(value = "ID")
|
@ApiModelProperty(value = "ID")
|
||||||
private Integer id;
|
private String id;
|
||||||
/**设备编码*/
|
/**设备编码*/
|
||||||
@Excel(name = "设备编码", width = 15)
|
@Excel(name = "设备编码", width = 15)
|
||||||
@ApiModelProperty(value = "设备编码")
|
@ApiModelProperty(value = "设备编码")
|
||||||
|
|
|
||||||
|
|
@ -283,25 +283,25 @@
|
||||||
<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,b.area_flag
|
select a.*,b.nu_name,b.area_flag
|
||||||
from (
|
from (
|
||||||
select id,nu_id,device_index,mac as sn,device_model,device_type,
|
select mac as 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,
|
( case device_status when '0' then '离线' when '1' then '在线' end ) as device_status,
|
||||||
dimension,
|
dimension,
|
||||||
maintain_status
|
maintain_status
|
||||||
from nu_iot_tplink_camera
|
from nu_iot_tplink_camera
|
||||||
union all
|
union all
|
||||||
select id,nu_id,sn as device_index,sn,'' as device_model,'db' as device_type,
|
select sn as 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,
|
( case relay_state when '0' then '拉闸' else '合闸' end ) as device_status,
|
||||||
dimension,
|
dimension,
|
||||||
maintain_status
|
maintain_status
|
||||||
from nu_iot_ds_electricity_meter
|
from nu_iot_ds_electricity_meter
|
||||||
union all
|
union all
|
||||||
select id,nu_id,cid as device_index,cid as sn,'' as device_model,'sb' as device_type,
|
select cid as 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,
|
( case relay_state when '0' then '关阀' else '开阀' end ) as device_status,
|
||||||
dimension,
|
dimension,
|
||||||
maintain_status
|
maintain_status
|
||||||
from nu_iot_tq_water_meter
|
from nu_iot_tq_water_meter
|
||||||
union all
|
union all
|
||||||
select id,nu_id,sn as device_index,sn,'' as device_model,'wsdj' as device_type,
|
select sn as 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,
|
( case status when '0' then '在线' else '离线' end ) as device_status,
|
||||||
dimension,
|
dimension,
|
||||||
maintain_status
|
maintain_status
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue