From b212ef0208cb094f63ea8a239a1361f8e859c839 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期一, 08 七月 2024 17:40:39 +0800
Subject: [PATCH] 2024.7.8

---
 src/main/kotlin/cn/flightfeather/supervision/lightshare/web/SubtaskController.kt |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/SubtaskController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/SubtaskController.kt
index 69d5aa6..dca0a62 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/SubtaskController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/SubtaskController.kt
@@ -6,7 +6,9 @@
 import cn.flightfeather.supervision.lightshare.vo.TaskVo
 import io.swagger.annotations.Api
 import io.swagger.annotations.ApiOperation
+import org.springframework.format.annotation.DateTimeFormat
 import org.springframework.web.bind.annotation.*
+import java.time.LocalDateTime
 
 @Api(tags = ["SubtaskController"], description = "宸℃煡瀛愪换鍔PI鎺ュ彛")
 @RestController
@@ -70,4 +72,24 @@
         @RequestParam("topTaskId") topTaskId: String,
         @RequestParam(value = "sceneTypeId", required = false) sceneTypeId: Int?
     ) = subtaskService.getSummary(topTaskId, sceneTypeId)
+
+    @ApiOperation("鑾峰彇鏌愮被鍦烘櫙鐨勫贰鏌ヤ换鍔$粺璁′俊鎭�")
+    @PostMapping("/summary/area")
+    fun getTaskProgressByArea(
+        @RequestBody areaVo: AreaVo,
+    ) = resPack { subtaskService.getTaskProgressByArea(areaVo) }
+
+    @ApiOperation("鑾峰彇鏌愪釜鍦烘櫙鐨勫贰鏌ヤ换鍔�")
+    @GetMapping("/byScene")
+    fun getByScene(
+        @RequestParam sceneId: String,
+        @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") startTime: LocalDateTime?,
+        @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") endTime: LocalDateTime?,
+    ) = subtaskService.getByScene(sceneId, startTime, endTime)
+
+    @ApiOperation("鑾峰彇鏌愮被鍦烘櫙鐨勫贰鏌ヤ换鍔$粺璁′俊鎭�")
+    @PostMapping("/summary/area/problem")
+    fun getSummaryByArea(
+        @RequestBody areaVo: AreaVo,
+    ) = resPack { subtaskService.getSummaryByArea(areaVo) }
 }
\ No newline at end of file

--
Gitblit v1.9.3