感知设备与视频设备接口更新,

develop
hanrenchun 10 months ago
parent e6a8349051
commit a61fba2d58

@ -1,6 +1,7 @@
package com.ruoyi.database.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ruoyi.database.domain.DevopsDeviceInfo;
import com.ruoyi.database.domain.DevopsDeviceStatus;
@ -48,14 +49,25 @@ public class DevopsDeviceInfoController extends BaseController {
for (DevopsDeviceStatus devopsDeviceStatus : list1) {
strings.add(devopsDeviceStatus.getGbsChannelNo());
}
QueryWrapper<DevopsDeviceInfo> devopsDeviceInfoQueryWrapper = new QueryWrapper<>(devopsDeviceInfo);
devopsDeviceInfoQueryWrapper.in("gbs_channel_no",strings);
List<DevopsDeviceInfo> list = devopsDeviceInfoService.list(devopsDeviceInfoQueryWrapper);
// List<DevopsDeviceInfo> list = devopsDeviceInfoService.lambdaQuery().in(DevopsDeviceInfo::getGbsChannelNo,strings).list();
// LambdaQueryWrapper<DevopsDeviceInfo> devopsDeviceInfoQueryWrapper = new LambdaQueryWrapper<>(devopsDeviceInfo);
// devopsDeviceInfoQueryWrapper.in(DevopsDeviceInfo::getGbsChannelNo,strings);
// List<DevopsDeviceInfo> list = devopsDeviceInfoService.list(devopsDeviceInfoQueryWrapper);
List<DevopsDeviceInfo> list = devopsDeviceInfoService.lambdaQuery().in(DevopsDeviceInfo::getGbsChannelNo,strings).list();
ArrayList<DevopsDeviceInfo> devopsDeviceInfos = new ArrayList<>();
for (DevopsDeviceInfo deviceInfo : list){
deviceInfo.setIsOnline(1);
devopsDeviceInfos.add(deviceInfo);
if (devopsDeviceInfo.getIsDoorwayVideo() == null) {
deviceInfo.setIsOnline(1);
devopsDeviceInfos.add(deviceInfo);
}
if (devopsDeviceInfo.getIsDoorwayVideo() == 1 && deviceInfo.getIsDoorwayVideo() == 1){
deviceInfo.setIsOnline(1);
devopsDeviceInfos.add(deviceInfo);
}
if (devopsDeviceInfo.getIsDoorwayVideo() == 3 && deviceInfo.getIsDoorwayVideo() == 3){
deviceInfo.setIsOnline(1);
devopsDeviceInfos.add(deviceInfo);
}
}
return getDataTable(devopsDeviceInfos);
}

@ -1,6 +1,7 @@
package com.ruoyi.database.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ruoyi.business.domain.dto.DevopsVideoInfoDto;
import com.ruoyi.common.utils.StringKit;
@ -49,14 +50,25 @@ public class DevopsVideoInfoController extends BaseController {
for (DevopsVideoStatus devopsVideoStatus : list1) {
strings.add(devopsVideoStatus.getGbsChannelNo());
}
QueryWrapper<DevopsVideoInfo> devopsVideoInfoQueryWrapper = new QueryWrapper<>(devopsVideoInfo);
devopsVideoInfoQueryWrapper.in("gbs_channel_no",strings);
List<DevopsVideoInfo> list = devopsVideoInfoService.list(devopsVideoInfoQueryWrapper);
// List<DevopsVideoInfo> list = devopsVideoInfoService.lambdaQuery().in(DevopsVideoInfo::getGbsChannelNo,strings).list();
// LambdaQueryWrapper<DevopsVideoInfo> lambdaQueryWrapper = new LambdaQueryWrapper<>(devopsVideoInfo);
// lambdaQueryWrapper.in(DevopsVideoInfo::getGbsChannelNo,strings);
// List<DevopsVideoInfo> list = devopsVideoInfoService.list(lambdaQueryWrapper);
List<DevopsVideoInfo> list = devopsVideoInfoService.lambdaQuery().in(DevopsVideoInfo::getGbsChannelNo,strings).list();
ArrayList<DevopsVideoInfo> devopsVideoInfos = new ArrayList<>();
for (DevopsVideoInfo devopsVideoInfo1 : list){
devopsVideoInfo1.setIsOnline(1);
devopsVideoInfos.add(devopsVideoInfo1);
if (devopsVideoInfo.getMonitoringType() == null){
devopsVideoInfo1.setIsOnline(1);
devopsVideoInfos.add(devopsVideoInfo1);
}
if (devopsVideoInfo.getMonitoringType() == 8 && devopsVideoInfo1.getMonitoringType() == 8){
devopsVideoInfo1.setIsOnline(1);
devopsVideoInfos.add(devopsVideoInfo1);
}
if (devopsVideoInfo.getMonitoringType() == 9 && devopsVideoInfo1.getMonitoringType() == 9){
devopsVideoInfo1.setIsOnline(1);
devopsVideoInfos.add(devopsVideoInfo1);
}
}
return getDataTable(devopsVideoInfos);
}

Loading…
Cancel
Save