| | |
| | | package com.flightfeather.uav.lightshare.web |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat |
| | | import com.flightfeather.uav.domain.entity.GridDataDetail |
| | | import com.flightfeather.uav.lightshare.bean.AreaVo |
| | | import com.flightfeather.uav.lightshare.service.SatelliteDataCalculateService |
| | | import com.flightfeather.uav.lightshare.service.SatelliteTelemetryService |
| | | import io.swagger.annotations.Api |
| | | import io.swagger.annotations.ApiOperation |
| | |
| | | @Api(tags = ["卫星遥测API接口"]) |
| | | @RestController |
| | | @RequestMapping("air/satellite") |
| | | class SatelliteTelemetryController(private val satelliteTelemetryService: SatelliteTelemetryService) { |
| | | class SatelliteTelemetryController( |
| | | private val satelliteTelemetryService: SatelliteTelemetryService, |
| | | private val satelliteDataCalculateService: SatelliteDataCalculateService |
| | | ) { |
| | | |
| | | @ApiOperation(value = "获取网格组信息") |
| | | @PostMapping("/grid/group") |
| | | fun fetchGridGroup( |
| | | @RequestBody areaVo: AreaVo, |
| | | @RequestParam(required = false) type: String?, |
| | | @RequestParam("page", required = false) page: Int?, |
| | | @RequestParam("per_page", required = false) perPage: Int? |
| | | ) = resPack { satelliteTelemetryService.fetchGridGroup(areaVo, page, perPage) } |
| | | ) = resPack { satelliteTelemetryService.fetchGridGroup(areaVo, type, page, perPage) } |
| | | |
| | | @ApiOperation(value = "获取网格组内具体网格信息") |
| | | @GetMapping("/grid/cell") |
| | |
| | | @ApiParam("网格单元格id") @RequestParam(required = false) cellId: Int?, |
| | | ) = resPack { satelliteTelemetryService.fetchGridDataDetail(dataId, groupId, cellId) } |
| | | |
| | | @ApiOperation(value = "保存拟合生成的卫星遥测PM2.5结果数据") |
| | | @PostMapping("/grid/data/create") |
| | | fun createGridDataAndDataDetail( |
| | | @ApiParam("网格组id") @RequestParam groupId: Int, |
| | | @ApiParam("遥测数据时间") |
| | | @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") dateTime: LocalDateTime, |
| | | @RequestBody gridDataDetail: List<GridDataDetail> |
| | | ) = resPack { |
| | | satelliteTelemetryService.createGridDataAndDataDetail(groupId, dateTime, gridDataDetail) |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "多次走航数据进行融合计算") |
| | | @PostMapping("/grid/data/mix") |
| | | fun mixGridData( |
| | | @ApiParam("原始数据id数组") @RequestBody dataIdList: List<Int> |
| | | ) = resPack { satelliteTelemetryService.mixGridData(dataIdList) } |
| | | |
| | | |
| | | @ApiOperation(value = "导入卫星遥测PM2.5结果数据") |
| | | @PostMapping("/import/grid/data") |
| | |
| | | @GetMapping("/import/grid/data/download/template") |
| | | fun downloadTemplate(@ApiIgnore response: HttpServletResponse) = satelliteTelemetryService.downloadTemplate(response) |
| | | |
| | | @ApiOperation(value = "获取网格组下的卫星遥测aod数据") |
| | | @GetMapping("/grid/aod") |
| | | fun fetchGridAod( |
| | | @ApiParam("网格组id") @RequestParam groupId: Int, |
| | | @ApiParam("遥测数据时间") |
| | | @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") dataTime: LocalDateTime?, |
| | | ) = resPack { satelliteTelemetryService.fetchGridAod(groupId, dataTime) } |
| | | |
| | | @ApiOperation(value = "导入卫星遥测Aod结果数据") |
| | | @PostMapping("/import/grid/aod") |
| | | fun importGridAOD( |
| | |
| | | @ApiOperation(value = "下载卫星遥测Aod结果数据导入模板") |
| | | @GetMapping("/import/grid/aod/download/template") |
| | | fun downloadAODTemplate(@ApiIgnore response: HttpServletResponse) = satelliteTelemetryService.downloadAODTemplate(response) |
| | | |
| | | |
| | | /**AOD数据相关**************************************************************/ |
| | | @ApiOperation(value = "获取网格组下的卫星遥测aod数据") |
| | | @GetMapping("/grid/aod") |
| | | fun fetchGridAod( |
| | | @ApiParam("网格组id") @RequestParam groupId: Int, |
| | | @ApiParam("遥测数据时间") |
| | | @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") dataTime: LocalDateTime?, |
| | | ) = resPack { satelliteTelemetryService.fetchGridAod(groupId, dataTime) } |
| | | |
| | | // @ApiOperation(value = "获取网格组下的卫星遥测AOD数据") |
| | | // @GetMapping("/aod/data") |
| | | // fun fetchGridAOD( |
| | | // @ApiParam("网格组id") @RequestParam groupId: Int, |
| | | // @ApiParam("AOD数据时间") |
| | | // @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") dataTime: LocalDateTime?, |
| | | // ) = resPack { satelliteTelemetryService.fetchGridAOD(groupId, dataTime) } |
| | | |
| | | @ApiOperation(value = "获取网格组下的卫星遥测AOD具体数据") |
| | | @GetMapping("/aod/data/detail") |
| | | fun fetchGridAODDetail( |
| | | @ApiParam("AOD数据id") @RequestParam aodId: Int, |
| | | @ApiParam("网格组id") @RequestParam(required = false) groupId: Int?, |
| | | @ApiParam("网格单元格id") @RequestParam(required = false) cellId: Int?, |
| | | ) = resPack { satelliteTelemetryService.fetchGridAODDetail(aodId, groupId, cellId) } |
| | | |
| | | |
| | | /**遥测产品制作相关**************************************************************/ |
| | | @ApiOperation(value = "生成走航融合产品") |
| | | @GetMapping("/product/underway/build") |
| | | fun buildUnderwayProduct( |
| | | @ApiParam("走航任务编号") @RequestParam missionCode: String, |
| | | @ApiParam("网格组id") @RequestParam groupId: Int, |
| | | ) = resPack { satelliteDataCalculateService.dataFusion(missionCode, groupId) } |
| | | |
| | | |
| | | } |