|
|
|
@ -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);
|
|
|
|
|
}
|
|
|
|
|