From 90615ce702dde7f1d8fed373d8f3a96796ef1f2d Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期四, 21 十一月 2024 09:23:12 +0800
Subject: [PATCH] Merge remote-tracking branch 'supervision/hc-recheck-1114'

---
 src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ProblemlistController.kt           |    4 ++--
 src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ProblemlistServiceImpl.kt |   32 +++++++++++++++++++++++++++++++-
 2 files changed, 33 insertions(+), 3 deletions(-)

diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ProblemlistServiceImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ProblemlistServiceImpl.kt
index 02d7b7c..fb9b6bb 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ProblemlistServiceImpl.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ProblemlistServiceImpl.kt
@@ -373,7 +373,7 @@
         userId: String,
         userName: String,
     ): BaseResponse<String> {
-        if (action !in 0..3) {
+        if (action !in 0..5) {
             return BaseResponse(false, "闈炴硶鐨勬搷浣滄寚浠�")
         }
         val p = problemlistMapper.selectByPrimaryKey(pId) ?: return BaseResponse(false, "闂涓嶅瓨鍦�")
@@ -398,6 +398,14 @@
                         response.success = false
                         response.message = "闂鎻愪氦杩樻湭瀹℃牳锛屾棤娉曡繘琛屾暣鏀瑰鏍革紒"
                     }
+                    4.toByte() -> {
+                        response.success = false
+                        response.message = "闂鎻愪氦杩樻湭瀹℃牳锛屾棤娉曡繘琛屾挙鍥炲鏍革紒"
+                    }
+                    5.toByte() -> {
+                        response.success = false
+                        response.message = "闂鏁存敼杩樻湭鎻愪氦锛屾棤娉曡繘琛屾挙鍥炲鏍革紒"
+                    }
                 }
             } else if (extension3 == Constant.PROBLEM_CHECK_PASS || extension3 == Constant.PROBLEM_CHECK_FAIL) {
                 when (action) {
@@ -419,6 +427,13 @@
                             response.message = "闂杩樻湭鏁存敼锛屾棤娉曡繘琛屾暣鏀瑰鏍革紒鎿嶄綔鏃犳晥"
                         }
                     }
+                    4.toByte() -> {
+                        extension3 = Constant.PROBLEM_UNCHECKED
+                    }
+                    5.toByte() -> {
+                        response.success = false
+                        response.message = "闂鏁存敼杩樻湭瀹℃牳锛屾棤娉曡繘琛屾暣鏀瑰鏍告挙鍥炴搷浣滐紒鎿嶄綔鏃犳晥"
+                    }
                 }
             } else if (extension3 == Constant.CHANGE_UNCHECKED) {
                 event = "鍦�${subtask?.scensename}瀹℃牳浜嗕竴涓暣鏀�"
@@ -431,6 +446,14 @@
                     }
                     2.toByte() -> extension3 = Constant.CHANGE_CHECK_PASS
                     3.toByte() -> extension3 = Constant.CHANGE_CHECK_FAIL
+                    4.toByte() -> {
+                        response.success = false
+                        response.message = "闂鏁存敼杩樻湭瀹℃牳锛屾棤娉曡繘琛屾挙鍥炲鏍革紒"
+                    }
+                    5.toByte() -> {
+                        response.success = false
+                        response.message = "闂鎻愪氦宸插鏍革紝骞朵笖宸茶鏁存敼銆傛搷浣滄棤鏁�"
+                    }
                 }
             } else if (extension3 == Constant.CHANGE_CHECK_PASS || extension3 == Constant.CHANGE_CHECK_FAIL) {
                 when (action) {
@@ -442,6 +465,13 @@
                     }
                     2.toByte() -> extension3 = Constant.CHANGE_CHECK_PASS
                     3.toByte() -> extension3 = Constant.CHANGE_CHECK_FAIL
+                    4.toByte() -> {
+                        response.success = false
+                        response.message = "闂鎻愪氦宸插鏍革紝骞朵笖宸茶鏁存敼锛屾棤娉曡繘琛岄棶棰樺鏍告挙閿�鎿嶄綔銆傛搷浣滄棤鏁�"
+                    }
+                    5.toByte() -> {
+                        extension3 = Constant.CHANGE_UNCHECKED
+                    }
                 }
             }
         }
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 0c01066..7b4c214 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ProblemlistController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/ProblemlistController.kt
@@ -88,8 +88,8 @@
     @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锛氭暣鏀瑰鏍告挙鍥�",
+            allowableValues = "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,

--
Gitblit v1.9.3