feiyu02
2024-07-02 bf3bf9ff25ac106b556b2427cc382c8fcca63bff
src/main/kotlin/com/flightfeather/uav/lightshare/web/MissionController.kt
@@ -2,8 +2,11 @@
import com.flightfeather.uav.domain.entity.Mission
import com.flightfeather.uav.lightshare.service.MissionService
import io.swagger.annotations.Api
import org.springframework.web.bind.annotation.*
import javax.servlet.http.HttpServletResponse
@Api(tags = ["走航监测任务API接口"])
@RestController
@RequestMapping("air/mission")
class MissionController(private val missionService: MissionService) {
@@ -24,4 +27,15 @@
    fun deleteMission(
        @RequestParam("missionCode") missionCode: String
    ) = missionService.deleteMission(missionCode)
    @PostMapping("/delete/data/vehicle")
    fun deleteMissionAndData(
        @RequestParam("missionCode") missionCode: String
    ) = resPack { missionService.deleteMissionAndData(missionCode) }
    @GetMapping("/report")
    fun getReport(
        @RequestParam missionCode: String,
        response: HttpServletResponse,
    ) = missionService.getReport(missionCode, response)
}