| | |
| | | import io.swagger.annotations.ApiParam |
| | | import org.springframework.format.annotation.DateTimeFormat |
| | | import org.springframework.web.bind.annotation.* |
| | | import java.time.LocalDateTime |
| | | import java.time.ZoneId |
| | | import java.util.* |
| | | |
| | | /** |
| | |
| | | @PostMapping("/report/missionSummary") |
| | | fun generateMissionSummary( |
| | | @ApiParam("开始时间") @RequestParam |
| | | @JsonFormat(pattern = "YYYY-MM-DD HH:mm:ss") |
| | | @DateTimeFormat(pattern = "YYYY-MM-DD HH:mm:ss") |
| | | startTime: Date, |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | startTime: LocalDateTime, |
| | | @ApiParam("结束时间") @RequestParam |
| | | @JsonFormat(pattern = "YYYY-MM-DD HH:mm:ss") |
| | | @DateTimeFormat(pattern = "YYYY-MM-DD HH:mm:ss") |
| | | endTime: Date, |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | endTime: LocalDateTime, |
| | | @ApiParam("区域") @RequestBody areaVo: AreaVo, |
| | | ) = resPack { dataAnalysisService.generateMissionSummary(startTime, endTime, areaVo) } |
| | | ) = resPack { |
| | | dataAnalysisService.generateMissionSummary( |
| | | Date.from(startTime.atZone(ZoneId.systemDefault()).toInstant()), |
| | | Date.from(endTime.atZone(ZoneId.systemDefault()).toInstant()), |
| | | areaVo |
| | | ) |
| | | } |
| | | |
| | | @ApiOperation(value = "生成走航任务清单") |
| | | @PostMapping("/report/missionList") |
| | | fun generateMissionList( |
| | | @ApiParam("开始时间") @RequestParam |
| | | @JsonFormat(pattern = "YYYY-MM-DD HH:mm:ss") |
| | | @DateTimeFormat(pattern = "YYYY-MM-DD HH:mm:ss") |
| | | startTime: Date, |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | startTime: LocalDateTime, |
| | | @ApiParam("结束时间") @RequestParam |
| | | @JsonFormat(pattern = "YYYY-MM-DD HH:mm:ss") |
| | | @DateTimeFormat(pattern = "YYYY-MM-DD HH:mm:ss") |
| | | endTime: Date, |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | endTime: LocalDateTime, |
| | | @ApiParam("区域") @RequestBody areaVo: AreaVo, |
| | | ) = resPack { dataAnalysisService.generateMissionList(startTime, endTime, areaVo) } |
| | | ) = resPack { |
| | | dataAnalysisService.generateMissionList( |
| | | Date.from(startTime.atZone(ZoneId.systemDefault()).toInstant()), |
| | | Date.from(endTime.atZone(ZoneId.systemDefault()).toInstant()), |
| | | areaVo |
| | | ) |
| | | } |
| | | |
| | | @ApiOperation(value = "生成走航任务详情") |
| | | @PostMapping("/report/missionDetail") |
| | | fun generateMissionDetail( |
| | | @ApiParam("开始时间") @RequestParam |
| | | @JsonFormat(pattern = "YYYY-MM-DD HH:mm:ss") |
| | | @DateTimeFormat(pattern = "YYYY-MM-DD HH:mm:ss") |
| | | startTime: Date, |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | startTime: LocalDateTime, |
| | | @ApiParam("结束时间") @RequestParam |
| | | @JsonFormat(pattern = "YYYY-MM-DD HH:mm:ss") |
| | | @DateTimeFormat(pattern = "YYYY-MM-DD HH:mm:ss") |
| | | endTime: Date, |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | endTime: LocalDateTime, |
| | | @ApiParam("区域") @RequestBody areaVo: AreaVo, |
| | | ) = resPack { dataAnalysisService.generateMissionDetail(startTime, endTime, areaVo) } |
| | | ) = resPack { |
| | | dataAnalysisService.generateMissionDetail( |
| | | Date.from(startTime.atZone(ZoneId.systemDefault()).toInstant()), |
| | | Date.from(endTime.atZone(ZoneId.systemDefault()).toInstant()), |
| | | areaVo |
| | | ) |
| | | } |
| | | |
| | | @ApiOperation(value = "走航典型隐患区域统计") |
| | | @PostMapping("/report/clueByRiskArea") |
| | | fun generateClueByRiskArea( |
| | | @ApiParam("开始时间") @RequestParam |
| | | @JsonFormat(pattern = "YYYY-MM-DD HH:mm:ss") |
| | | @DateTimeFormat(pattern = "YYYY-MM-DD HH:mm:ss") |
| | | startTime: Date, |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | startTime: LocalDateTime, |
| | | @ApiParam("结束时间") @RequestParam |
| | | @JsonFormat(pattern = "YYYY-MM-DD HH:mm:ss") |
| | | @DateTimeFormat(pattern = "YYYY-MM-DD HH:mm:ss") |
| | | endTime: Date, |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | endTime: LocalDateTime, |
| | | @ApiParam("区域") @RequestBody areaVo: AreaVo, |
| | | ) = resPack { dataAnalysisService.generateClueByRiskArea(startTime, endTime, areaVo) } |
| | | ) = resPack { |
| | | dataAnalysisService.generateClueByRiskArea( |
| | | Date.from(startTime.atZone(ZoneId.systemDefault()).toInstant()), |
| | | Date.from(endTime.atZone(ZoneId.systemDefault()).toInstant()), |
| | | areaVo |
| | | ) |
| | | } |
| | | } |