package com.flightfeather.uav.lightshare.web
|
|
import com.fasterxml.jackson.annotation.JsonFormat
|
import com.flightfeather.uav.lightshare.bean.AreaVo
|
import com.flightfeather.uav.lightshare.service.SatelliteTelemetryService
|
import io.swagger.annotations.Api
|
import io.swagger.annotations.ApiOperation
|
import io.swagger.annotations.ApiParam
|
import org.springframework.web.bind.annotation.*
|
import java.time.LocalDateTime
|
|
/**
|
* 卫星遥测
|
* @date 2024/12/5
|
* @author feiyu02
|
*/
|
@Api(tags = ["卫星遥测API接口"])
|
@RestController
|
@RequestMapping("air/satellite")
|
class SatelliteTelemetryController(private val satelliteTelemetryService: SatelliteTelemetryService) {
|
|
@ApiOperation(value = "获取网格组信息")
|
@PostMapping("/grid/group")
|
fun fetchGridGroup(
|
@RequestBody areaVo: AreaVo,
|
@RequestParam("page", required = false) page: Int?,
|
@RequestParam("per_page", required = false) perPage: Int?
|
) = resPack { satelliteTelemetryService.fetchGridGroup(areaVo, page, perPage) }
|
|
@ApiOperation(value = "获取网格组内具体网格信息")
|
@GetMapping("/grid/cell")
|
fun fetchGridCell(
|
@ApiParam("网格组id") @RequestParam groupId: Int,
|
) = resPack { satelliteTelemetryService.fetchGridCell(groupId) }
|
|
@ApiOperation(value = "获取网格组下的卫星遥测数据")
|
@GetMapping("/grid/data")
|
fun fetchGridData(
|
@ApiParam("网格组id") @RequestParam groupId: Int,
|
@ApiParam("遥测数据时间")
|
@RequestParam(required = false) @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") dataTime: LocalDateTime?,
|
@ApiParam("遥测数据类型", allowableValues = "0:原始卫星遥测数据;1:融合数据") @RequestParam(required = false) type: Int?,
|
) = resPack { satelliteTelemetryService.fetchGridData(groupId, dataTime, type) }
|
|
@ApiOperation(value = "获取网格组下的卫星遥测具体数据")
|
@GetMapping("/grid/data/detail")
|
fun fetchGridDataDetail(
|
@ApiParam("遥测数据id") @RequestParam dataId: Int,
|
@ApiParam("网格组id") @RequestParam(required = false) groupId: Int?,
|
@ApiParam("网格单元格id") @RequestParam(required = false) cellId: Int?,
|
) = resPack { satelliteTelemetryService.fetchGridDataDetail(dataId, groupId, cellId) }
|
}
|