From d649f734c44541641158aec2d6b10d630f5a0827 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期四, 25 十二月 2025 17:25:16 +0800
Subject: [PATCH] 2025.12.19 1. 动态溯源相关分析逻辑调整; 2. 走航报告接口参数调整;

---
 src/main/kotlin/com/flightfeather/uav/lightshare/web/DataAnalysisController.kt |   39 ++++++++++++++++++++++++++-------------
 1 files changed, 26 insertions(+), 13 deletions(-)

diff --git a/src/main/kotlin/com/flightfeather/uav/lightshare/web/DataAnalysisController.kt b/src/main/kotlin/com/flightfeather/uav/lightshare/web/DataAnalysisController.kt
index 8fd3212..f06e332 100644
--- a/src/main/kotlin/com/flightfeather/uav/lightshare/web/DataAnalysisController.kt
+++ b/src/main/kotlin/com/flightfeather/uav/lightshare/web/DataAnalysisController.kt
@@ -1,17 +1,13 @@
 package com.flightfeather.uav.lightshare.web
 
-import com.fasterxml.jackson.annotation.JsonFormat
 import com.flightfeather.uav.common.exception.BizException
 import com.flightfeather.uav.lightshare.bean.AnalysisOption
-import com.flightfeather.uav.lightshare.bean.AreaVo
 import com.flightfeather.uav.lightshare.service.DataAnalysisService
 import com.flightfeather.uav.socket.eunm.FactorType
 import io.swagger.annotations.Api
 import io.swagger.annotations.ApiOperation
 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.*
 
@@ -36,7 +32,8 @@
     @GetMapping("/pollution/trace/history")
     fun fetchHistory(
         @ApiParam("璧拌埅浠诲姟缂栧彿") @RequestParam missionCode: String,
-    ) = resPack { dataAnalysisService.fetchHistory(missionCode) }
+        @ApiParam("鏈�灏忔薄鏌撶櫨鍒嗘瘮锛岀敤浜庣瓫閫夊紓甯告暟鎹偣锛堝彲閫夛級") @RequestParam(required = false) minPer: Double? = null,
+    ) = resPack { dataAnalysisService.fetchHistory(missionCode, minPer) }
 
     @ApiOperation(value = "鐢熸垚璧拌埅浠诲姟姹囨�荤粺璁�")
     @PostMapping("/report/missionSummary")
@@ -52,7 +49,10 @@
         dataAnalysisService.generateMissionSummary(
             Date.from(startTime.atZone(ZoneId.systemDefault()).toInstant()),
             Date.from(endTime.atZone(ZoneId.systemDefault()).toInstant()),
-            areaVo
+            areaVo,
+            analysisOption.removeOtherDistrict,
+            analysisOption.removeNoPollutedSource,
+            analysisOption.minPer,
         )
     }
 
@@ -60,7 +60,8 @@
     @GetMapping("/report/missionSummary/one")
     fun generateOneMissionSummary(
         @ApiParam("浠诲姟缂栧彿") @RequestParam missionCode: String,
-    ) = resPack { dataAnalysisService.generateMissionSummary(missionCode) }
+        @ApiParam("鏈�灏忔薄鏌撶櫨鍒嗘瘮锛岀敤浜庣瓫閫夊紓甯告暟鎹偣锛堝彲閫夛級") @RequestParam(required = false) minPer: Double? = null,
+    ) = resPack { dataAnalysisService.generateMissionSummary(missionCode, minPer) }
 
     @ApiOperation(value = "鐢熸垚璧拌埅浠诲姟娓呭崟")
     @PostMapping("/report/missionList")
@@ -76,7 +77,10 @@
         dataAnalysisService.generateMissionList(
             Date.from(startTime.atZone(ZoneId.systemDefault()).toInstant()),
             Date.from(endTime.atZone(ZoneId.systemDefault()).toInstant()),
-            areaVo
+            areaVo,
+            analysisOption.removeOtherDistrict,
+            analysisOption.removeNoPollutedSource,
+            analysisOption.minPer,
         )
     }
 
@@ -95,7 +99,10 @@
         dataAnalysisService.generateMissionDetail(
             Date.from(startTime.atZone(ZoneId.systemDefault()).toInstant()),
             Date.from(endTime.atZone(ZoneId.systemDefault()).toInstant()),
-            areaVo,granularity
+            areaVo,granularity,
+            analysisOption.removeOtherDistrict,
+            analysisOption.removeNoPollutedSource,
+            analysisOption.minPer,
         )
     }
 
@@ -105,7 +112,8 @@
         @ApiParam("浠诲姟缂栧彿") @RequestParam missionCode: String,
         @ApiParam("鏁版嵁棰楃矑搴�", allowableValues = "SECOND, MINUTE, HOUR") @RequestParam(required = false)
         granularity: String?,
-    ) = resPack { dataAnalysisService.generateMissionDetail(missionCode, granularity) }
+        @ApiParam("鏈�灏忔薄鏌撶櫨鍒嗘瘮锛岀敤浜庣瓫閫夊紓甯告暟鎹偣锛堝彲閫夛級") @RequestParam(required = false) minPer: Double? = null,
+    ) = resPack { dataAnalysisService.generateMissionDetail(missionCode, granularity, minPer) }
 
     @ApiOperation(value = "璧拌埅鍏稿瀷闅愭偅鍖哄煙缁熻")
     @PostMapping("/report/clueByRiskArea")
@@ -122,7 +130,8 @@
             Date.from(endTime.atZone(ZoneId.systemDefault()).toInstant()),
             areaVo,
             analysisOption.removeOtherDistrict,
-            analysisOption.removeNoPollutedSource
+            analysisOption.removeNoPollutedSource,
+            analysisOption.minPer,
         )
     }
 
@@ -130,7 +139,8 @@
     @GetMapping("/report/clueByRiskArea/one")
     fun generateOneClueByRiskArea(
         @ApiParam("浠诲姟缂栧彿") @RequestParam missionCode: String,
-    ) = resPack { dataAnalysisService.generateClueByRiskArea(missionCode) }
+        @ApiParam("鏈�灏忔薄鏌撶櫨鍒嗘瘮锛岀敤浜庣瓫閫夊紓甯告暟鎹偣锛堝彲閫夛級") @RequestParam(required = false) minPer: Double? = null,
+    ) = resPack { dataAnalysisService.generateClueByRiskArea(missionCode, minPer) }
 
     @ApiOperation(value = "鍙犲姞铻嶅悎鍒嗘瀽")
     @PostMapping("/report/gridFusion")
@@ -148,7 +158,10 @@
             factorTypes,
             Date.from(startTime.atZone(ZoneId.systemDefault()).toInstant()),
             Date.from(endTime.atZone(ZoneId.systemDefault()).toInstant()),
-            areaVo
+            areaVo,
+            analysisOption.removeOtherDistrict,
+            analysisOption.removeNoPollutedSource,
+            analysisOption.minPer,
         )
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3