|
|
@ -18,6 +18,7 @@ import com.ruoyi.database.service.DevopsDeviceStatusService;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
|
|
|
|
import org.checkerframework.checker.units.qual.A;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
|
|
|
|
|
@ -43,22 +44,22 @@ public class DevopsDeviceInfoController extends BaseController {
|
|
|
|
@GetMapping
|
|
|
|
@GetMapping
|
|
|
|
@ApiOperation("查询智能设备信息表")
|
|
|
|
@ApiOperation("查询智能设备信息表")
|
|
|
|
public TableDataInfo<DevopsDeviceInfo> list(DevopsDeviceInfo devopsDeviceInfo) {
|
|
|
|
public TableDataInfo<DevopsDeviceInfo> list(DevopsDeviceInfo devopsDeviceInfo) {
|
|
|
|
startPage();
|
|
|
|
QueryWrapper<DevopsDeviceStatus> devopsDeviceStatusQueryWrapper = new QueryWrapper<>();
|
|
|
|
List<DevopsDeviceStatus> list1 = devopsDeviceStatusService.lambdaQuery().eq(DevopsDeviceStatus::getIsOnline, 1).list();
|
|
|
|
devopsDeviceStatusQueryWrapper.eq("is_online",1).groupBy("gbs_channel_no");
|
|
|
|
ArrayList<String> strings = new ArrayList<>();
|
|
|
|
List<DevopsDeviceStatus> list1 = devopsDeviceStatusService.list(devopsDeviceStatusQueryWrapper);
|
|
|
|
|
|
|
|
List<String> strings = new ArrayList<>();
|
|
|
|
for (DevopsDeviceStatus devopsDeviceStatus : list1) {
|
|
|
|
for (DevopsDeviceStatus devopsDeviceStatus : list1) {
|
|
|
|
strings.add(devopsDeviceStatus.getGbsChannelNo());
|
|
|
|
strings.add(devopsDeviceStatus.getGbsChannelNo());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
List<DevopsDeviceInfo> list = devopsDeviceInfoService.lambdaQuery().in(DevopsDeviceInfo::getGbsChannelNo,strings).list();
|
|
|
|
startPage();
|
|
|
|
ArrayList<DevopsDeviceInfo> devopsDeviceInfos = new ArrayList<>();
|
|
|
|
QueryWrapper<DevopsDeviceInfo> devopsDeviceInfoQueryWrapper = new QueryWrapper<>();
|
|
|
|
for (DevopsDeviceInfo deviceInfo : list){
|
|
|
|
devopsDeviceInfoQueryWrapper.in("gbs_channel_no",strings);
|
|
|
|
deviceInfo.setIsOnline(1);
|
|
|
|
devopsDeviceInfoQueryWrapper.eq("device_type",devopsDeviceInfo.getDeviceType());
|
|
|
|
devopsDeviceInfos.add(deviceInfo);
|
|
|
|
devopsDeviceInfoQueryWrapper.eq("parent_monitoring_type",devopsDeviceInfo.getParentMonitoringType());
|
|
|
|
}
|
|
|
|
List<DevopsDeviceInfo> list = devopsDeviceInfoService.list(devopsDeviceInfoQueryWrapper);
|
|
|
|
return getDataTable(devopsDeviceInfos);
|
|
|
|
return getDataTable(list);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/type")
|
|
|
|
@GetMapping("/type")
|
|
|
|
@ApiOperation("查询智能设备沿海与海堤线")
|
|
|
|
@ApiOperation("查询智能设备沿海与海堤线")
|
|
|
|
public TableDataInfo<DevopsDeviceInfo> levelList(DevopsDeviceInfo devopsDeviceInfo){
|
|
|
|
public TableDataInfo<DevopsDeviceInfo> levelList(DevopsDeviceInfo devopsDeviceInfo){
|
|
|
|