From 1a2d6bec457d59ce865a06557c7d900e48fcb425 Mon Sep 17 00:00:00 2001
From: wuzeyu <1223318623@qq.com>
Date: 星期五, 09 八月 2024 11:27:06 +0800
Subject: [PATCH] 指定时间段内每个农户充值合计(物理卡)

---
 pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/client/ClientCtrl.java |  128 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 127 insertions(+), 1 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/client/ClientCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/client/ClientCtrl.java
index 5beecb3..d006f7d 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/client/ClientCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/client/ClientCtrl.java
@@ -5,7 +5,14 @@
 import com.dy.common.webUtil.BaseResponseUtils;
 import com.dy.common.webUtil.QueryResultVo;
 import com.dy.pipIrrGlobal.voSt.VoClient;
+import com.dy.pipIrrGlobal.voSt.VoClientOpenCardCount;
+import com.dy.pipIrrGlobal.voSt.VoClientRechargeTotal;
+import com.dy.pipIrrGlobal.voSt.VoICCard;
+import com.dy.pipIrrStatistics.card.IcCardqo.CommonQO;
+import com.dy.pipIrrStatistics.client.qo.AmountSpentQO;
 import com.dy.pipIrrStatistics.client.qo.OpenCountQO;
+import com.dy.pipIrrStatistics.client.qo.WaterConsumptionQO;
+import com.dy.pipIrrStatistics.client.qo.WaterDurationQO;
 import jakarta.validation.Valid;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
@@ -42,7 +49,6 @@
         if(bindingResult != null && bindingResult.hasErrors()){
             return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
         }
-
         try {
             return BaseResponseUtils.buildSuccess(clientSv.getLargeOpenCountClients(qo));
         } catch (Exception e) {
@@ -50,4 +56,124 @@
             return BaseResponseUtils.buildException(e.getMessage()) ;
         }
     }
+
+    /**
+     * 鑾峰彇鎸囧畾鏃堕棿娈靛唴寮�闃�娆℃暟浣庝簬鎸囧畾鍊肩殑鍐滄埛
+     * @param qo
+     * @param bindingResult
+     * @return
+     */
+    @GetMapping(path = "/getSmallOpenCountClients")
+    @SsoAop()
+    public BaseResponse<QueryResultVo<List<VoClient>>> getSmallOpenCountClients(@Valid OpenCountQO qo, BindingResult bindingResult) {
+        if(bindingResult != null && bindingResult.hasErrors()){
+            return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+        }
+        try {
+            return BaseResponseUtils.buildSuccess(clientSv.getSmallOpenCountClients(qo));
+        } catch (Exception e) {
+            log.error("鑾峰彇寮�鍗¤褰曞紓甯�", e);
+            return BaseResponseUtils.buildException(e.getMessage()) ;
+        }
+    }
+
+    /**
+     * 鑾峰彇鎸囧畾鏃堕棿娈靛唴鐢ㄦ按閲忚秴杩囨寚瀹氬�肩殑鍐滄埛
+     * @param qo
+     * @param bindingResult
+     * @return
+     */
+    @GetMapping(path = "/getLargeWaterConsumptionClients")
+    @SsoAop()
+    public BaseResponse<QueryResultVo<List<VoClient>>> getLargeWaterConsumptionClients(@Valid WaterConsumptionQO qo, BindingResult bindingResult) {
+        if(bindingResult != null && bindingResult.hasErrors()){
+            return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+        }
+        try {
+            return BaseResponseUtils.buildSuccess(clientSv.getLargeWaterConsumptionClients(qo));
+        } catch (Exception e) {
+            log.error("鑾峰彇寮�鍗¤褰曞紓甯�", e);
+            return BaseResponseUtils.buildException(e.getMessage()) ;
+        }
+    }
+
+    /**
+     * 鑾峰彇鎸囧畾鏃堕棿娈靛唴娑堣垂閲戦瓒呰繃鎸囧畾鍊肩殑鍐滄埛
+     * @param qo
+     * @param bindingResult
+     * @return
+     */
+    @GetMapping(path = "/getLargeAmountSpentClients")
+    @SsoAop()
+    public BaseResponse<QueryResultVo<List<VoClient>>> getLargeAmountSpentClients(@Valid AmountSpentQO qo, BindingResult bindingResult) {
+        if(bindingResult != null && bindingResult.hasErrors()){
+            return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+        }
+        try {
+            return BaseResponseUtils.buildSuccess(clientSv.getLargeAmountSpentClients(qo));
+        } catch (Exception e) {
+            log.error("鑾峰彇寮�鍗¤褰曞紓甯�", e);
+            return BaseResponseUtils.buildException(e.getMessage()) ;
+        }
+    }
+
+    /**
+     * 鑾峰彇鎸囧畾鏃堕棿娈靛唴鐢ㄦ按鏃堕暱瓒呰繃鎸囧畾鍊肩殑鍐滄埛
+     * @param qo
+     * @param bindingResult
+     * @return
+     */
+    @GetMapping(path = "/getLargeWaterDurationClients")
+    @SsoAop()
+    public BaseResponse<QueryResultVo<List<VoClient>>> getLargeWaterDurationClients(@Valid WaterDurationQO qo, BindingResult bindingResult) {
+        if(bindingResult != null && bindingResult.hasErrors()){
+            return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
+        }
+        try {
+            return BaseResponseUtils.buildSuccess(clientSv.getLargeWaterDurationClients(qo));
+        } catch (Exception e) {
+            log.error("鑾峰彇寮�鍗¤褰曞紓甯�", e);
+            return BaseResponseUtils.buildException(e.getMessage()) ;
+        }
+    }
+
+
+    /**
+     * 鎸囧畾鏃堕棿娈靛唴寮�鐗╃悊鍗″啘鎴�
+     *
+     * @param qo
+     * @return
+     */
+    @GetMapping(path = "/getOpenIcCardClients")
+    @SsoAop()
+    public BaseResponse<QueryResultVo<List<VoClientOpenCardCount>>> getOpenIcCardClients(CommonQO qo) {
+        try {
+            QueryResultVo<List<VoClientOpenCardCount>> res = clientSv.getOpenIcCardClients(qo);
+            return BaseResponseUtils.buildSuccess(res);
+        }catch (Exception e){
+            log.error("鑾峰彇璁板綍寮傚父", e);
+            return BaseResponseUtils.buildException(e.getMessage());
+        }
+    }
+
+
+
+    /**
+     * 鎸囧畾鏃堕棿娈靛唴姣忎釜鍐滄埛鍏呭�煎悎璁★紙鐗╃悊鍗★級
+     *
+     * @param qo
+     * @return
+     */
+    @GetMapping(path = "/getRechargeTotalClients")
+    @SsoAop()
+    public BaseResponse<QueryResultVo<List<VoClientRechargeTotal>>> getRechargeTotalClients(CommonQO qo) {
+        try {
+            QueryResultVo<List<VoClientRechargeTotal>> res = clientSv.getRechargeTotalClients(qo);
+            return BaseResponseUtils.buildSuccess(res);
+        }catch (Exception e){
+            log.error("鑾峰彇璁板綍寮傚父", e);
+            return BaseResponseUtils.buildException(e.getMessage());
+        }
+    }
+
 }

--
Gitblit v1.8.0