| | |
| | | import com.fasterxml.jackson.annotation.JsonFormat |
| | | import com.flightfeather.uav.lightshare.bean.AreaVo |
| | | import com.flightfeather.uav.lightshare.service.DataAnalysisService |
| | | import com.flightfeather.uav.socket.eunm.FactorType |
| | | import io.swagger.annotations.Api |
| | | import io.swagger.annotations.ApiOperation |
| | | import io.swagger.annotations.ApiParam |
| | |
| | | ) |
| | | } |
| | | |
| | | @ApiOperation(value = "生成走航任务汇总统计") |
| | | @GetMapping("/report/missionSummary/one") |
| | | fun generateOneMissionSummary( |
| | | @ApiParam("任务编号") @RequestParam missionCode: String, |
| | | ) = resPack { dataAnalysisService.generateMissionSummary(missionCode) } |
| | | |
| | | @ApiOperation(value = "生成走航任务清单") |
| | | @PostMapping("/report/missionList") |
| | | fun generateMissionList( |
| | |
| | | ) |
| | | } |
| | | |
| | | @ApiOperation(value = "生成走航任务详情") |
| | | @GetMapping("/report/missionDetail/one") |
| | | fun generateOneMissionDetail( |
| | | @ApiParam("任务编号") @RequestParam missionCode: String, |
| | | ) = resPack { dataAnalysisService.generateMissionDetail(missionCode) } |
| | | |
| | | @ApiOperation(value = "走航典型隐患区域统计") |
| | | @PostMapping("/report/clueByRiskArea") |
| | | fun generateClueByRiskArea( |
| | |
| | | areaVo |
| | | ) |
| | | } |
| | | |
| | | @ApiOperation(value = "走航典型隐患区域统计") |
| | | @GetMapping("/report/clueByRiskArea/one") |
| | | fun generateOneClueByRiskArea( |
| | | @ApiParam("任务编号") @RequestParam missionCode: String, |
| | | ) = resPack { dataAnalysisService.generateClueByRiskArea(missionCode) } |
| | | |
| | | @ApiOperation(value = "叠加融合分析") |
| | | @PostMapping("/report/gridFusion") |
| | | fun generateGridFusion( |
| | | @ApiParam("开始时间") @RequestParam |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | startTime: LocalDateTime, |
| | | @ApiParam("结束时间") @RequestParam |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | endTime: LocalDateTime, |
| | | @ApiParam("需要统计的监测因子", example = "NO2, CO") @RequestParam |
| | | factorTypes: String, |
| | | @ApiParam("区域") @RequestBody areaVo: AreaVo, |
| | | ) = resPack { |
| | | dataAnalysisService.generateGridFusion( |
| | | factorTypes.split(",").map { FactorType.valueOf(it) }, |
| | | Date.from(startTime.atZone(ZoneId.systemDefault()).toInstant()), |
| | | Date.from(endTime.atZone(ZoneId.systemDefault()).toInstant()), |
| | | areaVo |
| | | ) |
| | | } |
| | | } |