From a15a8cfd7b01ce4bba6fe9fd876f6704ca23a12d Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期二, 07 一月 2025 16:40:32 +0800
Subject: [PATCH] 1、取水口用水日统计表中增加金额、次数字段; 2、优化或重写“累计流量超过指定值的取水口”、“累计流量低于指定值的取水口”、“指定时间段内用水量超过指定值的取水口”、“指定时间段内消费金额超过指定值的取水口”几个统计查询; 3、改“指定时间段内用水时长超过指定值的取水口”为“指定时间段内用水次数超过指定值的取水口”

---
 pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StChargeByIcSv.java |   21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StChargeByIcSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StChargeByIcSv.java
index 3669d4f..28ad3f3 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StChargeByIcSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StChargeByIcSv.java
@@ -44,7 +44,12 @@
         List<VoIcRechargeStatistics> list = seRechargeHistoryMapper.statisticsByIc(statisticsStartId, statisticsEndId) ;
         if(list != null && list.size() > 0){
             for(VoIcRechargeStatistics vo : list){
-                StRechargeIcDay po = this.stRechargeIcDayMapper.selectByClientAndCardAndYearAndMonth(vo.clientId, vo.cardId, statisticsYear, statisticsMonth) ;
+                List<StRechargeIcDay> listOfDay = this.stRechargeIcDayMapper.selectByClientAndCardAndYearAndMonth(vo.clientId, vo.cardId, statisticsYear, statisticsMonth) ;
+                StRechargeIcDay po = null ;
+                if(listOfDay != null && listOfDay.size() > 0){
+                    //绋嬪簭閫昏緫鎺у埗涓婏紝闆嗗悎涓彧鏈変竴涓璞�
+                    po = listOfDay.get(0) ;
+                }
                 if(po == null){
                     po = new StRechargeIcDay() ;
                     po.clientId = vo.clientId ;
@@ -71,7 +76,12 @@
         List<VoIcRechargeStatistics> list = stRechargeIcDayMapper.statisticsByIc(statisticsYear, statisticsMonth) ;
         if(list != null && list.size() > 0){
             for(VoIcRechargeStatistics vo : list){
-                StRechargeIcMonth po = this.stRechargeIcMonthMapper.selectByClientAndCardAndYear(vo.clientId, vo.cardId, statisticsYear) ;
+                List<StRechargeIcMonth> listOfMonth = this.stRechargeIcMonthMapper.selectByClientAndCardAndYear(vo.clientId, vo.cardId, statisticsYear) ;
+                StRechargeIcMonth po = null ;
+                if(listOfMonth != null && listOfMonth.size() > 0){
+                    //绋嬪簭閫昏緫鎺у埗涓婏紝闆嗗悎涓彧鏈変竴涓璞�
+                    po = listOfMonth.get(0) ;
+                }
                 if(po == null){
                     po = new StRechargeIcMonth() ;
                     po.clientId = vo.clientId ;
@@ -97,7 +107,12 @@
         List<VoIcRechargeStatistics> list = stRechargeIcMonthMapper.statisticsByIc(statisticsYear) ;
         if(list != null && list.size() > 0){
             for(VoIcRechargeStatistics vo : list){
-                StRechargeIcYear po = this.stRechargeIcYearMapper.selectByClientAndCardAndYear(vo.clientId, vo.cardId, statisticsYear) ;
+                List<StRechargeIcYear> listOfYear = this.stRechargeIcYearMapper.selectByClientAndCardAndYear(vo.clientId, vo.cardId, statisticsYear) ;
+                StRechargeIcYear po = null ;
+                if(listOfYear != null && listOfYear.size() > 0){
+                    //绋嬪簭閫昏緫鎺у埗涓婏紝闆嗗悎涓彧鏈変竴涓璞�
+                    po = listOfYear.get(0) ;
+                }
                 if(po == null){
                     po = new StRechargeIcYear() ;
                     po.clientId = vo.clientId ;

--
Gitblit v1.8.0