|
|
@ -9,6 +9,7 @@ import com.ruoyi.common.core.domain.AjaxResult; |
|
|
|
import com.ruoyi.common.core.redis.RedisCache; |
|
|
|
import com.zc.business.domain.DcDevice; |
|
|
|
import com.zc.business.service.IDcDeviceService; |
|
|
|
import com.zc.business.service.IMiddleDatabaseService; |
|
|
|
import com.zc.common.core.httpclient.OkHttp; |
|
|
|
import com.zc.common.core.httpclient.exception.HttpException; |
|
|
|
import com.zc.common.core.httpclient.request.RequestParams; |
|
|
@ -59,6 +60,9 @@ public class VideoController extends BaseController { |
|
|
|
@Resource |
|
|
|
private IDcDeviceService iDcDeviceService; |
|
|
|
|
|
|
|
@Resource |
|
|
|
private IMiddleDatabaseService middleDatabaseService; |
|
|
|
|
|
|
|
/** |
|
|
|
* 查询附近相机 |
|
|
|
*/ |
|
|
@ -137,6 +141,10 @@ public class VideoController extends BaseController { |
|
|
|
} |
|
|
|
|
|
|
|
iDcDeviceService.batchUpdate(list); |
|
|
|
|
|
|
|
//更新中间库的设备状态
|
|
|
|
middleDatabaseService.updateMiddleDatabaseDeviceByList(list); |
|
|
|
|
|
|
|
logger.debug("执行:同步数据平台视频设备的设备状态成功!!"); |
|
|
|
|
|
|
|
} |
|
|
@ -153,6 +161,10 @@ public class VideoController extends BaseController { |
|
|
|
dcDevices.add(dcDevice); |
|
|
|
} |
|
|
|
iDcDeviceService.batchUpdate(dcDevices); |
|
|
|
|
|
|
|
//更新中间库的设备状态
|
|
|
|
middleDatabaseService.updateMiddleDatabaseDeviceByList(dcDevices); |
|
|
|
|
|
|
|
logger.debug("执行:同步物联平台设备的设备状态成功!!"); |
|
|
|
|
|
|
|
} |
|
|
@ -168,6 +180,9 @@ public class VideoController extends BaseController { |
|
|
|
LambdaQueryWrapper<DcDevice> queryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
queryWrapper.eq(DcDevice::getIotDeviceId, dcDevice.getIotDeviceId()); |
|
|
|
iDcDeviceService.update(dcDevice, queryWrapper); |
|
|
|
|
|
|
|
//更新中间库的设备状态
|
|
|
|
middleDatabaseService.updateMiddleDatabaseDevice(dcDevice); |
|
|
|
} |
|
|
|
logger.debug("执行:同步广播设备的设备状态成功!!"); |
|
|
|
|
|
|
|