From 5bff489eb92a807c25d3746d8088518bd259a50b Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期一, 13 十月 2025 16:15:10 +0800
Subject: [PATCH] Rename .java to .kt
---
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ProblemlistController.kt | 39 +++++++++++++++++++++++++++++----------
1 files changed, 29 insertions(+), 10 deletions(-)
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ProblemlistController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ProblemlistController.kt
index 416e7e9..dac5f41 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ProblemlistController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ProblemlistController.kt
@@ -6,6 +6,8 @@
import cn.flightfeather.supervision.lightshare.service.ProblemlistService
import cn.flightfeather.supervision.lightshare.service.SubtaskService
import cn.flightfeather.supervision.lightshare.vo.*
+import com.fasterxml.jackson.core.type.TypeReference
+import com.fasterxml.jackson.databind.ObjectMapper
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
import io.swagger.annotations.ApiParam
@@ -46,15 +48,15 @@
fun setDeleteStatus(@PathVariable id: String) = problemlistService.setDeleteStatus(id)
@PostMapping("/add")
- fun addProblem(@RequestBody problemlistVo: ProblemlistVo) {
+ fun addProblem(@RequestBody problemlistVo: ProblemListVo) {
problemlistService.addProblem(problemlistVo)
}
@PostMapping("/getbyarea")
- fun getByArea(@RequestBody areaVo: AreaVo): List<ProblemlistVo> = problemlistService.getByArea(areaVo)
+ fun getByArea(@RequestBody areaVo: AreaVo): List<ProblemListVo> = problemlistService.getByArea(areaVo)
@GetMapping("/getbytoptask")
- fun getByTopTask(@RequestParam(value = "tguid", required = true) tguid: String): List<ProblemlistVo> =
+ fun getByTopTask(@RequestParam(value = "tguid", required = true) tguid: String): List<ProblemListVo> =
problemlistService.getByTopTask(tguid)
@PostMapping("/getStatisticalResult")
@@ -74,7 +76,7 @@
fun getProblemsByScene(
@RequestParam(value = "sceneId", required = true) sceneId: String,
@RequestParam date: String,
- ): List<ProblemlistVo> = problemlistService.getProblemByScene(sceneId, date)
+ ): List<ProblemListVo> = problemlistService.getProblemByScene(sceneId, date)
@GetMapping("/month_anlysis")
fun getMonthProblemsById(
@@ -86,8 +88,7 @@
@PostMapping("/check")
fun checkProblem(
@ApiParam(value = "闂id涓婚敭") @RequestParam("pId") pId: String,
- @ApiParam(value = "瀹℃牳鎿嶄綔, 0: 瀹℃牳閫氳繃锛�1: 瀹℃牳涓嶉�氳繃锛�2: 鏁存敼閫氳繃锛�3: 鏁存敼涓嶉�氳繃",
- allowableValues = "0,1,2,3") @RequestParam("action") action: Byte,
+ @ApiParam(value = "瀹℃牳鎿嶄綔, 0: 瀹℃牳閫氳繃锛�1: 瀹℃牳涓嶉�氳繃锛�2: 鏁存敼閫氳繃锛�3: 鏁存敼涓嶉�氳繃锛�4锛氶棶棰樺鏍告挙鍥烇紱5锛氭暣鏀瑰鏍告挙鍥�") @RequestParam("action") action: Byte,
@ApiParam(value = "瀹℃牳澶囨敞") @RequestParam("remark") remark: String,
@ApiParam(value = "鐢ㄦ埛id") @RequestParam("userId") userId: String,
@ApiParam(value = "鐢ㄦ埛鍚�") @RequestParam("userName") userName: String,
@@ -96,9 +97,20 @@
@ApiOperation(value = "鏂板涓�涓棶棰�", notes = "绠�鍖栦笂浼犳墍闇�闂淇℃伅锛屽皢澶ч儴鍒嗘搷浣滀氦鐢卞悗鍙板畬鎴�")
@PostMapping("/newProblem")
fun newProblem(
- @RequestParam("problemVo") problemVo: String,
- @RequestPart("images") files: Array<MultipartFile>,
+ @ApiParam("闂淇℃伅json") @RequestParam("problemVo") problemVo: String,
+ @ApiParam("闂鍥剧墖") @RequestPart("images") files: Array<MultipartFile>,
) = problemlistService.newProblem(problemVo, files)
+
+ @ApiOperation("鏇存柊涓�涓棶棰�")
+ @PostMapping("/updateProblem")
+ fun updateProblem(
+ @ApiParam("闂淇℃伅json") @RequestParam("problem") problem: String,
+ @ApiParam("鍒犻櫎鐨勯棶棰樺浘鐗噄d") @RequestParam("deleteImg") deleteImg: List<String>,
+ @ApiParam("闂鍥剧墖") @RequestPart("images") images: Array<MultipartFile>,
+ ) = resPack {
+ val problemVo = ObjectMapper().readValue(problem, object : TypeReference<ProblemListVo>() {})
+ problemlistService.updateProblem(problemVo, deleteImg, images)
+ }
@ApiOperation(value = "鏁存敼涓�涓棶棰�", notes = "绠�鍖栦笂浼犳墍闇�闂淇℃伅锛屽皢澶ч儴鍒嗘搷浣滀氦鐢卞悗鍙板畬鎴�")
@PostMapping("/changeProblem")
@@ -106,6 +118,14 @@
@RequestParam("problemId") problemId: String,
@RequestPart("images") files: Array<MultipartFile>,
) = problemlistService.changeProblem(problemId, files)
+
+ @ApiOperation("鏇存柊涓�涓棶棰樻暣鏀�")
+ @PostMapping("/updateChange")
+ fun updateChange(
+ @ApiParam("闂id") @RequestParam problemId: String,
+ @ApiParam("鍒犻櫎鐨勬暣鏀瑰浘鐗噄d") @RequestParam("deleteImg") deleteImg: List<String>,
+ @ApiParam("鏂板鏁存敼鍥剧墖") @RequestPart("images") images: Array<MultipartFile>,
+ ) = resPack { problemlistService.updateChange(problemId, deleteImg, images) }
@ApiOperation(value = "閫氳繃浠诲姟鏌ユ壘闂")
@GetMapping("/subtask")
@@ -125,8 +145,7 @@
@PostMapping("/summary/scene")
fun getSceneProSummary(
@RequestBody areaVo: AreaVo,
- @ApiParam(value = "鎺掑簭瀛楁", allowableValues = "pro, changePer") @RequestParam sortBy: String,
@ApiParam(value = "椤电爜") @RequestParam(value = "page") page: Int,
@ApiParam(value = "鍗曢〉鏁版嵁閲�") @RequestParam(value = "per_page") perPage: Int,
- ) = resPack { problemlistService.getSceneProSummary(areaVo, sortBy, page, perPage) }
+ ) = resPack { problemlistService.getSceneProSummary(areaVo, page, perPage) }
}
\ No newline at end of file
--
Gitblit v1.9.3