From 819d74f65526ee6182bc4c68c8be7cd2d69f3b6c Mon Sep 17 00:00:00 2001
From: wuzeyu <1223318623@qq.com>
Date: 星期五, 28 六月 2024 16:41:18 +0800
Subject: [PATCH] 农户查一个接口增加返回用水类型

---
 pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeCtrl.java |   36 ++++++++++++++++++++++++++++++++++++
 1 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeCtrl.java
index 032631f..6d73906 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeCtrl.java
@@ -9,7 +9,9 @@
 import com.dy.common.webUtil.ResultCodeMsg;
 import com.dy.pipIrrGlobal.pojoPr.PrIntake;
 import com.dy.pipIrrGlobal.voPr.VoIntake;
+import com.dy.pipIrrGlobal.voPr.VoOnLineIntake;
 import com.dy.pipIrrGlobal.voSe.VoActiveCard;
+import com.dy.pipIrrProject.intake.qo.OnLineIntakesQO;
 import com.dy.pipIrrProject.result.ProjectResultCode;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.Parameter;
@@ -276,4 +278,38 @@
         String fileName = URLEncoder.encode(rawFileName, "UTF-8").replaceAll("\\+", "%20");
         response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
     }
+
+    /**
+     * 鑾峰彇鍙栨按鍙e垪琛紙鍦ㄧ嚎鍜屼笉鍦ㄧ嚎锛�
+     * @param qo
+     * @return
+     */
+    @GetMapping(path = "all_intakes")
+    @SsoAop()
+    public BaseResponse<QueryResultVo<List<VoOnLineIntake>>> getAllIntakes(OnLineIntakesQO qo) {
+        try {
+            QueryResultVo<List<VoOnLineIntake>> res = intakeSv.selectOnLineIntakes(qo);
+            return BaseResponseUtils.buildSuccess(res);
+        } catch (Exception e) {
+            log.error("鏌ヨ鍙栨按鍙e紓甯�", e);
+            return BaseResponseUtils.buildException(e.getMessage());
+        }
+    }
+
+    /**
+     * 鏍规嵁鎿嶄綔鍛樿幏鍙栧父鐢ㄥ彇姘村彛锛堝湪绾垮拰涓嶅湪绾匡級
+     * @param operator
+     * @return
+     */
+    @GetMapping(path = "used_intakes")
+    @SsoAop()
+    public BaseResponse<List<VoOnLineIntake>> getUsedIntakes(Long operator) {
+        try {
+            List<VoOnLineIntake> res = intakeSv.getUsedIntakes(operator);
+            return BaseResponseUtils.buildSuccess(res);
+        } catch (Exception e) {
+            log.error("鏌ヨ鍙栨按鍙e紓甯�", e);
+            return BaseResponseUtils.buildException(e.getMessage());
+        }
+    }
 }

--
Gitblit v1.8.0