From 9cb8d7e0f4ffca386b14a15f8a0aca4d1db23252 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期四, 30 十月 2025 15:58:45 +0800
Subject: [PATCH] 2025.10.30 新增单场景纵向统计接口
---
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ScenseController.kt | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ScenseController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ScenseController.kt
index 2e2d523..2a121fb 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ScenseController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ScenseController.kt
@@ -1,5 +1,6 @@
package cn.flightfeather.supervision.lightshare.web
+import cn.flightfeather.supervision.config.IgnoreResponseAdvice
import cn.flightfeather.supervision.domain.ds1.entity.Scense
import cn.flightfeather.supervision.domain.ds1.entity.Task
import cn.flightfeather.supervision.lightshare.service.ScenseService
@@ -16,27 +17,35 @@
@RestController
@RequestMapping("/scense")
class ScenseController(val scenseService: ScenseService) {
+ @IgnoreResponseAdvice
@GetMapping
fun getAll() = scenseService.findAll()
+ @IgnoreResponseAdvice
@PutMapping
fun add(@RequestBody scense: Scense) = scenseService.save(scense)
+ @IgnoreResponseAdvice
@PostMapping
fun update(@RequestBody scense: Scense) = scenseService.update(scense)
+ @IgnoreResponseAdvice
@PostMapping("/update/list")
fun updateList(@RequestBody sceneList: MutableList<Scense>) = scenseService.updateList(sceneList)
+ @IgnoreResponseAdvice
@PostMapping("/search")
fun find(@RequestBody scense: Scense) = scenseService.search(scense)
+ @IgnoreResponseAdvice
@GetMapping("/{id}")
fun getById(@PathVariable id: String) = scenseService.findOne(id)
+ @IgnoreResponseAdvice
@DeleteMapping("/{id}")
fun delete(@PathVariable id: String) = scenseService.delete(id)
+ @IgnoreResponseAdvice
@GetMapping("/alltype")
fun getSceneType() = scenseService.getSceneType()
@@ -46,6 +55,7 @@
* @param mode 0锛氬彧浼氳幏鍙栨�讳换鍔″搴旂殑鐩戠鐗堟湰涓瓨鍦ㄧ殑鍦烘櫙锛�1锛氶櫎浜嗙洃绠$増鏈腑瀛樺湪鐨勫満鏅紝杩樹細鑾峰彇鍓╀綑鐨勫彲鐢ㄥ満鏅�
* @return 鍦烘櫙鍒楄〃
*/
+ @IgnoreResponseAdvice
@PostMapping("/getByTask")
fun getByTaskId(@RequestBody task: Task, @RequestParam(value = "mode") mode: Int) = scenseService.getByTaskId(task, mode)
@@ -88,17 +98,17 @@
@RequestParam("lng") lng: Double,
@RequestParam("lat") lat: Double,
@RequestParam("radius") radius: Double,
- ) = resPack { scenseService.searchByCoordinate(lng, lat, radius) }
+ ) = scenseService.searchByCoordinate(lng, lat, radius)
@ApiOperation(value = "閫氳繃鏂囦欢瀵煎叆鍦烘櫙淇℃伅")
@PostMapping("/import")
fun importSceneInfo(
@RequestPart("file") files: Array<MultipartFile>,
- ) = resPack { scenseService.importSceneInfo(files) }
+ ) = scenseService.importSceneInfo(files)
@ApiOperation(value = "鍒涘缓鍦烘櫙淇℃伅")
@PutMapping("/create")
fun createScene(
@RequestBody scense: Scense
- ) = resPack { scenseService.createScene(scense) }
+ ) = scenseService.createScene(scense)
}
\ No newline at end of file
--
Gitblit v1.9.3