From 275ad59f206d9bc1801b28daeb31b4207f609ce3 Mon Sep 17 00:00:00 2001
From: hcong <1050828145@qq.com>
Date: 星期四, 02 一月 2025 09:10:09 +0800
Subject: [PATCH] 1. 修改网格组数据导入接口返回值为bool 2. 修改网格组数据批量更新 使用Transactional注解

---
 src/main/kotlin/com/flightfeather/uav/lightshare/web/MissionController.kt |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/src/main/kotlin/com/flightfeather/uav/lightshare/web/MissionController.kt b/src/main/kotlin/com/flightfeather/uav/lightshare/web/MissionController.kt
index e96d5e5..d220000 100644
--- a/src/main/kotlin/com/flightfeather/uav/lightshare/web/MissionController.kt
+++ b/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) {
@@ -20,8 +23,24 @@
         @RequestBody mission: Mission
     ) = missionService.createMission(mission)
 
+    @PostMapping("/update")
+    fun updateMission(
+        @RequestBody mission: Mission
+    ) = missionService.updateMission(mission)
+
     @PostMapping("/delete")
     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)
 }
\ No newline at end of file

--
Gitblit v1.9.3