From 196bb14112448857a885e32dc4149e308e00b01a Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期四, 15 八月 2024 11:57:15 +0800
Subject: [PATCH] 2024.8.15 各项修正

---
 src/main/kotlin/cn/flightfeather/supervision/lightshare/web/EvaluationController.kt |   48 ++++++++++++++++++++++++++++++++++--------------
 1 files changed, 34 insertions(+), 14 deletions(-)

diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/EvaluationController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/EvaluationController.kt
index cb04c6e..0324cb9 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/EvaluationController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/EvaluationController.kt
@@ -3,6 +3,7 @@
 import cn.flightfeather.supervision.domain.entity.Evaluation
 import cn.flightfeather.supervision.lightshare.service.EvaluationService
 import cn.flightfeather.supervision.lightshare.vo.AssessmentSearchCondition
+import cn.flightfeather.supervision.lightshare.vo.UserSearchCondition
 import io.swagger.annotations.Api
 import io.swagger.annotations.ApiOperation
 import io.swagger.annotations.ApiParam
@@ -20,7 +21,7 @@
     @ApiOperation(value = "涓婁紶涓�鏉¤瘎浼版�诲垎璁板綍")
     @PutMapping
     fun add(
-        @ApiParam(value = "璇勪及鏁版嵁") @RequestBody evaluation: Evaluation
+        @ApiParam(value = "璇勪及鏁版嵁") @RequestBody evaluation: Evaluation,
     ) = evaluationService.save(evaluation)
 
     @ApiOperation(value = "鏇存柊涓�鏉¤瘎浼版�诲垎璁板綍")
@@ -44,7 +45,7 @@
         @ApiParam(value = "缁撴潫鏃堕棿") @RequestParam("endTime") endTime: String,
         @ApiParam(value = "鍦烘櫙绫诲瀷id") @RequestParam("sceneTypeId", required = false) sceneTypeId: Int?,
         @ApiParam(value = "瀛愪换鍔d") @RequestParam("erGuid", required = false) erGuid: String?,
-        @ApiParam(value = "璇勪及淇℃伅涓婚敭id") @RequestParam("eId", required = false) eId: String?
+        @ApiParam(value = "璇勪及淇℃伅涓婚敭id") @RequestParam("eId", required = false) eId: String?,
     ) = evaluationService.getTotalPoints(userId, evaluatorType, startTime, endTime, sceneTypeId, erGuid, eId)
 
     @ApiOperation(value = "鑾峰彇鐢ㄦ埛璇勪及鎬诲垎")
@@ -53,14 +54,24 @@
         @ApiParam(value = "鐢ㄦ埛id") @PathVariable("userId") userId: String,
         @ApiParam(value = "椤电爜") @RequestParam(value = "page") page: Int,
         @ApiParam(value = "鍗曢〉鏁版嵁閲�") @RequestParam(value = "per_page") perPage: Int,
-        response: HttpServletResponse
-    ) = evaluationService.getHistoryPoint(userId, page, perPage, response)
+        @ApiParam(value = "鍓嶇骞冲彴") @RequestParam("platform", required = false) platform: String?,
+        @ApiParam(value = "璇勫垎鍛ㄦ湡") @RequestParam("period", required = false) period: String?,
+        response: HttpServletResponse,
+    ) = evaluationService.getHistoryPoint(userId, page, perPage, platform, period, response)
 
     @ApiOperation(value = "鑾峰彇淇$敤璇勪及缁撴灉")
     @GetMapping("/creditInfo")
     fun getCreditInfo(
-        @ApiParam(value = "鐢ㄦ埛id") @RequestParam("userId") userId: String
-    ) = evaluationService.getCreditInfo(userId)
+        @ApiParam(value = "鐢ㄦ埛id") @RequestParam("userId") userId: String,
+        @ApiParam(value = "鍛ㄦ湡") @RequestParam(value = "period", required = false) period: String?,
+    ) = evaluationService.getCreditInfo(userId, period)
+
+    @ApiOperation(value = "鑾峰彇淇$敤璇勪及缁撴灉")
+    @PostMapping("/credit/count")
+    fun getCreditCount(
+        @ApiParam(value = "鐢ㄦ埛id") @RequestParam("userId") userId: String,
+        @ApiParam("鏌ヨ鏉′欢") @RequestBody condition: UserSearchCondition,
+    ) = evaluationService.getCreditCount(userId, condition)
 
     @ApiOperation(value = "鑾峰彇鏌愪釜鐢ㄦ埛鐨勪俊鐢ㄨ瘎浼扮粨鏋�")
     @PostMapping("/search/{userId}")
