From 346b480ab7848c742065e9bf989abaf43b515613 Mon Sep 17 00:00:00 2001
From: zhubaomin <zhubaomin>
Date: 星期一, 21 四月 2025 15:05:26 +0800
Subject: [PATCH] 获取轮灌组详情

---
 pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigation/IrrigationCtrl.java |   32 ++++++++++++++++++++++++++------
 1 files changed, 26 insertions(+), 6 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigation/IrrigationCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigation/IrrigationCtrl.java
index 5385221..6ebf27c 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigation/IrrigationCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigation/IrrigationCtrl.java
@@ -3,6 +3,7 @@
 import com.dy.common.webUtil.BaseResponse;
 import com.dy.common.webUtil.BaseResponseUtils;
 import com.dy.common.webUtil.QueryResultVo;
+import com.dy.pipIrrGlobal.voIr.VoGroupIntakes;
 import com.dy.pipIrrGlobal.voIr.VoGroupSimple;
 import com.dy.pipIrrGlobal.voIr.VoProjectSimple;
 import com.dy.pipIrrWechat.irrigation.qo.QoGroup;
@@ -11,6 +12,7 @@
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
 import java.util.List;
@@ -36,10 +38,9 @@
      * @return
      */
     @GetMapping(path = "/getSimpleProjects")
-    public BaseResponse<QueryResultVo<List<VoProjectSimple>>> getSimpleProjects(QoProject qo) {
+    public BaseResponse<List<VoProjectSimple>> getSimpleProjects(QoProject qo) {
         try {
-            QueryResultVo<List<VoProjectSimple>> res = irrigationSv.getSimpleProjects(qo);
-            return BaseResponseUtils.buildSuccess(res);
+            return BaseResponseUtils.buildSuccess(irrigationSv.getSimpleProjects(qo));
         } catch (Exception e) {
             log.error("鑾峰彇椤圭洰璁板綍寮傚父", e);
             return BaseResponseUtils.buildException(e.getMessage());
@@ -47,17 +48,36 @@
     }
 
     @GetMapping(path = "/getSimpleGroups")
-    public BaseResponse<QueryResultVo<List<VoGroupSimple>>> getSimpleGroups(QoGroup qo) {
+    public BaseResponse<List<VoGroupSimple>> getSimpleGroups(QoGroup qo) {
         if(qo.getProjectId() == null) {
             return BaseResponseUtils.buildErrorMsg("璇烽�夋嫨椤圭洰");
         }
 
         try {
-            QueryResultVo<List<VoGroupSimple>> res = irrigationSv.getSimpleGroups(qo);
-            return BaseResponseUtils.buildSuccess(res);
+            //QueryResultVo<List<VoGroupSimple>> res = irrigationSv.getSimpleGroups(qo);
+            return BaseResponseUtils.buildSuccess(irrigationSv.getSimpleGroups(qo));
         } catch (Exception e) {
             log.error("鑾峰彇杞亴缁勮褰曞紓甯�", e);
             return BaseResponseUtils.buildException(e.getMessage());
         }
     }
+
+    /**
+     * 鏍规嵁杞亴缁処D鑾峰彇杞亴缁勮鎯�
+     * @param groupId
+     * @return
+     */
+    @GetMapping(path = "/getGroupDetails")
+    public BaseResponse<VoGroupIntakes> getGroupDetails(@RequestParam Long groupId) {
+        if(groupId == null) {
+            return BaseResponseUtils.buildErrorMsg("杞亴缁処D涓嶈兘涓虹┖");
+        }
+
+        try {
+            return BaseResponseUtils.buildSuccess(irrigationSv.getGroupDetails(groupId).get("content"));
+        } catch (Exception e) {
+            log.error("鑾峰彇杞亴缁勮鎯呭紓甯�", e);
+            return BaseResponseUtils.buildException(e.getMessage());
+        }
+    }
 }

--
Gitblit v1.8.0