From 85ef942e7195abeb71466b7159c3ee30161e1e54 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期二, 07 四月 2026 08:51:01 +0800
Subject: [PATCH] 2026.4.7
---
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MediafileController.kt | 33 ++++++++++++++++++++++++++-------
1 files changed, 26 insertions(+), 7 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 47c5249..1c49df8 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MediafileController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/MediafileController.kt
@@ -1,29 +1,38 @@
package cn.flightfeather.supervision.lightshare.web
+import cn.flightfeather.supervision.config.IgnoreResponseAdvice
import cn.flightfeather.supervision.domain.ds1.entity.Mediafile
import cn.flightfeather.supervision.lightshare.service.MediafileService
+import cn.flightfeather.supervision.lightshare.vo.ExcelConfigVo
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
+import springfox.documentation.annotations.ApiIgnore
+import javax.servlet.http.HttpServletResponse
@Api(tags = ["MediafileController"], description = "澶氬獟浣撴枃浠禔PI鎺ュ彛")
@RestController
@RequestMapping("/mediafile")
class MediafileController(val mediafileService: MediafileService) {
+ @IgnoreResponseAdvice
@GetMapping
fun getAll() = mediafileService.findAll()
+ @IgnoreResponseAdvice
@PutMapping
fun add(@RequestBody mediafile: Mediafile) = mediafileService.save(mediafile)
+ @IgnoreResponseAdvice
@PostMapping
fun update(@RequestBody mediafile: Mediafile) = mediafileService.update(mediafile)
+ @IgnoreResponseAdvice
@GetMapping("/{id}")
fun getById(@PathVariable id: String) = mediafileService.findOne(id)
+ @IgnoreResponseAdvice
@ApiOperation("鏍规嵁涓氬姟绫诲瀷鑾峰彇鏂囦欢")
@GetMapping("/{id}/{btid}")
fun getBySubtaskId(
@@ -31,16 +40,11 @@
@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) }
-
+ @IgnoreResponseAdvice
@DeleteMapping("/{id}")
fun delete(@PathVariable id: String) = mediafileService.delete(id)
+ @IgnoreResponseAdvice
@PostMapping("/add")
fun addProblem(
@RequestParam("mediafileVoList") mediafileVoList: String,
@@ -48,4 +52,19 @@
) {
mediafileService.addMedifile(mediafileVoList, files)
}
+
+ @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?,
+ ) = mediafileService.getRoutineRecord(iGuid, stGuid)
+
+ @IgnoreResponseAdvice
+ @ApiOperation("涓嬭浇鍥剧墖")
+ @PostMapping("/pic/download")
+ fun downloadPic(
+ @RequestBody config: ExcelConfigVo,
+ @ApiIgnore response: HttpServletResponse
+ ) = mediafileService.downloadPic(config, response)
}
\ No newline at end of file
--
Gitblit v1.9.3