分页问题

develop
Angel 10 months ago
parent 08b88c21e0
commit 30b92a7b53

@ -119,7 +119,8 @@ public class PerceptionDeviceController extends BaseController {
List<DevopsDeviceInfo> deviceInfos = devopsDeviceInfoService.lambdaQuery() List<DevopsDeviceInfo> deviceInfos = devopsDeviceInfoService.lambdaQuery()
.eq(DevopsDeviceInfo::getParentMonitoringType, 1) .eq(DevopsDeviceInfo::getParentMonitoringType, 1)
.eq(DevopsDeviceInfo::getDeviceType,1).list(); .eq(DevopsDeviceInfo::getDeviceType,1).list();
List<String> collect = deviceInfos.stream().map(devopsDeviceInfo -> devopsDeviceInfo.getGbsChannelNo()).collect(Collectors.toList()); List<String> collect = deviceInfos.stream().map(devopsDeviceInfo ->
devopsDeviceInfo.getGbsChannelNo()).collect(Collectors.toList());
// 获取当前日期 // 获取当前日期
LocalDate currentDate = LocalDate.now(); LocalDate currentDate = LocalDate.now();
// 创建一个 TreeMap 用于存储每天的数据量 // 创建一个 TreeMap 用于存储每天的数据量
@ -156,7 +157,8 @@ public class PerceptionDeviceController extends BaseController {
List<DevopsDeviceInfo> deviceInfos = devopsDeviceInfoService.lambdaQuery() List<DevopsDeviceInfo> deviceInfos = devopsDeviceInfoService.lambdaQuery()
.eq(DevopsDeviceInfo::getParentMonitoringType, 1) .eq(DevopsDeviceInfo::getParentMonitoringType, 1)
.eq(DevopsDeviceInfo::getDeviceType,2).list(); .eq(DevopsDeviceInfo::getDeviceType,2).list();
List<String> collect = deviceInfos.stream().map(devopsDeviceInfo -> devopsDeviceInfo.getGbsChannelNo()).collect(Collectors.toList()); List<String> collect = deviceInfos.stream().map(devopsDeviceInfo ->
devopsDeviceInfo.getGbsChannelNo()).collect(Collectors.toList());
// 获取当前日期 // 获取当前日期
LocalDate currentDate = LocalDate.now(); LocalDate currentDate = LocalDate.now();
// 创建一个 TreeMap 用于存储每天的数据量 // 创建一个 TreeMap 用于存储每天的数据量

@ -4,6 +4,7 @@ package com.ruoyi.database.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.common.utils.PageUtils;
import com.ruoyi.database.domain.DevopsDeviceInfo; import com.ruoyi.database.domain.DevopsDeviceInfo;
import com.ruoyi.database.domain.DevopsDeviceStatus; import com.ruoyi.database.domain.DevopsDeviceStatus;
import com.ruoyi.database.domain.DevopsVideoInfo; import com.ruoyi.database.domain.DevopsVideoInfo;
@ -53,7 +54,7 @@ public class DevopsDeviceInfoController extends BaseController {
for (DevopsDeviceStatus devopsDeviceStatus : list1) { for (DevopsDeviceStatus devopsDeviceStatus : list1) {
strings.add(devopsDeviceStatus.getGbsChannelNo()); strings.add(devopsDeviceStatus.getGbsChannelNo());
} }
startPage(); PageUtils.startPage();
QueryWrapper<DevopsDeviceInfo> devopsDeviceInfoQueryWrapper = new QueryWrapper<>(); QueryWrapper<DevopsDeviceInfo> devopsDeviceInfoQueryWrapper = new QueryWrapper<>();
devopsDeviceInfoQueryWrapper.in("gbs_channel_no",strings); devopsDeviceInfoQueryWrapper.in("gbs_channel_no",strings);
devopsDeviceInfoQueryWrapper.eq("device_type",devopsDeviceInfo.getDeviceType()); devopsDeviceInfoQueryWrapper.eq("device_type",devopsDeviceInfo.getDeviceType());

Loading…
Cancel
Save