From bee0055f9d33ec0e8cd307c7b087e64f96f7a750 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期四, 26 十二月 2024 18:43:36 +0800
Subject: [PATCH] 1、一个springboot模块只能有一个listener,所以删除OrgListener.java 2、IC卡充值和消费日、月、年自动化统计,农户充值和消费日、月、年自动化统计中数据库查询一般返回list的bug修改
---
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StIntakeSv.java | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StIntakeSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StIntakeSv.java
index 0fa3e7e..c79aa74 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StIntakeSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StIntakeSv.java
@@ -5,9 +5,7 @@
import com.dy.pipIrrGlobal.daoSt.StIntakeAmountYearMapper;
import com.dy.pipIrrGlobal.pojoSt.StIntakeAmountMonth;
import com.dy.pipIrrGlobal.pojoSt.StIntakeAmountYear;
-import com.dy.pipIrrGlobal.pojoSt.StLossYear;
import com.dy.pipIrrGlobal.voSt.VoIntakeAmountStatistics;
-import com.dy.pipIrrGlobal.voSt.VoIntakeLossStatistics;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
@@ -39,7 +37,12 @@
List<VoIntakeAmountStatistics> list = rmIntakeAmountDayDao.statisticsByIntake(statisticsStartId, statisticsEndId) ;
if(list != null && list.size() > 0){
for(VoIntakeAmountStatistics vo : list){
- StIntakeAmountMonth po = this.stIntakeAmountMonthDao.selectByIntakeIdAndYearAndMonth(vo.intakeId, statisticsYear, statisticsMonth) ;
+ List<StIntakeAmountMonth> listOfMonth = this.stIntakeAmountMonthDao.selectByIntakeIdAndYearAndMonth(vo.intakeId, statisticsYear, statisticsMonth) ;
+ StIntakeAmountMonth po = null ;
+ if(listOfMonth != null && listOfMonth.size() > 0) {
+ //绋嬪簭閫昏緫鎺у埗涓婏紝闆嗗悎涓彧鏈変竴涓璞�
+ po = listOfMonth.get(0);
+ }
if(po == null){
po = new StIntakeAmountMonth() ;
}
@@ -64,7 +67,12 @@
List<VoIntakeAmountStatistics> list = stIntakeAmountMonthDao.statisticsByIntake(statisticsYear) ;
if(list != null && list.size() > 0){
for(VoIntakeAmountStatistics vo : list){
- StIntakeAmountYear po = stIntakeAmountYearDao.selectByIntakeIdAndYear(vo.intakeId, statisticsYear) ;
+ List<StIntakeAmountYear> listOfYear = stIntakeAmountYearDao.selectByIntakeIdAndYear(vo.intakeId, statisticsYear) ;
+ StIntakeAmountYear po = null ;
+ if(listOfYear != null && listOfYear.size() > 0) {
+ //绋嬪簭閫昏緫鎺у埗涓婏紝闆嗗悎涓彧鏈変竴涓璞�
+ po = listOfYear.get(0);
+ }
if(po == null){
po = new StIntakeAmountYear() ;
}
--
Gitblit v1.8.0