feiyu02
2025-03-28 8cf331411ea79c0d83e00657ed1374b29b09f4d7
src/main/kotlin/com/flightfeather/uav/lightshare/web/SatelliteTelemetryController.kt
@@ -24,7 +24,7 @@
@RequestMapping("air/satellite")
class SatelliteTelemetryController(
    private val satelliteTelemetryService: SatelliteTelemetryService,
    private val satelliteDataCalculateService: SatelliteDataCalculateService
    private val satelliteDataCalculateService: SatelliteDataCalculateService,
) {
    @ApiOperation(value = "获取网格组信息")
@@ -33,7 +33,7 @@
        @RequestBody areaVo: AreaVo,
        @RequestParam(required = false) type: String?,
        @RequestParam("page", required = false) page: Int?,
        @RequestParam("per_page", required = false) perPage: Int?
        @RequestParam("per_page", required = false) perPage: Int?,
    ) = resPack { satelliteTelemetryService.fetchGridGroup(areaVo, type, page, perPage) }
    @ApiOperation(value = "获取网格组内具体网格信息")
@@ -48,7 +48,10 @@
        @ApiParam("网格组id") @RequestParam groupId: Int,
        @ApiParam("遥测数据时间")
        @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") dataTime: LocalDateTime?,
        @ApiParam("遥测数据类型", allowableValues = "0:原始卫星遥测数据;1:融合数据") @RequestParam(required = false) type: Int?,
        @ApiParam(
            "遥测数据类型",
            allowableValues = "0:原始卫星遥测数据;1:融合数据"
        ) @RequestParam(required = false) type: Int?,
    ) = resPack { satelliteTelemetryService.fetchGridData(groupId, dataTime, type) }
    @ApiOperation(value = "获取网格组下的卫星遥测具体数据")
@@ -65,7 +68,7 @@
        @ApiParam("网格组id") @RequestParam groupId: Int,
        @ApiParam("遥测数据时间")
        @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") dateTime: LocalDateTime,
        @RequestBody gridDataDetail: List<GridDataDetail>
        @RequestBody gridDataDetail: List<GridDataDetail>,
    ) = resPack {
        satelliteTelemetryService.createGridDataAndDataDetail(groupId, dateTime, gridDataDetail)
    }
@@ -74,7 +77,7 @@
    @ApiOperation(value = "多次走航数据进行融合计算")
    @PostMapping("/grid/data/mix")
    fun mixGridData(
        @ApiParam("原始数据id数组") @RequestBody dataIdList: List<Int>
        @ApiParam("原始数据id数组") @RequestBody dataIdList: List<Int>,
    ) = resPack { satelliteTelemetryService.mixGridData(dataIdList) }
@@ -92,7 +95,8 @@
    @ApiOperation(value = "下载卫星遥测PM2.5结果数据导入模板")
    @GetMapping("/import/grid/data/download/template")
    fun downloadTemplate(@ApiIgnore response: HttpServletResponse) = satelliteTelemetryService.downloadTemplate(response)
    fun downloadTemplate(@ApiIgnore response: HttpServletResponse) =
        satelliteTelemetryService.downloadTemplate(response)
    @ApiOperation(value = "导入卫星遥测Aod结果数据")
    @PostMapping("/import/grid/aod")
@@ -108,7 +112,8 @@
    @ApiOperation(value = "下载卫星遥测Aod结果数据导入模板")
    @GetMapping("/import/grid/aod/download/template")
    fun downloadAODTemplate(@ApiIgnore response: HttpServletResponse) = satelliteTelemetryService.downloadAODTemplate(response)
    fun downloadAODTemplate(@ApiIgnore response: HttpServletResponse) =
        satelliteTelemetryService.downloadAODTemplate(response)
    /**AOD数据相关**************************************************************/
@@ -145,11 +150,18 @@
        @ApiParam("网格组id") @RequestParam groupId: Int,
    ) = resPack { satelliteDataCalculateService.dataFusion(missionCode, groupId) }
    @ApiOperation(value = "进行走航融合产品的融合分析")
    @PostMapping("/product/underway/mix")
    fun mixGridData(
        @ApiParam("网格组id") @RequestParam groupId: Int,
        @ApiParam("需要融合的数据id") @RequestBody dataIdList: List<Int>,
    ) = resPack { satelliteDataCalculateService.mixGridData(groupId, dataIdList) }
    @ApiOperation(value = "生成走航热力图")
    @PostMapping("/product/underway/heatmap/build")
    fun buildUnderwayHeatmap(
        @ApiParam("使用的网格组id") @RequestParam groupId: Int,
        @ApiParam("搜索网格距离") @RequestParam searchLength:Int,
        @ApiParam("使用的走航网格数据") @RequestBody gridDataDetailList: List<GridDataDetail>
        @ApiParam("使用的走航网格数据") @RequestBody gridDataDetailList: List<GridDataDetail>,
    ) = resPack { satelliteDataCalculateService.buildHeatmap(groupId, gridDataDetailList, searchLength) }
}