From d9437e8c8b95377fde98f5ed9f66e54d9d59e4c6 Mon Sep 17 00:00:00 2001
From: zhubaomin <zhubaomin>
Date: 星期二, 08 四月 2025 17:27:22 +0800
Subject: [PATCH] 小程序获取项目列表取消分页功能

---
 pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/rtuUpgrade/task/UgRtuControllerCtrl.java |   73 +++++++++++++++++++++++++++++++++++-
 1 files changed, 71 insertions(+), 2 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/rtuUpgrade/task/UgRtuControllerCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/rtuUpgrade/task/UgRtuControllerCtrl.java
index f2db173..1b13aef 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/rtuUpgrade/task/UgRtuControllerCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/rtuUpgrade/task/UgRtuControllerCtrl.java
@@ -11,7 +11,7 @@
 import com.dy.common.webUtil.BaseResponseUtils;
 import com.dy.common.webUtil.QueryResultVo;
 import com.dy.common.webUtil.ResultCodeMsg;
-import com.dy.pipIrrGlobal.pojoRm.UgRtuTask;
+import com.dy.pipIrrGlobal.pojoUg.UgRtuTask;
 import com.dy.pipIrrGlobal.voPr.VoController;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.media.Content;
@@ -70,7 +70,76 @@
             return BaseResponseUtils.buildSuccess(res);
         } catch (Exception e) {
             log.error("鏌ヨRTU鍗囩骇浠诲姟寮傚父", e);
-            return BaseResponseUtils.buildException(e.getMessage()) ;
+            return BaseResponseUtils.buildErrorMsg(e.getMessage()) ;
+        }
+    }
+
+    /**
+     * 鍒犻櫎鍗囩骇浠诲姟鎵�鏈夋帶鍒跺櫒
+     * @param taskId 浠诲姟id
+     * @return 鏄惁鎴愬姛
+     */
+    @Operation(summary = "鍒犻櫎鍗囩骇浠诲姟鎵�鏈夋帶鍒跺櫒", description = "鍒犻櫎鍗囩骇浠诲姟鎵�鏈夋帶鍒跺櫒")
+    @ApiResponses(value = {
+            @ApiResponse(
+                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+                    description = "鎿嶄綔缁撴灉锛歵rue锛氭垚鍔燂紝false锛氬け璐ワ紙BaseResponse.content锛�",
+                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+                            schema = @Schema(implementation = Boolean.class))}
+            )
+    })
+    @GetMapping(path = "deleteAll")
+    @SsoAop()
+    public BaseResponse<Boolean> deleteAll(Long taskId){
+        if(taskId == null){
+            return BaseResponseUtils.buildErrorMsg("浠诲姟id涓嶈兘涓虹┖") ;
+        }
+        int count;
+        try {
+            count = this.sv.deleteAll(taskId);
+        } catch (Exception e) {
+            log.error("鍒犻櫎鍗囩骇鎵�鏈夊璞℃帶鍒跺櫒寮傚父", e);
+            return BaseResponseUtils.buildErrorMsg(e.getMessage()) ;
+        }
+        if(count <= 0){
+            return BaseResponseUtils.buildErrorMsg("鏁版嵁搴撴搷浣滃け璐�") ;
+        }else{
+            return BaseResponseUtils.buildSuccess(true) ;
+        }
+    }
+
+
+    /**
+     * 鍗囩骇浠诲姟鎺у埗鍣ㄩ泦鍚堜腑鍒犻櫎涓�涓帶鍒跺櫒
+     * @param id 鏁版嵁璁板綍id
+     * @return 鏄惁鎴愬姛
+     */
+    @Operation(summary = "鍗囩骇浠诲姟鎺у埗鍣ㄩ泦鍚堜腑鍒犻櫎涓�涓帶鍒跺櫒", description = "鍗囩骇浠诲姟鎺у埗鍣ㄩ泦鍚堜腑鍒犻櫎涓�涓帶鍒跺櫒")
+    @ApiResponses(value = {
+            @ApiResponse(
+                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+                    description = "鎿嶄綔缁撴灉锛歵rue锛氭垚鍔燂紝false锛氬け璐ワ紙BaseResponse.content锛�",
+                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+                            schema = @Schema(implementation = Boolean.class))}
+            )
+    })
+    @GetMapping(path = "deleteOne")
+    @SsoAop()
+    public BaseResponse<Boolean> deleteOne(Long id){
+        if(id == null){
+            return BaseResponseUtils.buildErrorMsg("id涓嶈兘涓虹┖") ;
+        }
+        int count;
+        try {
+            count = this.sv.deleteOne(id);
+        } catch (Exception e) {
+            log.error("鍒犻櫎鍗囩骇瀵硅薄鎺у埗鍣ㄥ紓甯�", e);
+            return BaseResponseUtils.buildErrorMsg(e.getMessage()) ;
+        }
+        if(count <= 0){
+            return BaseResponseUtils.buildErrorMsg("鏁版嵁搴撴搷浣滃け璐�") ;
+        }else{
+            return BaseResponseUtils.buildSuccess(true) ;
         }
     }
 

--
Gitblit v1.8.0