From d16984b80d2b8bebc5038a6f70990f7443d8d4a0 Mon Sep 17 00:00:00 2001
From: zhubaomin <zhubaomin>
Date: 星期六, 10 八月 2024 11:02:27 +0800
Subject: [PATCH] 2024-08-10 朱宝民 注册虚拟卡、虚拟卡充值添加操作记录(新加操作记录表)

---
 pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/intake/IntkeCtrl.java |   66 ++++++++++++++++++++++++++++++++
 1 files changed, 65 insertions(+), 1 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/intake/IntkeCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/intake/IntkeCtrl.java
index ca2a113..0525e6f 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/intake/IntkeCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/intake/IntkeCtrl.java
@@ -6,9 +6,11 @@
 import com.dy.common.webUtil.QueryResultVo;
 import com.dy.pipIrrGlobal.voSt.*;
 import com.dy.pipIrrStatistics.intake.qo.*;
+import com.dy.pipIrrStatistics.result.StatisticlResultCode;
 import jakarta.validation.Valid;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
+import org.jetbrains.annotations.NotNull;
 import org.springframework.validation.BindingResult;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -334,7 +336,11 @@
      */
     @GetMapping(path = "/getDayIntakeAmount")
     @SsoAop()
-    public BaseResponse<QueryResultVo<List<VoDayIntakeAmount>>> getDayIntakeAmount(DayIntakeAmountQO qo) {
+    public BaseResponse<QueryResultVo<List<VoDayIntakeAmount>>> getDayIntakeAmount(@NotNull IntakeAmountQO qo) {
+        if(qo.getYearMonth() == null) {
+            return BaseResponseUtils.buildErrorMsg(StatisticlResultCode.YEAR_AND_MONTH_CANNOT_BE_NULL.getMessage());
+        }
+
         try {
             return BaseResponseUtils.buildSuccess(intakeSv.getDayIntakeAmount(qo));
         } catch (Exception e) {
@@ -342,4 +348,62 @@
             return BaseResponseUtils.buildException(e.getMessage()) ;
         }
     }
+
+    /**
+     * 缁熻鎸囧畾骞翠唤鍚勬湀鐢ㄦ按閲�
+     * @param qo
+     * @return
+     */
+    @GetMapping(path = "/getMonthIntakeAmount")
+    @SsoAop()
+    public BaseResponse<QueryResultVo<List<VoMonthAmount>>> getMonthIntakeAmount(IntakeAmountQO qo) {
+        if(qo.getYear() == null) {
+            return BaseResponseUtils.buildErrorMsg(StatisticlResultCode.YEAR_CANNOT_BE_NULL.getMessage());
+        }
+        try {
+            return BaseResponseUtils.buildSuccess(intakeSv.getMonthIntakeAmount(qo));
+        } catch (Exception e) {
+            log.error("鑾峰彇璁板綍寮傚父", e);
+            return BaseResponseUtils.buildException(e.getMessage()) ;
+        }
+    }
+
+    /**
+     * 缁熻鎸囧畾鏈堜唤鍚勫ぉ婕忔崯閲�
+     * @param qo
+     * @return
+     */
+    @GetMapping(path = "/getDayLossAmount")
+    @SsoAop()
+    public BaseResponse<QueryResultVo<List<VoDayLoss>>> getDayLossAmount(IntakeAmountQO qo) {
+        if(qo.getYearMonth() == null) {
+            return BaseResponseUtils.buildErrorMsg(StatisticlResultCode.YEAR_AND_MONTH_CANNOT_BE_NULL.getMessage());
+        }
+
+        try {
+            return BaseResponseUtils.buildSuccess(intakeSv.getDayLossAmount(qo));
+        } catch (Exception e) {
+            log.error("鑾峰彇璁板綍寮傚父", e);
+            return BaseResponseUtils.buildException(e.getMessage()) ;
+        }
+    }
+
+    /**
+     * 缁熻鎸囧畾骞翠唤鍚勬湀婕忔崯閲�
+     * @param qo
+     * @return
+     */
+    @GetMapping(path = "/getMonthLossAmount")
+    @SsoAop()
+    public BaseResponse<QueryResultVo<List<VoMonthAmount>>> getMonthLossAmount(IntakeAmountQO qo) {
+        if(qo.getYear() == null) {
+            return BaseResponseUtils.buildErrorMsg(StatisticlResultCode.YEAR_CANNOT_BE_NULL.getMessage());
+        }
+        try {
+            return BaseResponseUtils.buildSuccess(intakeSv.getMonthLossAmount(qo));
+        } catch (Exception e) {
+            log.error("鑾峰彇璁板綍寮傚父", e);
+            return BaseResponseUtils.buildException(e.getMessage()) ;
+        }
+    }
 }

--
Gitblit v1.8.0