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