From 29838e38f40f568df7a0f8572aa17086c3cfe7cc Mon Sep 17 00:00:00 2001
From: zhubaomin <zhubaomin>
Date: 星期四, 08 八月 2024 09:18:50 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV
---
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/intake/IntakeSv.java | 220 ++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 203 insertions(+), 17 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 4bdca3b..9357183 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
@@ -5,7 +5,6 @@
import com.dy.pipIrrGlobal.daoRm.RmOpenCloseValveHistoryMapper;
import com.dy.pipIrrGlobal.daoRm.RmOnHourReportLastMapper;
import com.dy.pipIrrGlobal.daoRm.RmOpenCloseValveLastMapper;
-import com.dy.pipIrrGlobal.voRm.VoOpenCloseValve;
import com.dy.pipIrrGlobal.voSt.*;
import com.dy.pipIrrStatistics.intake.qo.*;
import com.dy.pipIrrGlobal.voSt.VoBatteryVolt;
@@ -15,10 +14,8 @@
import com.dy.pipIrrGlobal.voSt.VoSignalIntensity;
import com.dy.pipIrrStatistics.intake.qo.BatteryVoltQO;
import com.dy.pipIrrStatistics.intake.qo.CumulativeFlowQO;
-import com.dy.pipIrrStatistics.intake.qo.IntakeQO;
import com.dy.pipIrrStatistics.intake.qo.IntakeCountValueQO;
import com.dy.pipIrrStatistics.intake.qo.CommonQO;
-import com.dy.pipIrrStatistics.intake.qo.IntakeValueQO;
import com.dy.pipIrrStatistics.intake.qo.SignalIntensityQO;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.common.utils.PojoUtils;
@@ -201,13 +198,14 @@
String timeStart = qo.getTimeStart();
String timeStop = qo.getTimeStop();
- if(timeStart != null) {
+ if(timeStart != null && timeStart != "") {
timeStart = timeStart + " 00:00:00";
- }else {
- timeStart = LocalDate.now() + " 00:00:00";
+ } else {
+ timeStart = LocalDateTime.of(2024, 1, 1, 0, 0, 0).toString();
}
qo.setTimeStart(timeStart);
- if(timeStop != null) {
+
+ if(timeStop != null && timeStop != "") {
timeStop = timeStop + " 23:59:59";
}else {
timeStop = LocalDate.now() + " 23:59:59";
@@ -239,13 +237,14 @@
String timeStart = qo.getTimeStart();
String timeStop = qo.getTimeStop();
- if(timeStart != null) {
+ if(timeStart != null && timeStart != "") {
timeStart = timeStart + " 00:00:00";
- }else {
- timeStart = LocalDate.now() + " 00:00:00";
+ } else {
+ timeStart = LocalDateTime.of(2024, 1, 1, 0, 0, 0).toString();
}
qo.setTimeStart(timeStart);
- if(timeStop != null) {
+
+ if(timeStop != null && timeStop != "") {
timeStop = timeStop + " 23:59:59";
}else {
timeStop = LocalDate.now() + " 23:59:59";
@@ -277,13 +276,14 @@
String timeStart = qo.getTimeStart();
String timeStop = qo.getTimeStop();
- if(timeStart != null) {
+ if(timeStart != null && timeStart != "") {
timeStart = timeStart + " 00:00:00";
- }else {
- timeStart = LocalDate.now() + " 00:00:00";
+ } else {
+ timeStart = LocalDateTime.of(2024, 1, 1, 0, 0, 0).toString();
}
qo.setTimeStart(timeStart);
- if(timeStop != null) {
+
+ if(timeStop != null && timeStop != "") {
timeStop = timeStop + " 23:59:59";
}else {
timeStop = LocalDate.now() + " 23:59:59";
@@ -427,6 +427,46 @@
}
/**
+ * 鎸囧畾鏃堕棿娈靛唴绱Н娴侀噺瓒呰繃鎸囧畾鍊肩殑鍙栨按鍙�
+ * @param qo
+ * @return
+ */
+ public QueryResultVo<List<VoIntakeAccumulateAmount>> getTotalFlowGtValueIntakes(IntakeAmountValueQO qo) {
+ String timeStart = qo.getTimeStart();
+ String timeStop = qo.getTimeStop();
+ if(timeStart != null && timeStart != "") {
+ timeStart = timeStart + " 00:00:00";
+ } else {
+ timeStart = LocalDateTime.of(2024, 1, 1, 0, 0, 0).toString();
+ }
+ qo.setTimeStart(timeStart);
+
+ if(timeStop != null && timeStop != "") {
+ timeStop = timeStop + " 23:59:59";
+ }else {
+ timeStop = LocalDate.now() + " 23:59:59";
+ }
+ qo.setTimeStop(timeStop);
+
+ if (qo.getValue() == null){
+ qo.setValue(0.0);
+ }
+
+
+ Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(qo);
+ Long itemTotal = rmOnHourReportHistoryMapper.getTotalFlowGtValueIntakesCount(params);
+
+ QueryResultVo<List<VoIntakeAccumulateAmount>> rsVo = new QueryResultVo<>() ;
+ rsVo.pageSize = qo.pageSize ;
+ rsVo.pageCurr = qo.pageCurr ;
+
+ rsVo.calculateAndSet(itemTotal, params);
+ rsVo.obj = rmOnHourReportHistoryMapper.getTotalFlowGtValueIntakes(params);
+ return rsVo ;
+ }
+
+
+ /**
* 鎸囧畾鏃堕棿娈靛唴鐢ㄦ按閲忚秴杩囨寚瀹氬�肩殑鍙栨按鍙�
* @param qo
* @return
@@ -454,14 +494,160 @@
Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(qo);
- Long itemTotal = rmOnHourReportHistoryMapper.getUseWaterGtValueIntakesCount(params);
+ Long itemTotal = rmOpenCloseValveHistoryMapper.getUseWaterGtValueIntakesCount(params);
QueryResultVo<List<VoIntakeAccumulateAmount>> rsVo = new QueryResultVo<>() ;
rsVo.pageSize = qo.pageSize ;
rsVo.pageCurr = qo.pageCurr ;
rsVo.calculateAndSet(itemTotal, params);
- rsVo.obj = rmOnHourReportHistoryMapper.getUseWaterGtValueIntakes(params);
+ rsVo.obj = rmOpenCloseValveHistoryMapper.getUseWaterGtValueIntakes(params);
+ return rsVo ;
+ }
+
+
+
+ /**
+ * 鎸囧畾鏃堕棿娈靛唴娑堣垂閲戦瓒呰繃鎸囧畾鍊肩殑鍙栨按鍙�
+ * @param qo
+ * @return
+ */
+ public QueryResultVo<List<VoIntakeAccumulateAmount>> getExpenseGtValueIntakes(IntakeAmountValueQO qo) {
+ String timeStart = qo.getTimeStart();
+ String timeStop = qo.getTimeStop();
+ if(timeStart != null && timeStart != "") {
+ timeStart = timeStart + " 00:00:00";
+ } else {
+ timeStart = LocalDateTime.of(2024, 1, 1, 0, 0, 0).toString();
+ }
+ qo.setTimeStart(timeStart);
+
+ if(timeStop != null && timeStop != "") {
+ timeStop = timeStop + " 23:59:59";
+ }else {
+ timeStop = LocalDate.now() + " 23:59:59";
+ }
+ qo.setTimeStop(timeStop);
+
+ if (qo.getValue() == null){
+ qo.setValue(0.0);
+ }
+
+ Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(qo);
+ Long itemTotal = rmOpenCloseValveHistoryMapper.getExpenseGtValueIntakesCount(params);
+
+ QueryResultVo<List<VoIntakeAccumulateAmount>> rsVo = new QueryResultVo<>() ;
+ rsVo.pageSize = qo.pageSize ;
+ rsVo.pageCurr = qo.pageCurr ;
+
+ rsVo.calculateAndSet(itemTotal, params);
+ rsVo.obj = rmOpenCloseValveHistoryMapper.getExpenseGtValueIntakes(params);
+ return rsVo ;
+ }
+
+
+ /**
+ * 鎸囧畾鏃堕棿娈靛唴鐢ㄦ按鏃堕暱瓒呰繃鎸囧畾鍊肩殑鍙栨按鍙�
+ * @param qo
+ * @return
+ */
+ public QueryResultVo<List<VoIntakeOpenCount>> getUseWaterDurationGtValueIntakes(IntakeCountValueQO qo) {
+ String timeStart = qo.getTimeStart();
+ String timeStop = qo.getTimeStop();
+ if(timeStart != null && timeStart != "") {
+ timeStart = timeStart + " 00:00:00";
+ } else {
+ timeStart = LocalDateTime.of(2024, 1, 1, 0, 0, 0).toString();
+ }
+ qo.setTimeStart(timeStart);
+
+ if(timeStop != null && timeStop != "") {
+ timeStop = timeStop + " 23:59:59";
+ }else {
+ timeStop = LocalDate.now() + " 23:59:59";
+ }
+ qo.setTimeStop(timeStop);
+
+
+ Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(qo);
+ Long itemTotal = rmOpenCloseValveHistoryMapper.getUseWaterDurationGtValueIntakesCount(params);
+
+ QueryResultVo<List<VoIntakeOpenCount>> rsVo = new QueryResultVo<>() ;
+ rsVo.pageSize = qo.pageSize ;
+ rsVo.pageCurr = qo.pageCurr ;
+
+ rsVo.calculateAndSet(itemTotal, params);
+ rsVo.obj = rmOpenCloseValveHistoryMapper.getUseWaterDurationGtValueIntakes(params);
+ return rsVo ;
+ }
+
+ /**
+ * 鎸囧畾鏃堕棿娈� 鏈夊紑闃� 鏃犲叧闃�鐨勫彇姘村彛
+ * @param qo
+ * @return
+ */
+ public QueryResultVo<List<VoIntake>> getHaveOpenNoCloseIntakes(CommonQO qo) {
+ String timeStart = qo.getTimeStart();
+ String timeStop = qo.getTimeStop();
+ if(timeStart != null && timeStart != "") {
+ timeStart = timeStart + " 00:00:00";
+ } else {
+ timeStart = LocalDateTime.of(2024, 1, 1, 0, 0, 0).toString();
+ }
+ qo.setTimeStart(timeStart);
+
+ if(timeStop != null && timeStop != "") {
+ timeStop = timeStop + " 23:59:59";
+ }else {
+ timeStop = LocalDate.now() + " 23:59:59";
+ }
+ qo.setTimeStop(timeStop);
+
+
+ Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(qo);
+ Long itemTotal = rmOpenCloseValveHistoryMapper.getHaveOpenNoCloseIntakesCount(params);
+
+ QueryResultVo<List<VoIntake>> rsVo = new QueryResultVo<>() ;
+ rsVo.pageSize = qo.pageSize ;
+ rsVo.pageCurr = qo.pageCurr ;
+
+ rsVo.calculateAndSet(itemTotal, params);
+ rsVo.obj = rmOpenCloseValveHistoryMapper.getHaveOpenNoCloseIntakes(params);
+ return rsVo ;
+ }
+
+ /**
+ * 鎸囧畾鏃堕棿娈� 鏃犲紑闃� 鏈夊叧闃�鐨勫彇姘村彛
+ * @param qo
+ * @return
+ */
+ public QueryResultVo<List<VoIntake>> getNoOpenHaveCloseIntakes(CommonQO qo) {
+ String timeStart = qo.getTimeStart();
+ String timeStop = qo.getTimeStop();
+ if(timeStart != null && timeStart != "") {
+ timeStart = timeStart + " 00:00:00";
+ } else {
+ timeStart = LocalDateTime.of(2024, 1, 1, 0, 0, 0).toString();
+ }
+ qo.setTimeStart(timeStart);
+
+ if(timeStop != null && timeStop != "") {
+ timeStop = timeStop + " 23:59:59";
+ }else {
+ timeStop = LocalDate.now() + " 23:59:59";
+ }
+ qo.setTimeStop(timeStop);
+
+
+ Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(qo);
+ Long itemTotal = rmOpenCloseValveHistoryMapper.getNoOpenHaveCloseIntakesCount(params);
+
+ QueryResultVo<List<VoIntake>> rsVo = new QueryResultVo<>() ;
+ rsVo.pageSize = qo.pageSize ;
+ rsVo.pageCurr = qo.pageCurr ;
+
+ rsVo.calculateAndSet(itemTotal, params);
+ rsVo.obj = rmOpenCloseValveHistoryMapper.getNoOpenHaveCloseIntakes(params);
return rsVo ;
}
}
--
Gitblit v1.8.0