| | |
| | | import io.swagger.annotations.Api |
| | | import io.swagger.annotations.ApiOperation |
| | | import io.swagger.annotations.ApiParam |
| | | import org.springframework.format.annotation.DateTimeFormat |
| | | import org.springframework.web.bind.annotation.* |
| | | import org.springframework.web.multipart.MultipartFile |
| | | import springfox.documentation.annotations.ApiIgnore |
| | | import java.time.LocalDateTime |
| | | import javax.servlet.http.HttpServletResponse |
| | | |
| | | /** |
| | | * 卫星遥测 |
| | |
| | | fun fetchGridData( |
| | | @ApiParam("网格组id") @RequestParam groupId: Int, |
| | | @ApiParam("遥测数据时间") |
| | | @RequestParam(required = false) @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") dataTime: LocalDateTime?, |
| | | @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") dataTime: LocalDateTime?, |
| | | @ApiParam("遥测数据类型", allowableValues = "0:原始卫星遥测数据;1:融合数据") @RequestParam(required = false) type: Int?, |
| | | ) = resPack { satelliteTelemetryService.fetchGridData(groupId, dataTime, type) } |
| | | |
| | |
| | | @ApiParam("网格组id") @RequestParam(required = false) groupId: Int?, |
| | | @ApiParam("网格单元格id") @RequestParam(required = false) cellId: Int?, |
| | | ) = resPack { satelliteTelemetryService.fetchGridDataDetail(dataId, groupId, cellId) } |
| | | |
| | | |
| | | @ApiOperation(value = "导入卫星遥测PM2.5结果数据") |
| | | @PostMapping("/import/grid/data") |
| | | fun importGridData( |
| | | @ApiParam("网格组id") @RequestParam groupId: Int, |
| | | @ApiParam("遥测数据时间") |
| | | @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") dateTime: LocalDateTime, |
| | | @ApiParam("是否覆盖旧数据") @RequestParam update: Boolean, |
| | | @RequestParam("excel") file: MultipartFile, |
| | | ) = resPack { |
| | | satelliteTelemetryService.importGridData(groupId, dateTime, update, file) |
| | | } |
| | | |
| | | @ApiOperation(value = "下载卫星遥测PM2.5结果数据导入模板") |
| | | @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( |
| | | @ApiParam("网格组id") @RequestParam groupId: Int, |
| | | @ApiParam("遥测数据时间") |
| | | @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") dateTime: LocalDateTime, |
| | | @ApiParam("是否覆盖旧数据") @RequestParam update: Boolean, |
| | | @RequestParam("excel") file: MultipartFile, |
| | | ) = resPack { |
| | | satelliteTelemetryService.importGridAOD(groupId, dateTime, update, file) |
| | | } |
| | | |
| | | @ApiOperation(value = "下载卫星遥测Aod结果数据导入模板") |
| | | @GetMapping("/import/grid/aod/download/template") |
| | | fun downloadAODTemplate(@ApiIgnore response: HttpServletResponse) = satelliteTelemetryService.downloadAODTemplate(response) |
| | | } |