From 2bc6544b1e0fc955a05957b4fdda308b3a76a08f Mon Sep 17 00:00:00 2001
From: zhubaomin <zhubaomin>
Date: 星期五, 09 八月 2024 16:10:18 +0800
Subject: [PATCH] 2024-08-09 朱宝民 优化代码
---
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/client/ClientCtrl.java | 47 +++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 47 insertions(+), 0 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 8ff0cb9..8884740 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
@@ -10,6 +10,14 @@
import com.dy.pipIrrGlobal.voSt.VoICCard;
import com.dy.pipIrrStatistics.card.IcCardqo.CommonQO;
import com.dy.pipIrrStatistics.client.qo.*;
+import com.dy.pipIrrGlobal.voSt.VoDayClient;
+import com.dy.pipIrrGlobal.voSt.VoMonthClient;
+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 com.dy.pipIrrStatistics.intake.qo.ClientAmountQO;
+import com.dy.pipIrrStatistics.result.StatisticlResultCode;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@@ -134,6 +142,45 @@
}
}
+ /**
+ * 缁熻鎸囧畾鏈堜唤鍚勫啘鎴峰悇澶╃敤姘撮噺鍙婃秷璐归噾棰�
+ * @param qo
+ * @return
+ */
+ @GetMapping(path = "/getDayAmountAndMoney")
+ @SsoAop()
+ public BaseResponse<QueryResultVo<List<VoDayClient>>> getDayAmountAndMoney(ClientAmountQO qo) {
+ if(qo.getYearMonth() == null) {
+ return BaseResponseUtils.buildErrorMsg(StatisticlResultCode.YEAR_AND_MONTH_CANNOT_BE_NULL.getMessage());
+ }
+
+ try {
+ return BaseResponseUtils.buildSuccess(clientSv.getDayAmountAndMoney(qo));
+ } catch (Exception e) {
+ log.error("鑾峰彇璁板綍寮傚父", e);
+ return BaseResponseUtils.buildException(e.getMessage()) ;
+ }
+ }
+
+ /**
+ * 缁熻鎸囧畾骞翠唤鍚勫啘鎴峰悇鏈堢敤姘撮噺鍙婃秷璐归噾棰�
+ * @param qo
+ * @return
+ */
+ @GetMapping(path = "/getMonthAmountAndMoney")
+ @SsoAop()
+ public BaseResponse<QueryResultVo<List<VoMonthClient>>> getMonthAmountAndMoney(ClientAmountQO qo) {
+ if(qo.getYear() == null) {
+ return BaseResponseUtils.buildErrorMsg(StatisticlResultCode.YEAR_CANNOT_BE_NULL.getMessage());
+ }
+ try {
+ return BaseResponseUtils.buildSuccess(clientSv.getMonthAmountAndMoney(qo));
+ } catch (Exception e) {
+ log.error("鑾峰彇璁板綍寮傚父", e);
+ return BaseResponseUtils.buildException(e.getMessage()) ;
+ }
+ }
+
/**
* 鎸囧畾鏃堕棿娈靛唴寮�鐗╃悊鍗″啘鎴�
--
Gitblit v1.8.0