From a61fba2d5819ec8acad9fd4150284b0504340d5c Mon Sep 17 00:00:00 2001 From: hanrenchun Date: Sat, 6 Jan 2024 18:29:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=84=9F=E7=9F=A5=E8=AE=BE=E5=A4=87=E4=B8=8E?= =?UTF-8?q?=E8=A7=86=E9=A2=91=E8=AE=BE=E5=A4=87=E6=8E=A5=E5=8F=A3=E6=9B=B4?= =?UTF-8?q?=E6=96=B0,?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DevopsDeviceInfoController.java | 24 ++++++++++++++----- .../controller/DevopsVideoInfoController.java | 24 ++++++++++++++----- 2 files changed, 36 insertions(+), 12 deletions(-) diff --git a/gather-app/src/main/java/com/ruoyi/database/controller/DevopsDeviceInfoController.java b/gather-app/src/main/java/com/ruoyi/database/controller/DevopsDeviceInfoController.java index 5f3d87c..43bff07 100644 --- a/gather-app/src/main/java/com/ruoyi/database/controller/DevopsDeviceInfoController.java +++ b/gather-app/src/main/java/com/ruoyi/database/controller/DevopsDeviceInfoController.java @@ -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 devopsDeviceInfoQueryWrapper = new QueryWrapper<>(devopsDeviceInfo); - devopsDeviceInfoQueryWrapper.in("gbs_channel_no",strings); - List list = devopsDeviceInfoService.list(devopsDeviceInfoQueryWrapper); -// List list = devopsDeviceInfoService.lambdaQuery().in(DevopsDeviceInfo::getGbsChannelNo,strings).list(); + +// LambdaQueryWrapper devopsDeviceInfoQueryWrapper = new LambdaQueryWrapper<>(devopsDeviceInfo); +// devopsDeviceInfoQueryWrapper.in(DevopsDeviceInfo::getGbsChannelNo,strings); +// List list = devopsDeviceInfoService.list(devopsDeviceInfoQueryWrapper); + List list = devopsDeviceInfoService.lambdaQuery().in(DevopsDeviceInfo::getGbsChannelNo,strings).list(); ArrayList 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); } diff --git a/gather-app/src/main/java/com/ruoyi/database/controller/DevopsVideoInfoController.java b/gather-app/src/main/java/com/ruoyi/database/controller/DevopsVideoInfoController.java index 828a6ab..c48c30f 100644 --- a/gather-app/src/main/java/com/ruoyi/database/controller/DevopsVideoInfoController.java +++ b/gather-app/src/main/java/com/ruoyi/database/controller/DevopsVideoInfoController.java @@ -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 devopsVideoInfoQueryWrapper = new QueryWrapper<>(devopsVideoInfo); - devopsVideoInfoQueryWrapper.in("gbs_channel_no",strings); - List list = devopsVideoInfoService.list(devopsVideoInfoQueryWrapper); -// List list = devopsVideoInfoService.lambdaQuery().in(DevopsVideoInfo::getGbsChannelNo,strings).list(); + +// LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(devopsVideoInfo); +// lambdaQueryWrapper.in(DevopsVideoInfo::getGbsChannelNo,strings); +// List list = devopsVideoInfoService.list(lambdaQueryWrapper); + List list = devopsVideoInfoService.lambdaQuery().in(DevopsVideoInfo::getGbsChannelNo,strings).list(); ArrayList 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); }