|
|
@ -1,33 +1,29 @@
|
|
|
|
package com.ruoyi.database.controller;
|
|
|
|
package com.ruoyi.database.controller;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.ruoyi.common.utils.PageUtils;
|
|
|
|
|
|
|
|
import com.ruoyi.database.domain.DevopsDeviceInfo;
|
|
|
|
|
|
|
|
import com.ruoyi.database.domain.DevopsDeviceStatus;
|
|
|
|
|
|
|
|
import com.ruoyi.database.domain.DevopsVideoInfo;
|
|
|
|
|
|
|
|
import com.ruoyi.database.domain.DevopsVideoStatus;
|
|
|
|
|
|
|
|
import com.ruoyi.database.service.DevopsDeviceInfoService;
|
|
|
|
|
|
|
|
import com.ruoyi.common.annotation.Log;
|
|
|
|
import com.ruoyi.common.annotation.Log;
|
|
|
|
import com.ruoyi.common.core.controller.BaseController;
|
|
|
|
import com.ruoyi.common.core.controller.BaseController;
|
|
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
|
import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
|
import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
|
import com.ruoyi.common.enums.BusinessType;
|
|
|
|
import com.ruoyi.common.enums.BusinessType;
|
|
|
|
|
|
|
|
import com.ruoyi.common.utils.PageUtils;
|
|
|
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
|
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
|
|
|
|
|
|
import com.ruoyi.database.domain.DevopsDeviceInfo;
|
|
|
|
|
|
|
|
import com.ruoyi.database.domain.DevopsDeviceStatus;
|
|
|
|
|
|
|
|
import com.ruoyi.database.domain.DevopsVideoInfo;
|
|
|
|
|
|
|
|
import com.ruoyi.database.domain.dto.VideoDTO;
|
|
|
|
|
|
|
|
import com.ruoyi.database.service.DevopsDeviceInfoService;
|
|
|
|
import com.ruoyi.database.service.DevopsDeviceStatusService;
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 智能设备信息表(DevopsDeviceInfo)Controller
|
|
|
|
* 智能设备信息表(DevopsDeviceInfo)Controller
|
|
|
@ -54,7 +50,6 @@ public class DevopsDeviceInfoController extends BaseController {
|
|
|
|
for (DevopsDeviceStatus devopsDeviceStatus : list1) {
|
|
|
|
for (DevopsDeviceStatus devopsDeviceStatus : list1) {
|
|
|
|
strings.add(devopsDeviceStatus.getGbsChannelNo());
|
|
|
|
strings.add(devopsDeviceStatus.getGbsChannelNo());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
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());
|
|
|
@ -76,6 +71,39 @@ public class DevopsDeviceInfoController extends BaseController {
|
|
|
|
// .eq(DevopsDeviceInfo::getParentMonitoringType, devopsDeviceInfo.getParentMonitoringType()));
|
|
|
|
// .eq(DevopsDeviceInfo::getParentMonitoringType, devopsDeviceInfo.getParentMonitoringType()));
|
|
|
|
// return getDataTable(deviceInfoList);
|
|
|
|
// return getDataTable(deviceInfoList);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@PostMapping("/boundary")
|
|
|
|
|
|
|
|
@ApiOperation("边界列表")
|
|
|
|
|
|
|
|
public TableDataInfo<DevopsVideoInfo> list(
|
|
|
|
|
|
|
|
@RequestParam("startLongitude") Double startLongitude,
|
|
|
|
|
|
|
|
@RequestParam("endLongitude") Double endLongitude,
|
|
|
|
|
|
|
|
@RequestParam("startLatitude") Double startLatitude,
|
|
|
|
|
|
|
|
@RequestParam("endLatitude") Double endLatitude,DevopsDeviceInfo devopsDeviceInfo) {
|
|
|
|
|
|
|
|
QueryWrapper<DevopsDeviceStatus> devopsDeviceStatusQueryWrapper = new QueryWrapper<>();
|
|
|
|
|
|
|
|
devopsDeviceStatusQueryWrapper.eq("is_online",1).groupBy("gbs_channel_no");
|
|
|
|
|
|
|
|
List<DevopsDeviceStatus> list1 = devopsDeviceStatusService.list(devopsDeviceStatusQueryWrapper);
|
|
|
|
|
|
|
|
List<String> strings = new ArrayList<>();
|
|
|
|
|
|
|
|
for (DevopsDeviceStatus devopsDeviceStatus : list1) {
|
|
|
|
|
|
|
|
strings.add(devopsDeviceStatus.getGbsChannelNo());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
PageUtils.startPage();
|
|
|
|
|
|
|
|
QueryWrapper<DevopsDeviceInfo> devopsDeviceInfoQueryWrapper = new QueryWrapper<>();
|
|
|
|
|
|
|
|
devopsDeviceInfoQueryWrapper.in("gbs_channel_no",strings);
|
|
|
|
|
|
|
|
devopsDeviceInfoQueryWrapper.eq("device_type",devopsDeviceInfo.getDeviceType());
|
|
|
|
|
|
|
|
devopsDeviceInfoQueryWrapper.eq("parent_monitoring_type",devopsDeviceInfo.getParentMonitoringType());
|
|
|
|
|
|
|
|
devopsDeviceInfoQueryWrapper.between("longitude", startLongitude, endLongitude)
|
|
|
|
|
|
|
|
.between("latitude", startLatitude, endLatitude);
|
|
|
|
|
|
|
|
List<DevopsDeviceInfo> list = devopsDeviceInfoService.list(devopsDeviceInfoQueryWrapper);
|
|
|
|
|
|
|
|
List<VideoDTO> resultList = new ArrayList<>();
|
|
|
|
|
|
|
|
for (DevopsDeviceInfo info : list) {
|
|
|
|
|
|
|
|
VideoDTO dto = new VideoDTO();
|
|
|
|
|
|
|
|
org.springframework.beans.BeanUtils.copyProperties(info, dto);
|
|
|
|
|
|
|
|
dto.setConcatenatedAddress(info.getDeviceAddress());
|
|
|
|
|
|
|
|
resultList.add(dto);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
TableDataInfo dataTable = getDataTable(resultList);
|
|
|
|
|
|
|
|
return dataTable;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/type")
|
|
|
|
@GetMapping("/type")
|
|
|
|
@ApiOperation("查询智能设备沿海与海堤线")
|
|
|
|
@ApiOperation("查询智能设备沿海与海堤线")
|
|
|
|