From f5f8138f4f50eedd3598a9073956f0afa56e7139 Mon Sep 17 00:00:00 2001
From: wuzeyu <1223318623@qq.com>
Date: 星期五, 27 十二月 2024 15:53:27 +0800
Subject: [PATCH] 增加部署武威市民勤系统

---
 pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StClientSv.java |   20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StClientSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StClientSv.java
index 000b497..2cf0dc1 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StClientSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StClientSv.java
@@ -30,14 +30,19 @@
     protected StClientAmountYearMapper stClientAmountYearDao ;
 
     /**
-     * 鏈堢粺璁�---婕忔崯
+     * 鏈堢粺璁�---鍐滄埛鐢ㄦ按閲忓強閲戦
      */
     @Transactional
     protected void statisticsMonth(Integer statisticsYear, Integer statisticsMonth, Long statisticsStartId, Long statisticsEndId){
         List<VoClientAmountStatistics> list = rmClientAmountDayDao.statisticsByClient(statisticsStartId, statisticsEndId) ;
         if(list != null && list.size() > 0){
             for(VoClientAmountStatistics vo : list){
-                StClientAmountMonth po = stClientAmountMonthDao.selectByClientIdAndYearAndMonth(vo.clientId, statisticsYear, statisticsMonth) ;
+                List<StClientAmountMonth> listOfMonth = stClientAmountMonthDao.selectByClientIdAndYearAndMonth(vo.clientId, statisticsYear, statisticsMonth) ;
+                StClientAmountMonth po = null ;
+                if(listOfMonth != null && listOfMonth.size() > 0){
+                    //绋嬪簭閫昏緫鎺у埗涓婏紝闆嗗悎涓彧鏈変竴涓璞�
+                    po = listOfMonth.get(0) ;
+                }
                 if(po == null) {
                     po = new StClientAmountMonth();
                 }
@@ -45,6 +50,7 @@
                 po.year = statisticsYear ;
                 po.month = statisticsMonth ;
                 po.amount = vo.amount;
+                po.money = vo.money ;
                 if(po.id == null) {
                     stClientAmountMonthDao.insert(po);
                 }else{
@@ -55,20 +61,26 @@
     }
 
     /**
-     * 骞寸粺璁�---婕忔崯
+     * 骞寸粺璁�---鍐滄埛鐢ㄦ按閲忓強閲戦
      */
     @Transactional
     protected void statisticsYear(Integer statisticsYear){
         List<VoClientAmountStatistics> list = stClientAmountMonthDao.statisticsByClient(statisticsYear) ;
         if(list != null && list.size() > 0){
             for(VoClientAmountStatistics vo : list){
-                StClientAmountYear po = stClientAmountYearDao.selectByClientIdAndYear(vo.clientId, statisticsYear) ;
+                List<StClientAmountYear> listOfYear = stClientAmountYearDao.selectByClientIdAndYear(vo.clientId, statisticsYear) ;
+                StClientAmountYear po = null ;
+                if(listOfYear != null && listOfYear.size() > 0){
+                    //绋嬪簭閫昏緫鎺у埗涓婏紝闆嗗悎涓彧鏈変竴涓璞�
+                    po = listOfYear.get(0) ;
+                }
                 if(po == null) {
                     po = new StClientAmountYear();
                 }
                 po.clientId = vo.clientId ;
                 po.year = statisticsYear ;
                 po.amount = vo.amount;
+                po.money = vo.money ;
                 if(po.id == null) {
                     stClientAmountYearDao.insert(po);
                 }else{

--
Gitblit v1.8.0