From 1a677d2b4a4bc615602f8c2a22bc07ec1356e5be Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期四, 16 十月 2025 17:39:06 +0800
Subject: [PATCH] 2025.10.16 1. 根据全局响应增强器GlobalResponseAdvice,将原先的BaseResPack接口包装函数统一去除; 2. 新增三种类型的数据产品数据库实体 3. 新增典型问题场景清单中间数据产品接口

---
 src/main/kotlin/cn/flightfeather/supervision/lightshare/web/SubtaskController.kt |   58 ++++++++++++++++++++++++++++++++++++++++++----------------
 1 files changed, 42 insertions(+), 16 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 46d2217..21eda2a 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/SubtaskController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/SubtaskController.kt
@@ -3,6 +3,7 @@
 import cn.flightfeather.supervision.common.log.BizLog
 import cn.flightfeather.supervision.common.log.WorkStreamLogInfo
 import cn.flightfeather.supervision.common.utils.Constant
+import cn.flightfeather.supervision.config.IgnoreResponseAdvice
 import cn.flightfeather.supervision.domain.ds1.entity.Subtask
 import cn.flightfeather.supervision.lightshare.service.SubtaskService
 import cn.flightfeather.supervision.lightshare.vo.AreaVo
@@ -17,22 +18,26 @@
 @RestController
 @RequestMapping("/subtask")
 class SubtaskController(val subtaskService: SubtaskService, private val bizLog: BizLog) {
+    @IgnoreResponseAdvice
     @GetMapping
     fun getAll() = subtaskService.findAll()
 
+    @IgnoreResponseAdvice
     @PutMapping
     fun add(@RequestBody subtask: Subtask) = subtaskService.save(subtask)
 
+    @IgnoreResponseAdvice
     @PutMapping("/addlist")
     fun addList(@RequestBody subtasklist: List<Subtask>) = subtaskService.saveList(subtasklist)
 
+    @IgnoreResponseAdvice
     @PostMapping
     fun update(@RequestBody subtask: Subtask): Int {
         val res = subtaskService.changeStatus(subtask)
         if (subtask.status == Constant.TaskProgress.RUNINGSTATUS3.text) {
             val event = "鍦�${subtask.scensename}缁撴潫宸℃煡"
             bizLog.info(WorkStreamLogInfo(subtask.executorguids, subtask.executorrealtimes, event))
-        }else if (subtask.status == Constant.TaskProgress.RUNINGSTATUS2.text) {
+        } else if (subtask.status == Constant.TaskProgress.RUNINGSTATUS2.text) {
             val event = "鍦�${subtask.scensename}寮�濮嬪贰鏌�"
             bizLog.info(WorkStreamLogInfo(subtask.executorguids, subtask.executorrealtimes, event))
         }
@@ -41,61 +46,82 @@
 
     @ApiOperation("璋冩暣宸℃煡浠诲姟淇℃伅")
     @PostMapping("/adjust")
-    fun adjust(@RequestBody subtask: Subtask) = resPack { subtaskService.update(subtask) }
+    fun adjust(@RequestBody subtask: Subtask) = subtaskService.update(subtask)
 
+    @IgnoreResponseAdvice
     @GetMapping("/{id}")
     fun getById(@PathVariable id: String) = subtaskService.findByID(id)
 
+    @IgnoreResponseAdvice
     @DeleteMapping("/{id}")
     fun delete(@PathVariable id: String) = subtaskService.delete(id)
 
+    @IgnoreResponseAdvice
     @GetMapping("/{date}/{guid}/{type}")
-    fun getTaskPackList(@PathVariable date: String, @PathVariable guid: String, @PathVariable type: String) = subtaskService.getTaskPackList(date, guid, type)
+    fun getTaskPackList(@PathVariable date: String, @PathVariable guid: String, @PathVariable type: String) =
+        subtaskService.getTaskPackList(date, guid, type)
 
     //涓存椂娣诲姞鐢ㄦ埛绫诲瀷浣滀负绛涢�夋潯浠�
+    @IgnoreResponseAdvice
     @GetMapping("/{date}/{guid}/{type}/{userType}")
-    fun getTaskPackList(@PathVariable date: String, @PathVariable guid: String, @PathVariable type: String, @PathVariable userType: String) = subtaskService.getTaskPackList(date, guid, type, userType)
+    fun getTaskPackList(
+        @PathVariable date: String,
+        @PathVariable guid: String,
+        @PathVariable type: String,
+        @PathVariable userType: String,
+    ) = subtaskService.getTaskPackList(date, guid, type, userType)
 
+    @IgnoreResponseAdvice
     @GetMapping("/{date}/{guid}")
     fun getTaskPack(@PathVariable date: String, @PathVariable guid: String) = subtaskService.getTaskPack(date, guid)
 
+    @IgnoreResponseAdvice
     @PostMapping("/subtaskprogress")
-    fun getTaskProgress(@RequestBody areaVo: AreaVo, @RequestParam(value = "userguid", required = true) userGuid: String): TaskVo = subtaskService.getTaskProgress(areaVo, userGuid)
+    fun getTaskProgress(
+        @RequestBody areaVo: AreaVo,
+        @RequestParam(value = "userguid", required = true) userGuid: String,
+    ) = subtaskService.getTaskProgress(areaVo, userGuid)
 
+    @IgnoreResponseAdvice
     @GetMapping("/byDayTaskId")
     fun findByDayTaskID(
-            @RequestParam("dayTaskId") dayTaskId: String,
-            @RequestParam("userId") userId: String,
-            @RequestParam("userType") userType: String
+        @RequestParam("dayTaskId") dayTaskId: String,
+        @RequestParam("userId") userId: String,
+        @RequestParam("userType") userType: String,
     ) = subtaskService.findByDayTaskID(dayTaskId, userId, userType)
 
+    @IgnoreResponseAdvice
     @GetMapping("/byDate")
     fun findByDate(
-            @RequestParam("date") date: String,
-            @RequestParam("userId") userId: String
+        @RequestParam("date") date: String,
+        @RequestParam("userId") userId: String,
     ) = subtaskService.findByDate(date, userId)
 
+    @IgnoreResponseAdvice
     @GetMapping("/getSubTask")
     fun getByTopTaskAndDate(
-            @RequestParam("topTaskId") topTaskId: String,
-            @RequestParam(value = "startTime", required = false) startTime: String?,
-            @RequestParam(value = "endTime", required = false) endTime: String?,
-            @RequestParam(value = "sceneTypeId", required = false) sceneTypeId: Int?
+        @RequestParam("topTaskId") topTaskId: String,
+        @RequestParam(value = "startTime", required = false) startTime: String?,
+        @RequestParam(value = "endTime", required = false) endTime: String?,
+        @RequestParam(value = "sceneTypeId", required = false) sceneTypeId: Int?,
     ) = subtaskService.getByTopTaskAndDate(topTaskId, startTime, endTime, sceneTypeId)
 
+    @IgnoreResponseAdvice
     @ApiOperation("鑾峰彇鏌愮被鍦烘櫙鐨勫贰鏌ヤ换鍔$粺璁′俊鎭�")
     @GetMapping("/summary")
     fun getByTopTaskAndDate(
         @RequestParam("topTaskId") topTaskId: String,
-        @RequestParam(value = "sceneTypeId", required = false) sceneTypeId: Int?
+        @RequestParam(value = "sceneTypeId", required = false) sceneTypeId: Int?,
     ) = subtaskService.getSummary(topTaskId, sceneTypeId)
 
+    @IgnoreResponseAdvice
     @ApiOperation("鑾峰彇鏌愮被鍦烘櫙鐨勫贰鏌ヤ换鍔$粺璁′俊鎭�")
     @PostMapping("/summary/area")
     fun getTaskProgressByArea(
         @RequestBody areaVo: AreaVo,
     ) = subtaskService.getTaskProgressByArea(areaVo)
 
+    @IgnoreResponseAdvice
     @ApiOperation("鑾峰彇鏌愪釜鍦烘櫙鐨勫贰鏌ヤ换鍔�")
     @GetMapping("/byScene")
     fun getByScene(
@@ -108,5 +134,5 @@
     @PostMapping("/summary/area/problem")
     fun getSummaryByArea(
         @RequestBody areaVo: AreaVo,
-    ) = resPack { subtaskService.getSummaryByArea(areaVo) }
+    ) = subtaskService.getSummaryByArea(areaVo)
 }
\ No newline at end of file

--
Gitblit v1.9.3