From ae04c5d925b0094e1a1ba1f2ce0bf6da0a6fee04 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期四, 22 一月 2026 17:27:55 +0800
Subject: [PATCH] 2026.1.22 1. 新增台账上传office文档功能; 2. 新增office文档存储原始文档名字功能
---
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ConsultationController.kt | 98 ++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 96 insertions(+), 2 deletions(-)
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ConsultationController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ConsultationController.kt
index d38442d..70e309e 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ConsultationController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ConsultationController.kt
@@ -3,6 +3,8 @@
import cn.flightfeather.supervision.domain.entity.OnLineQuestion
import cn.flightfeather.supervision.lightshare.service.OnLineQuestionService
import io.swagger.annotations.Api
+import io.swagger.annotations.ApiOperation
+import io.swagger.annotations.ApiParam
import org.springframework.web.bind.annotation.*
@Api(tags = ["鍦ㄧ嚎鍜ㄨAPI鎺ュ彛"])
@@ -10,9 +12,101 @@
@RequestMapping("/consultation")
class ConsultationController(val onLineQuestionService: OnLineQuestionService) {
+ @ApiOperation(value = "鎻愬嚭鍜ㄨ闂")
@PostMapping("/add/{userId}")
fun add(
- @PathVariable userId: String,
- @RequestBody questions: List<OnLineQuestion>
+ @ApiParam(value = "鐢ㄦ埛id") @PathVariable userId: String,
+ @ApiParam(value = "鍜ㄨ闂") @RequestBody questions: List<OnLineQuestion>
) = onLineQuestionService.addQuestions(userId, questions)
+
+ @ApiOperation(value = "鏍规嵁鍏抽敭瀛楁悳绱㈡硶寰嬫硶瑙�")
+ @GetMapping("/search/law")
+ fun searchLaw(
+ @ApiParam(value = "鐢ㄦ埛id") @RequestParam userId: String,
+ @ApiParam(value = "鍏抽敭瀛�") @RequestParam keyword: String,
+ @ApiParam(value = "鎼滅储缁撴灉鐨勭被鍨�", required = false) @RequestParam type: Byte?,
+ @ApiParam(value = "椤电爜") @RequestParam page: Int,
+ @ApiParam(value = "鍗曢〉鏁版嵁閲�") @RequestParam perPage: Int,
+ ) = onLineQuestionService.searchLaw(userId, keyword, type, page, perPage)
+
+ @ApiOperation(value = "鑾峰彇鐑棬娉曞緥娉曡")
+ @GetMapping("/topic/law")
+ fun getTopicLaw(
+ @ApiParam(value = "鐢ㄦ埛id") @RequestParam userId: String,
+ ) = onLineQuestionService.getTopicLaw(userId)
+
+ @ApiOperation(value = "鑾峰彇鐑棬娉曞緥娉曡鏉$洰")
+ @GetMapping("/topic/item")
+ fun getTopicMgtItems(
+ @ApiParam(value = "鐢ㄦ埛id") @RequestParam userId: String,
+ ) = onLineQuestionService.getTopicMgtItems(userId)
+
+ @ApiOperation(value = "鑾峰彇鐑棬闂瓟")
+ @GetMapping("/topic/qa")
+ fun getTopicQA(
+ @ApiParam(value = "鐢ㄦ埛id") @RequestParam userId: String,
+ ) = onLineQuestionService.getTopicQA(userId)
+
+ @ApiOperation(value = "鑾峰彇鐑棬妗堜緥")
+ @GetMapping("/topic/case")
+ fun getTopicCase(
+ @ApiParam(value = "鐢ㄦ埛id") @RequestParam userId: String,
+ ) = onLineQuestionService.getTopicCase(userId)
+
+ @ApiOperation(value = "鑾峰彇娉曞緥娉曡鏂囦欢")
+ @GetMapping("/law/file")
+ fun getMgtFile(
+ @ApiParam(value = "鐢ㄦ埛id") @RequestParam userId: String,
+ @ApiParam(value = "鏂囦欢id") @RequestParam fileId: String,
+ ) = onLineQuestionService.getMgtFile(userId, fileId)
+
+ @ApiOperation(value = "鑾峰彇娉曞緥娉曡鏉$洰")
+ @GetMapping("/law/item")
+ fun getMgtItem(
+ @ApiParam(value = "鐢ㄦ埛id") @RequestParam userId: String,
+ @ApiParam(value = "鏉$洰id") @RequestParam itemId: String,
+ ) = onLineQuestionService.getMgtItem(userId, itemId)
+
+ @ApiOperation(value = "鑾峰彇闂")
+ @GetMapping("/law/question")
+ fun getQuestion(
+ @ApiParam(value = "鐢ㄦ埛id") @RequestParam userId: String,
+ @ApiParam(value = "闂id") @RequestParam qId: String,
+ ) = onLineQuestionService.getQuestion(userId, qId)
+
+ @ApiOperation(value = "鑾峰彇绛旀")
+ @GetMapping("/law/answer")
+ fun getAnswers(
+ @ApiParam(value = "鐢ㄦ埛id") @RequestParam userId: String,
+ @ApiParam(value = "闂id") @RequestParam qId: String,
+ ) = onLineQuestionService.getAnswers(userId, qId)
+
+ @ApiOperation(value = "鑾峰彇妗堜緥")
+ @GetMapping("/law/case")
+ fun getCase(
+ @ApiParam(value = "鐢ㄦ埛id") @RequestParam userId: String,
+ @ApiParam(value = "妗堜緥id") @RequestParam caseId: String,
+ ) = onLineQuestionService.getCase(userId, caseId)
+
+ @ApiOperation(value = "鑾峰彇闂")
+ @GetMapping("/question/type")
+ fun getQuestionsByType(
+ @ApiParam(value = "鐢ㄦ埛id") @RequestParam userId: String,
+ @ApiParam(value = "瑕佺礌澶х被", required = false) @RequestParam kind: Byte?,
+ @ApiParam(value = "瑕佺礌灏忕被", required = false) @RequestParam subKind: Byte?,
+ @ApiParam(value = "椤电爜") @RequestParam page: Int,
+ @ApiParam(value = "鍗曢〉鏁版嵁閲�") @RequestParam perPage: Int,
+ ) = onLineQuestionService.getQuestionsByType(userId, kind, subKind, page, perPage)
+
+ @ApiOperation(value = "鑾峰彇鐜繚瑕佺礌澶х被")
+ @GetMapping("/elementtype")
+ fun getEnElementTypes(
+ @ApiParam(value = "鐢ㄦ埛id") @RequestParam userId: String,
+ ) = onLineQuestionService.getEnElementTypes(userId)
+
+ @ApiOperation(value = "鑾峰彇鐜繚瑕佺礌灏忕被")
+ @GetMapping("/elementsubtype")
+ fun getEnElementSubTypes(
+ @ApiParam(value = "鐢ㄦ埛id") @RequestParam userId: String,
+ ) = onLineQuestionService.getEnElementSubTypes(userId)
}
\ No newline at end of file
--
Gitblit v1.9.3