From fd17cc4990f991bdd69ad4f7f0b6e288b1d1fc47 Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期六, 28 十二月 2024 13:47:05 +0800 Subject: [PATCH] 1、农户用水量日统计中增加属性“次数”; 2、临时任务中增加“转存农户日取水量,由纵型改为横型” --- pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StConsumeByClientSv.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/StConsumeByClientSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StConsumeByClientSv.java index 0062d5e..306b50d 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StConsumeByClientSv.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StConsumeByClientSv.java @@ -46,7 +46,12 @@ List<VoClientConsumeStatistics> list = rmOpenCloseValveHistoryMapper.statisticsByClient(statisticsStartDt, statisticsEndDt) ; if(list != null && list.size() > 0){ for(VoClientConsumeStatistics vo : list){ - StConsumeClientDay po = this.stConsumeClientDayMapper.selectByClientAndYearAndMonth(vo.clientId, statisticsYear, statisticsMonth) ; + List<StConsumeClientDay> listOfDay = this.stConsumeClientDayMapper.selectByClientAndYearAndMonth(vo.clientId, statisticsYear, statisticsMonth) ; + StConsumeClientDay po = null ; + if(listOfDay != null && listOfDay.size() > 0){ + //绋嬪簭閫昏緫鎺у埗涓婏紝闆嗗悎涓彧鏈変竴涓璞� + po = listOfDay.get(0) ; + } if(po == null){ po = new StConsumeClientDay() ; po.clientId = vo.clientId ; @@ -72,7 +77,12 @@ List<VoClientConsumeStatistics> list = stConsumeClientDayMapper.statisticsByClient(statisticsYear, statisticsMonth) ; if(list != null && list.size() > 0){ for(VoClientConsumeStatistics vo : list){ - StConsumeClientMonth po = this.stConsumeClientMonthMapper.selectByClientAndYear(vo.clientId, statisticsYear) ; + List<StConsumeClientMonth> listOfMonth = this.stConsumeClientMonthMapper.selectByClientAndYear(vo.clientId, statisticsYear) ; + StConsumeClientMonth po = null ; + if(listOfMonth != null && listOfMonth.size() > 0){ + //绋嬪簭閫昏緫鎺у埗涓婏紝闆嗗悎涓彧鏈変竴涓璞� + po = listOfMonth.get(0) ; + } if(po == null){ po = new StConsumeClientMonth() ; po.clientId = vo.clientId ; @@ -97,7 +107,12 @@ List<VoClientConsumeStatistics> list = stConsumeClientMonthMapper.statisticsByClient(statisticsYear) ; if(list != null && list.size() > 0){ for(VoClientConsumeStatistics vo : list){ - StConsumeClientYear po = this.stConsumeClientYearMapper.selectByClientAndYear(vo.clientId, statisticsYear) ; + List<StConsumeClientYear> listOfYear = this.stConsumeClientYearMapper.selectByClientAndYear(vo.clientId, statisticsYear) ; + StConsumeClientYear po = null ; + if(listOfYear != null && listOfYear.size() > 0){ + //绋嬪簭閫昏緫鎺у埗涓婏紝闆嗗悎涓彧鏈変竴涓璞� + po = listOfYear.get(0) ; + } if(po == null){ po = new StConsumeClientYear() ; po.clientId = vo.clientId ; -- Gitblit v1.8.0