From a3cc1d220f8a1de11874bebceba0130d32157ff1 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期二, 30 九月 2025 09:26:32 +0800
Subject: [PATCH] 2025.9.30 1. 联合前端调试数据产品接口(待完成)

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

diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MediafileController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MediafileController.kt
index 45a8e1f..47c5249 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MediafileController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MediafileController.kt
@@ -3,13 +3,15 @@
 import cn.flightfeather.supervision.domain.ds1.entity.Mediafile
 import cn.flightfeather.supervision.lightshare.service.MediafileService
 import io.swagger.annotations.Api
+import io.swagger.annotations.ApiOperation
+import io.swagger.annotations.ApiParam
 import org.springframework.web.bind.annotation.*
 import org.springframework.web.multipart.MultipartFile
 
 @Api(tags = ["MediafileController"], description = "澶氬獟浣撴枃浠禔PI鎺ュ彛")
 @RestController
 @RequestMapping("/mediafile")
-class MediafileController (val mediafileService: MediafileService){
+class MediafileController(val mediafileService: MediafileService) {
     @GetMapping
     fun getAll() = mediafileService.findAll()
 
@@ -20,16 +22,30 @@
     fun update(@RequestBody mediafile: Mediafile) = mediafileService.update(mediafile)
 
     @GetMapping("/{id}")
-    fun getById(@PathVariable id:String) = mediafileService.findOne(id)
+    fun getById(@PathVariable id: String) = mediafileService.findOne(id)
 
+    @ApiOperation("鏍规嵁涓氬姟绫诲瀷鑾峰彇鏂囦欢")
     @GetMapping("/{id}/{btid}")
-    fun getBySubtaskId(@PathVariable id:String,@PathVariable btid:String) = mediafileService.findBysubtaskbtid(id,btid)
+    fun getBySubtaskId(
+        @ApiParam("宸℃煡id") @PathVariable id: String,
+        @ApiParam("鏂囦欢涓氬姟绫诲瀷id", allowableValues = "") @PathVariable btid: String,
+    ) = mediafileService.findBysubtaskbtid(id, btid)
+
+    @ApiOperation("鑾峰彇鎵�鏈変换鎰忔媿甯歌璁板綍鍥剧墖", notes = "閫氳繃宸℃煡璁板綍id鎴栧贰鏌ヤ换鍔d鑾峰彇瀵瑰簲鐨勬墍鏈変换鎰忔媿鍥剧墖锛屼袱涓弬鏁颁换閫夊叾涓�鍗冲彲")
+    @GetMapping("/routine")
+    fun getRoutineRecord(
+        @ApiParam("宸℃煡璁板綍id", required = false) @RequestParam(required = false) iGuid: String?,
+        @ApiParam("宸℃煡浠诲姟id", required = false) @RequestParam(required = false) stGuid: String?,
+    ) = resPack { mediafileService.getRoutineRecord(iGuid, stGuid) }
 
     @DeleteMapping("/{id}")
-    fun delete (@PathVariable id: String) = mediafileService.delete(id)
+    fun delete(@PathVariable id: String) = mediafileService.delete(id)
 
     @PostMapping("/add")
-    fun addProblem(@RequestParam("mediafileVoList") mediafileVoList: String, @RequestPart("Photos") files: Array<MultipartFile>) {
-        mediafileService.addMedifile(mediafileVoList,files)
+    fun addProblem(
+        @RequestParam("mediafileVoList") mediafileVoList: String,
+        @RequestPart("Photos") files: Array<MultipartFile>,
+    ) {
+        mediafileService.addMedifile(mediafileVoList, files)
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3