From 0674dea7dd0e75199c0c200e6a41070c25677082 Mon Sep 17 00:00:00 2001
From: hcong <1050828145@qq.com>
Date: 星期二, 19 十一月 2024 14:58:16 +0800
Subject: [PATCH] 问题整改的审核撤回

---
 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 0a1dca0..640585d 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 7b6154b..eb0fe5e 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