@@ -69,14 +80,14 @@
         @ApiParam(value = "鏌ヨ鏉′欢") @RequestBody condition: AssessmentSearchCondition,
         @ApiParam(value = "椤电爜") @RequestParam(value = "page") page: Int,
         @ApiParam(value = "鍗曢〉鏁版嵁閲�") @RequestParam(value = "per_page") perPage: Int,
-        response: HttpServletResponse
+        response: HttpServletResponse,
     ) = evaluationService.getAssessments(userId, condition, page, perPage, response)
 
     fun autoScore(
-            @RequestParam(value = "year") year: Int,
-            @RequestParam(value = "month") month: Int,
-            @RequestParam("sceneType") sceneType: Int,
-            response: HttpServletResponse
+        @RequestParam(value = "year") year: Int,
+        @RequestParam(value = "month") month: Int,
+        @RequestParam("sceneType") sceneType: Int,
+        response: HttpServletResponse,
     ) = evaluationService.autoScore(year, month, sceneType, response)
 
 
@@ -86,13 +97,22 @@
         @ApiParam(value = "鐢ㄦ埛id") @RequestParam("userId") userId: String,
         @ApiParam(value = "璇勫垎鍛ㄦ湡") @RequestParam("period") period: String,
         @ApiParam(value = "璇勫垎瑙勫垯id") @RequestParam(value = "ruleId", required = false) ruleId: String?,
-        @ApiParam(value = "鍏蜂綋鎵e垎鏉$洰") @RequestBody itemList: List<Pair<String, String>>,
+        @ApiParam(value = "鍏蜂綋鎵e垎鏉$洰锛堝彧浼犳渶灏忕骇鍒殑璇勪及椤癸級") @RequestBody itemList: List<Pair<String, String>>,
     ) = evaluationService.uploadScore(userId, period, ruleId, itemList)
 
     @ApiOperation(value = "鑾峰彇娴嬭瘎璇︽儏")
     @GetMapping("/detail")
     fun getDetail(
-            @ApiParam(value = "鐢ㄦ埛id") @RequestParam("userId") userId: String,
-            @ApiParam(value = "璇勫垎鍛ㄦ湡") @RequestParam("period") period: String,
+        @ApiParam(value = "鐢ㄦ埛id") @RequestParam("userId") userId: String,
+        @ApiParam(value = "璇勫垎鍛ㄦ湡") @RequestParam("period") period: String,
     ) = evaluationService.getDetail(userId, period)
+
+    @ApiOperation(value = "鑾峰彇鐢ㄦ埛璇勫垎淇℃伅锛岃嚜璇勬垨鐜舰鐮佽瘎浼�")
+    @PostMapping("/gradeList")
+    fun searchGradeList(
+        @ApiParam("鐢ㄦ埛id") @RequestParam("userId") userId: String,
+        @ApiParam("鏌ヨ鏉′欢") @RequestBody condition: UserSearchCondition,
+        @ApiParam("椤电爜") @RequestParam(value = "page") page: Int,
+        @ApiParam("鍗曢〉鏁版嵁閲�") @RequestParam(value = "per_page") perPage: Int,
+    ) = evaluationService.searchGradeList(userId, condition, page, perPage)
 }
\ No newline at end of file

--
Gitblit v1.9.3