From b306ba3d75769c7d3f5ae9f7b43a8aaa26ed983c Mon Sep 17 00:00:00 2001
From: wuzeyu <1223318623@qq.com>
Date: 星期四, 08 八月 2024 16:15:40 +0800
Subject: [PATCH] 当前余额总量
---
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/intake/IntakeSv.java | 46 ++++++++++++++++++++++++++++++++++++----------
1 files changed, 36 insertions(+), 10 deletions(-)
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/intake/IntakeSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/intake/IntakeSv.java
index 08ea83e..4f1b5f9 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/intake/IntakeSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/intake/IntakeSv.java
@@ -191,7 +191,7 @@
if(timeStart != null && timeStart != "") {
timeStart = timeStart + " 00:00:00";
} else {
- timeStart = LocalDateTime.of(2024, 1, 1, 0, 0, 0).toString();
+ timeStart = LocalDate.now() + " 00:00:00";
}
qo.setTimeStart(timeStart);
@@ -230,7 +230,7 @@
if(timeStart != null && timeStart != "") {
timeStart = timeStart + " 00:00:00";
} else {
- timeStart = LocalDateTime.of(2024, 1, 1, 0, 0, 0).toString();
+ timeStart = LocalDate.now() + " 00:00:00";
}
qo.setTimeStart(timeStart);
@@ -269,7 +269,7 @@
if(timeStart != null && timeStart != "") {
timeStart = timeStart + " 00:00:00";
} else {
- timeStart = LocalDateTime.of(2024, 1, 1, 0, 0, 0).toString();
+ timeStart = LocalDate.now() + " 00:00:00";
}
qo.setTimeStart(timeStart);
@@ -427,7 +427,7 @@
if(timeStart != null && timeStart != "") {
timeStart = timeStart + " 00:00:00";
} else {
- timeStart = LocalDateTime.of(2024, 1, 1, 0, 0, 0).toString();
+ timeStart = LocalDate.now() + " 00:00:00";
}
qo.setTimeStart(timeStart);
@@ -467,7 +467,7 @@
if(timeStart != null && timeStart != "") {
timeStart = timeStart + " 00:00:00";
} else {
- timeStart = LocalDateTime.of(2024, 1, 1, 0, 0, 0).toString();
+ timeStart = LocalDate.now() + " 00:00:00";
}
qo.setTimeStart(timeStart);
@@ -508,7 +508,7 @@
if(timeStart != null && timeStart != "") {
timeStart = timeStart + " 00:00:00";
} else {
- timeStart = LocalDateTime.of(2024, 1, 1, 0, 0, 0).toString();
+ timeStart = LocalDate.now() + " 00:00:00";
}
qo.setTimeStart(timeStart);
@@ -547,7 +547,7 @@
if(timeStart != null && timeStart != "") {
timeStart = timeStart + " 00:00:00";
} else {
- timeStart = LocalDateTime.of(2024, 1, 1, 0, 0, 0).toString();
+ timeStart = LocalDate.now() + " 00:00:00";
}
qo.setTimeStart(timeStart);
@@ -582,7 +582,7 @@
if(timeStart != null && timeStart != "") {
timeStart = timeStart + " 00:00:00";
} else {
- timeStart = LocalDateTime.of(2024, 1, 1, 0, 0, 0).toString();
+ timeStart = LocalDate.now() + " 00:00:00";
}
qo.setTimeStart(timeStart);
@@ -617,7 +617,7 @@
if(timeStart != null && timeStart != "") {
timeStart = timeStart + " 00:00:00";
} else {
- timeStart = LocalDateTime.of(2024, 1, 1, 0, 0, 0).toString();
+ timeStart = LocalDate.now() + " 00:00:00";
}
qo.setTimeStart(timeStart);
@@ -646,7 +646,7 @@
* @param qo
* @return
*/
- public QueryResultVo<List<VoDayIntakeAmount>> getDayIntakeAmount(DayIntakeAmountQO qo) {
+ public QueryResultVo<List<VoDayIntakeAmount>> getDayIntakeAmount(IntakeAmountQO qo) {
Calendar calendar = Calendar.getInstance();
Integer year = Optional.ofNullable(qo.getYear()).orElse(calendar.get(Calendar.YEAR));
Integer month = Optional.ofNullable(qo.getMonth()).orElse(calendar.get(Calendar.MONTH));
@@ -668,4 +668,30 @@
rsVo.obj = rmIntakeAmountDayMapper.getDayIntakeAmount(params);
return rsVo ;
}
+
+ /**
+ * 缁熻鎸囧畾骞翠唤鍚勬湀鐢ㄦ按閲�
+ * @param qo
+ * @return
+ */
+ public QueryResultVo<List<VoMonthIntakeAmount>> getMonthIntakeAmount(IntakeAmountQO qo) {
+ Calendar calendar = Calendar.getInstance();
+ Integer year = Optional.ofNullable(qo.getYear()).orElse(calendar.get(Calendar.YEAR));
+ qo.setYear(year);
+
+ // 鐢熸垚鏌ヨ鍙傛暟
+ Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(qo) ;
+
+ // 鑾峰彇绗﹀悎鏉′欢鐨勮褰曟暟
+ Long itemTotal = Optional.ofNullable(rmIntakeAmountDayMapper.getMonthIntakeAmountCount(params)).orElse(0L);
+
+ QueryResultVo<List<VoMonthIntakeAmount>> rsVo = new QueryResultVo<>() ;
+
+ rsVo.pageSize = qo.pageSize ;
+ rsVo.pageCurr = qo.pageCurr ;
+
+ rsVo.calculateAndSet(itemTotal, params);
+ rsVo.obj = rmIntakeAmountDayMapper.getMonthIntakeAmount(params);
+ return rsVo ;
+ }
}
--
Gitblit v1.8.0