feiyu02
2025-07-23 344d9006faa27ea65e3eaf5e8f9173aad2266038
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package com.flightfeather.uav.lightshare.web
 
import com.flightfeather.uav.lightshare.bean.AreaVo
import com.flightfeather.uav.lightshare.service.DataAnalysisService
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
import io.swagger.annotations.ApiParam
import org.springframework.web.bind.annotation.*
 
/**
 * 走航数据分析
 * @date 2025/5/8
 * @author feiyu02
 */
@Api(tags = ["走航数据分析API接口"])
@RestController
@RequestMapping("air/analysis")
class DataAnalysisController(private val dataAnalysisService: DataAnalysisService) {
 
    @ApiOperation(value = "污染溯源分析")
    @GetMapping("/pollution/trace")
    fun pollutionTrace(
        @ApiParam("走航任务编号") @RequestParam missionCode: String,
//        @RequestParam("page", required = false) page: Int?,
//        @RequestParam("per_page", required = false) perPage: Int?,
    ) = resPack { dataAnalysisService.pollutionTrace(missionCode) }
 
    @ApiOperation(value = "获取历史污染溯源结果")
    @GetMapping("/pollution/trace/history")
    fun fetchHistory(
        @ApiParam("走航任务编号") @RequestParam missionCode: String,
    ) = resPack { dataAnalysisService.fetchHistory(missionCode) }
 
}