物联设备拉取状态更新
This commit is contained in:
parent
e16e74370e
commit
19073460b1
|
|
@ -38,6 +38,7 @@ public interface DeviceManagerMapper extends BaseMapper<DeviceManager> {
|
||||||
// DevicePreview getPreview(DevicePreview devicePreview);
|
// DevicePreview getPreview(DevicePreview devicePreview);
|
||||||
|
|
||||||
void syncPreview(String id);
|
void syncPreview(String id);
|
||||||
|
void editPreviewStatusBySn(DeviceIntegration deviceIntegration);
|
||||||
void deletePreviewById(String id);
|
void deletePreviewById(String id);
|
||||||
void editPreviewSn(DevicePreview devicePreview);
|
void editPreviewSn(DevicePreview devicePreview);
|
||||||
void bindPreview(DevicePreview devicePreview);
|
void bindPreview(DevicePreview devicePreview);
|
||||||
|
|
|
||||||
|
|
@ -371,7 +371,11 @@
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<update id="editPreviewStatusBySn">
|
||||||
|
update nu_iot_device_preview
|
||||||
|
set device_status = #{deviceStatus}
|
||||||
|
where sn = #{sn}
|
||||||
|
</update>
|
||||||
|
|
||||||
<delete id="deletePreviewById">
|
<delete id="deletePreviewById">
|
||||||
delete from nu_iot_device_preview where id = #{id}
|
delete from nu_iot_device_preview where id = #{id}
|
||||||
|
|
|
||||||
|
|
@ -256,7 +256,9 @@ public class DeviceManagerServiceImpl extends ServiceImpl<DeviceManagerMapper, D
|
||||||
if(!res.isSuccess()){
|
if(!res.isSuccess()){
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
return Result.OK("拉取监控设备成功!");
|
deviceIntegration.setDeviceStatus("正常");
|
||||||
|
baseMapper.editPreviewStatusBySn(deviceIntegration);
|
||||||
|
return Result.OK("拉取设备成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -285,6 +287,8 @@ public class DeviceManagerServiceImpl extends ServiceImpl<DeviceManagerMapper, D
|
||||||
if(!res.isSuccess()){
|
if(!res.isSuccess()){
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
deviceIntegration.setDeviceStatus("正常");
|
||||||
|
baseMapper.editPreviewStatusBySn(deviceIntegration);
|
||||||
return Result.OK("拉取电表成功!");
|
return Result.OK("拉取电表成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -315,6 +319,8 @@ public class DeviceManagerServiceImpl extends ServiceImpl<DeviceManagerMapper, D
|
||||||
tqDeviceInfoService.getAllMeter(true);
|
tqDeviceInfoService.getAllMeter(true);
|
||||||
tqDeviceInfoService.getAllCollector(true);
|
tqDeviceInfoService.getAllCollector(true);
|
||||||
syncBizService.syncDevice(deviceIntegration.getOrgCode(),deviceIntegration.getSn());
|
syncBizService.syncDevice(deviceIntegration.getOrgCode(),deviceIntegration.getSn());
|
||||||
|
deviceIntegration.setDeviceStatus("正常");
|
||||||
|
baseMapper.editPreviewStatusBySn(deviceIntegration);
|
||||||
return Result.OK("拉取水表成功!");
|
return Result.OK("拉取水表成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -341,6 +347,8 @@ public class DeviceManagerServiceImpl extends ServiceImpl<DeviceManagerMapper, D
|
||||||
if(!res.isSuccess()){
|
if(!res.isSuccess()){
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
deviceIntegration.setDeviceStatus("正常");
|
||||||
|
baseMapper.editPreviewStatusBySn(deviceIntegration);
|
||||||
return Result.OK("拉取温湿度计成功!");
|
return Result.OK("拉取温湿度计成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -408,7 +408,12 @@
|
||||||
location_name as locationName,
|
location_name as locationName,
|
||||||
system_type as systemType,
|
system_type as systemType,
|
||||||
protocol as protocol,
|
protocol as protocol,
|
||||||
channel as channel
|
channel as channel,
|
||||||
|
ftp_ip as ftpIp,
|
||||||
|
ftp_port as ftpPort,
|
||||||
|
ftp_username as ftpUsername,
|
||||||
|
ftp_password as ftpPassword,
|
||||||
|
ftp_uploadpath as ftpUploadpath
|
||||||
from nu_iot_tplink_camera
|
from nu_iot_tplink_camera
|
||||||
where mac = #{sn}
|
where mac = #{sn}
|
||||||
order by id asc
|
order by id asc
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue