From a0a9fc7a58a39626a395d2760194641726e1cd35 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期五, 25 四月 2025 10:48:15 +0800
Subject: [PATCH] 1、微信小程序后端轮灌迟延时长改为可配置的; 2、微信小程序查询取水口接口实现修改,改为后端模糊查询;

---
 pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/special/SpecialCtrl.java |   96 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 96 insertions(+), 0 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/special/SpecialCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/special/SpecialCtrl.java
new file mode 100644
index 0000000..0c5cdcf
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/special/SpecialCtrl.java
@@ -0,0 +1,96 @@
+package com.dy.pipIrrStatistics.special;
+
+import com.dy.common.aop.SsoAop;
+import com.dy.common.webUtil.BaseResponse;
+import com.dy.common.webUtil.BaseResponseUtils;
+import com.dy.common.webUtil.QueryResultVo;
+import com.dy.common.webUtil.ResultCodeMsg;
+import com.dy.pipIrrGlobal.voSpecial.VoAbnormalCloseValve;
+import com.dy.pipIrrGlobal.voSpecial.VoSteal;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.responses.ApiResponses;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import jakarta.validation.Valid;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
+import org.springframework.validation.BindingResult;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2025/2/7 13:52
+ * @Description 涓撻缁熻
+ */
+@Slf4j
+@Tag(name = "涓撻缁熻", description = "涓撻缁熻")
+@RestController
+@RequestMapping(path = "special")
+@SuppressWarnings("unchecked")//java鐗堟湰瓒婇珮锛屽娉涘瀷绾︽潫瓒婁弗锛屾墍浠ラ厤缃甋uppressWarnings("unchecked")
+public class SpecialCtrl {
+
+    private SpecialSv sv;
+
+    @Autowired
+    private void setSv(SpecialSv sv) {
+        this.sv = sv;
+    }
+
+
+    /**
+     * 娑夊珜鍋锋按
+     * @return 鏁版嵁闆嗗悎
+     */
+    @Operation(summary = "娑夊珜鍋锋按", description = "娑夊珜鍋锋按缁熻")
+    @ApiResponses(value = {
+            @ApiResponse(
+                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+                    description = "娑夊珜鍋锋按缁熻锛圔aseResponse.content:QueryResultVo{[VoSteal{}]}锛�",
+                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+                            schema = @Schema(implementation = VoSteal.class))}
+            )
+    })
+    @GetMapping(path = "steal")
+    @SsoAop()
+    public BaseResponse<QueryResultVo<List<VoSteal>>> steal(@Valid QoSteal qo, BindingResult bindingResult) throws Exception {
+        if(bindingResult != null && bindingResult.hasErrors()){
+            return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+        }
+        QueryResultVo<List<VoSteal>> res = this.sv.steal(qo);
+        return BaseResponseUtils.buildSuccess(res);
+    }
+
+    /**
+     * 寮傚父鍏抽榾
+     * @return 鏁版嵁闆嗗悎
+     */
+    @Operation(summary = "寮傚父鍏抽榾", description = "寮傚父鍏抽榾缁熻")
+    @ApiResponses(value = {
+            @ApiResponse(
+                    responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+                    description = "寮傚父鍏抽榾缁熻锛圔aseResponse.content:QueryResultVo{[VoSteal{}]}锛�",
+                    content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+                            schema = @Schema(implementation = VoAbnormalCloseValve.class))}
+            )
+    })
+    @GetMapping(path = "abnormalCloseValve")
+    @SsoAop()
+    public BaseResponse<QueryResultVo<List<VoAbnormalCloseValve>>> abnormalCloseValve(@Valid QoAbnormalCloseValve qo, BindingResult bindingResult) throws Exception {
+        if(bindingResult != null && bindingResult.hasErrors()){
+            return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+        }
+        QueryResultVo<List<VoAbnormalCloseValve>> res = this.sv.abnormalCloseValve(qo);
+        return BaseResponseUtils.buildSuccess(res);
+    }
+
+
+
+}

--
Gitblit v1.8.0