边界列表

develop
Angel 10 months ago
parent b5f739cbf1
commit 28e2c9b5a6

@ -18,12 +18,14 @@ import com.ruoyi.database.service.DevopsVideoStatusService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
* (DevopsVideoInfo)Controller
@ -57,27 +59,34 @@ public class DevopsVideoInfoController extends BaseController {
List<DevopsVideoInfo> list = devopsVideoInfoService.lambdaQuery().in(DevopsVideoInfo::getGbsChannelNo, strings).list();
return getDataTable(list);
}
@PostMapping("/boundary")
@ApiOperation("边界列表")
public TableDataInfo<DevopsVideoInfo> list(
@RequestParam("startLongitude") Double startLongitude,
@RequestParam("endLongitude") Double endLongitude,
@RequestParam("startLatitude") Double startLatitude,
@RequestParam("endLatitude") Double endLatitude) {
QueryWrapper<DevopsVideoInfo> queryWrapper = new QueryWrapper<>();
queryWrapper.between("longitude", startLongitude, endLongitude)
.between("latitude", startLatitude, endLatitude);
List<DevopsVideoInfo> list = devopsVideoInfoService.list(queryWrapper);
List<VideoDTO> resultList = new ArrayList<>();
for (DevopsVideoInfo 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;
@RequestParam("endLatitude") Double endLatitude,DevopsVideoInfo devopsVideoInfo) {
List<DevopsVideoStatus> list1 = devopsVideoStatusService.lambdaQuery().eq(DevopsVideoStatus::getIsOnline, 1).list();
ArrayList<String> strings = new ArrayList<>();
for (DevopsVideoStatus devopsVideoStatus : list1) {
strings.add(devopsVideoStatus.getGbsChannelNo());
}
if (!"".equals(devopsVideoInfo.getDeviceName()) && devopsVideoInfo.getDeviceName() != null) {
List<DevopsVideoInfo> list = devopsVideoInfoService.lambdaQuery()
.between(DevopsVideoInfo::getLongitude, startLongitude, endLongitude)
.between(DevopsVideoInfo::getLatitude, startLatitude, endLatitude)
.in(DevopsVideoInfo::getGbsChannelNo, strings)
.like(DevopsVideoInfo::getDeviceName, devopsVideoInfo.getDeviceName()).list();
return getDataTable(list);
}
List<DevopsVideoInfo> list = devopsVideoInfoService.lambdaQuery()
.between(DevopsVideoInfo::getLongitude, startLongitude, endLongitude)
.between(DevopsVideoInfo::getLatitude, startLatitude, endLatitude)
.in(DevopsVideoInfo::getGbsChannelNo, strings).list();
return getDataTable(list);
}
@GetMapping("/type")
@ApiOperation("查询视频设备沿海与海堤线")
public TableDataInfo<DevopsVideoInfo> levelList(DevopsVideoInfo devopsVideoInfo) {

Loading…
Cancel
Save