From b8470f5e90d0aed22bf2c4bf9f5d2a13cd60b15f Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期一, 30 十二月 2024 14:03:41 +0800
Subject: [PATCH] 1、统计模块实现农户日用水量纵转横转存,月、年用水量统计; 2、临时模块农户日用水量纵转横转存,月、年用水量统计;

---
 pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSt/StClientAmountYear.java                          |   32 
 pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSt/StClientAmountMonth.java                         |  203 +++++++
 pipIrr-platform/pipIrr-web/pipIrr-web-temp/说明.txt                                                                       |    6 
 pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StClientAmountDayMapper.java                      |   17 
 pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/statistics/StSomeCtrl.java                   |   42 +
 pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/statistics/StClientAmountYearSv.java         |  116 ++++
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/StClientAmountMonthMapper.xml                                   |  500 ++++++++++++++++++-
 pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StClientAmountSv.java |  115 ++-
 pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/statistics/StClientAmountDaySv.java          |   93 --
 pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/statistics/StClientAmountMonthSv.java        |  170 ++++++
 pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StClientAmountYearMapper.java                     |   32 
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/StClientAmountYearMapper.xml                                    |   56 +
 pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StClientAmountMonthMapper.java                    |   45 +
 pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/statistics/StClientAmountConstant.java       |   12 
 pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSt/StClientAmountDay.java                           |    2 
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/StClientAmountDayMapper.xml                                     |   30 +
 16 files changed, 1,215 insertions(+), 256 deletions(-)

diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StClientAmountDayMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StClientAmountDayMapper.java
index f53b91f..098fe61 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StClientAmountDayMapper.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StClientAmountDayMapper.java
@@ -2,6 +2,7 @@
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.dy.pipIrrGlobal.pojoSt.StClientAmountDay;
+import com.dy.pipIrrGlobal.voSt.VoClientAmountStatistics;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
@@ -67,18 +68,24 @@
     //缁熻鐩稿叧
     /**
      * 鏌ヨ鐢ㄦ按鎴蜂竴涓湀鎵�鏈夋棩鐨勭敤姘撮噺
-     * @param clientId
      * @param year
      * @param month
      * @return
      */
-    List<StClientAmountDay> selectByClientIdAndYearAndMonthAndDay(@Param("clientId")Long clientId,
-                                                                  @Param("year")Integer year,
-                                                                  @Param("month")Integer month) ;
+    List<VoClientAmountStatistics> statisticsByClient(@Param("year")Integer year,
+                                                      @Param("month")Integer month) ;
+
+    /**
+     * 鏌ヨ鐢ㄦ按鎴蜂竴涓湀鎵�鏈夋棩鐨勭敤姘撮噺
+     * @param year
+     * @param month
+     * @return
+     */
+    List<StClientAmountDay> selectByYearAndMonthAndDay(@Param("year")Integer year,
+                                                       @Param("month")Integer month) ;
 
     //////////////////////////////////////
     //涓存椂浠诲姟鐩稿叧
-
     /**
      * 鍒犻櫎鍏ㄩ儴
      * @return
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StClientAmountMonthMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StClientAmountMonthMapper.java
index e8ed505..c9f99bc 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StClientAmountMonthMapper.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StClientAmountMonthMapper.java
@@ -1,24 +1,22 @@
 package com.dy.pipIrrGlobal.daoSt;
 
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.dy.pipIrrGlobal.pojoSt.StClientAmountMonth;
-import com.dy.pipIrrGlobal.pojoSt.StIntakeAmountMonth;
 import com.dy.pipIrrGlobal.voSt.VoClientAmountStatistics;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
-
 /**
  * @Author: liurunyu
- * @Date: 2024/7/24 17:03
+ * @Date: 2024/12/30 8:54
  * @Description
  */
 @Mapper
-public interface StClientAmountMonthMapper extends BaseMapper<StClientAmountMonth> {
+public interface StClientAmountMonthMapper {
     /**
      * delete by primary key
+     *
      * @param id primaryKey
      * @return deleteCount
      */
@@ -26,6 +24,7 @@
 
     /**
      * insert record to table
+     *
      * @param record the record
      * @return insert count
      */
@@ -33,6 +32,7 @@
 
     /**
      * insert record to table selective
+     *
      * @param record the record
      * @return insert count
      */
@@ -40,22 +40,15 @@
 
     /**
      * select by primary key
+     *
      * @param id primary key
      * @return object by primary key
      */
     StClientAmountMonth selectByPrimaryKey(Long id);
 
     /**
-     * 鏌ヨ鏌愬勾鏌愭湀鏌愬彇姘村彛鐨勬湀鏌愰噺鍊�
-     * @param clientId 鍐滄埛ID
-     * @param year 鏌愬勾
-     * @param month 鏌愭湀
-     * @return
-     */
-    List<StClientAmountMonth> selectByClientIdAndYearAndMonth(@Param("clientId")Long clientId, @Param("year")Integer year, @Param("month")Integer month) ;
-
-    /**
      * update record selective
+     *
      * @param record the updated record
      * @return update count
      */
@@ -63,16 +56,38 @@
 
     /**
      * update record
+     *
      * @param record the updated record
      * @return update count
      */
     int updateByPrimaryKey(StClientAmountMonth record);
 
 
+    //////////////////////////////////////
+    //缁熻鐩稿叧
+    /**
+     * 鏌ヨ鏌愬勾鏌愭湀 閲忓��
+     *
+     * @param year     鏌愬勾
+     * @return
+     */
+    List<StClientAmountMonth> selectByYear(@Param("year") Integer year);
+
     /**
      * 浠ュ啘鎴风淮搴︾粺璁$敤姘撮噺鍙婅垂鐢�
+     *
      * @param year 缁熻骞村害
      * @return
      */
-    List<VoClientAmountStatistics> statisticsByClient(Integer year) ;
+    List<VoClientAmountStatistics> statisticsByClient(Integer year);
+
+
+    //////////////////////////////////////
+    //涓存椂浠诲姟鐩稿叧
+    /**
+     * 鍒犻櫎鍏ㄩ儴
+     * @return
+     */
+    int deleteAll() ;
+
 }
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StClientAmountYearMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StClientAmountYearMapper.java
index e75f9a5..7bac86b 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StClientAmountYearMapper.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoSt/StClientAmountYearMapper.java
@@ -1,8 +1,6 @@
 package com.dy.pipIrrGlobal.daoSt;
 
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.dy.pipIrrGlobal.pojoSt.StClientAmountYear;
-import com.dy.pipIrrGlobal.pojoSt.StIntakeAmountYear;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
@@ -10,13 +8,14 @@
 
 /**
  * @Author: liurunyu
- * @Date: 2024/7/24 17:03
+ * @Date: 2024/12/30 9:21
  * @Description
  */
 @Mapper
-public interface StClientAmountYearMapper extends BaseMapper<StClientAmountYear> {
+public interface StClientAmountYearMapper {
     /**
      * delete by primary key
+     *
      * @param id primaryKey
      * @return deleteCount
      */
@@ -24,6 +23,7 @@
 
     /**
      * insert record to table
+     *
      * @param record the record
      * @return insert count
      */
@@ -31,6 +31,7 @@
 
     /**
      * insert record to table selective
+     *
      * @param record the record
      * @return insert count
      */
@@ -38,21 +39,15 @@
 
     /**
      * select by primary key
+     *
      * @param id primary key
      * @return object by primary key
      */
     StClientAmountYear selectByPrimaryKey(Long id);
 
     /**
-     * 鏌ヨ鏌愬勾鏌愬彇姘村彛鐨勫勾鏌愰噺鍊�
-     * @param clientId 鍐滄埛ID
-     * @param year 鏌愬勾
-     * @return
-     */
-    List<StClientAmountYear> selectByClientIdAndYear(@Param("clientId")Long clientId, @Param("year")Integer year) ;
-
-    /**
      * update record selective
+     *
      * @param record the updated record
      * @return update count
      */
@@ -60,8 +55,21 @@
 
     /**
      * update record
+     *
      * @param record the updated record
      * @return update count
      */
     int updateByPrimaryKey(StClientAmountYear record);
+
+    /**
+     * 鏌ヨ鏌愬勾 鏌愰噺鍊�
+     *
+     * @param year 鏌愬勾
+     * @return
+     */
+    List<StClientAmountYear> selectByYear(@Param("year") Integer year);
+
+    /////////////////////////////////////
+    //涓存椂浠诲姟
+    int deleteAll() ;
 }
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSt/StClientAmountDay.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSt/StClientAmountDay.java
index a4d19a0..c10738c 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSt/StClientAmountDay.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSt/StClientAmountDay.java
@@ -25,7 +25,7 @@
 @Schema(name = "鍐滄埛鐢ㄦ按閲忔棩缁熻")
 public class StClientAmountDay implements BaseEntity {
 
-    public static final long serialVersionUID = 202412281145001L;
+    public static final long serialVersionUID = 202412300924001L;
     /**
      * 涓婚敭
      */
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSt/StClientAmountMonth.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSt/StClientAmountMonth.java
index c75499a..2e37bf6 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSt/StClientAmountMonth.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSt/StClientAmountMonth.java
@@ -2,7 +2,7 @@
 
 /**
  * @Author: liurunyu
- * @Date: 2024/7/24 17:03
+ * @Date: 2024/12/30 8:54
  * @Description
  */
 
@@ -25,7 +25,8 @@
 @Schema(name = "鍐滄埛鐢ㄦ按閲忓強璐圭敤鏈堢粺璁�")
 public class StClientAmountMonth implements BaseEntity {
 
-    public static final long serialVersionUID = 202407241705001L;
+
+    public static final long serialVersionUID = 202412300923001L;
     /**
      * 涓婚敭
      */
@@ -35,36 +36,196 @@
     public Long id;
 
     /**
-    * 鍐滄埛ID
-    */
+     * 鍐滄埛ID
+     */
     @Schema(description = "鍐滄埛澶栭敭", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
     @JSONField(serializeUsing= ObjectWriterImplToString.class)
     public Long clientId;
 
+
     /**
-    * 缁熻骞村害
-    */
-    @Schema(description = "缁熻骞村害", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+     * 骞村害
+     */
     public Integer year;
 
     /**
-    * 缁熻鏈堜唤
-    */
-    @Schema(description = "缁熻鏈堜唤", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
-    public Integer month;
+     * 1鏈堢敤姘撮噺缁熻
+     */
+    public Double amount1;
 
     /**
-    * 鐢ㄦ按閲忥紙m3锛�
-    */
-    @Schema(description = "鏈堢敤姘撮噺锛坢3锛�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
-    @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" )
-    public Double amount;
+     * 1鏈堣姳璐归噾棰�
+     */
+    public Double money1;
 
     /**
-    * 璐圭敤锛堝厓锛�
-    */
-    @Schema(description = "鏈堣垂鐢紙鍏冿級", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
-    @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" )
-    public Double money;
+     * 1鏈堢敤姘存鏁�
+     */
+    public Integer times1;
+
+    /**
+     * 2鏈堢敤姘撮噺缁熻
+     */
+    public Double amount2;
+
+    /**
+     * 2鏈堣姳璐归噾棰�
+     */
+    public Double money2;
+
+    /**
+     * 2鏈堢敤姘存鏁�
+     */
+    public Integer times2;
+
+    /**
+     * 3鏈堢敤姘撮噺缁熻
+     */
+    public Double amount3;
+
+    /**
+     * 3鏈堣姳璐归噾棰�
+     */
+    public Double money3;
+
+    /**
+     * 3鏈堢敤姘存鏁�
+     */
+    public Integer times3;
+
+    /**
+     * 4鏈堢敤姘撮噺缁熻
+     */
+    public Double amount4;
+
+    /**
+     * 4鏈堣姳璐归噾棰�
+     */
+    public Double money4;
+
+    /**
+     * 4鏈堢敤姘存鏁�
+     */
+    public Integer times4;
+
+    /**
+     * 5鏈堢敤姘撮噺缁熻
+     */
+    public Double amount5;
+
+    /**
+     * 5鏈堣姳璐归噾棰�
+     */
+    public Double money5;
+
+    /**
+     * 5鏈堢敤姘存鏁�
+     */
+    public Integer times5;
+
+    /**
+     * 6鏈堢敤姘撮噺缁熻
+     */
+    public Double amount6;
+
+    /**
+     * 6鏈堣姳璐归噾棰�
+     */
+    public Double money6;
+
+    /**
+     * 6鏈堢敤姘存鏁�
+     */
+    public Integer times6;
+
+    /**
+     * 7鏈堢敤姘撮噺缁熻
+     */
+    public Double amount7;
+
+    /**
+     * 7鏈堣姳璐归噾棰�
+     */
+    public Double money7;
+
+    /**
+     * 7鏈堢敤姘存鏁�
+     */
+    public Integer times7;
+
+    /**
+     * 8鏈堢敤姘撮噺缁熻
+     */
+    public Double amount8;
+
+    /**
+     * 8鏈堣姳璐归噾棰�
+     */
+    public Double money8;
+
+    /**
+     * 8鏈堢敤姘存鏁�
+     */
+    public Integer times8;
+
+    /**
+     * 9鏈堢敤姘撮噺缁熻
+     */
+    public Double amount9;
+
+    /**
+     * 9鏈堣姳璐归噾棰�
+     */
+    public Double money9;
+
+    /**
+     * 9鏈堢敤姘存鏁�
+     */
+    public Integer times9;
+
+    /**
+     * 10鏈堢敤姘撮噺缁熻
+     */
+    public Double amount10;
+
+    /**
+     * 10鏈堣姳璐归噾棰�
+     */
+    public Double money10;
+
+    /**
+     * 10鏈堢敤姘存鏁�
+     */
+    public Integer times10;
+
+    /**
+     * 11鏈堢敤姘撮噺缁熻
+     */
+    public Double amount11;
+
+    /**
+     * 11鏈堣姳璐归噾棰�
+     */
+    public Double money11;
+
+    /**
+     * 11鏈堢敤姘存鏁�
+     */
+    public Integer times11;
+
+    /**
+     * 12鏈堢敤姘撮噺缁熻
+     */
+    public Double amount12;
+
+    /**
+     * 12鏈堣姳璐归噾棰�
+     */
+    public Double money12;
+
+    /**
+     * 12鏈堢敤姘存鏁�
+     */
+    public Integer times12;
 
 }
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSt/StClientAmountYear.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSt/StClientAmountYear.java
index 335489f..d8dfaa3 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSt/StClientAmountYear.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoSt/StClientAmountYear.java
@@ -2,7 +2,7 @@
 
 /**
  * @Author: liurunyu
- * @Date: 2024/7/24 17:03
+ * @Date: 2024/12/30 9:21
  * @Description
  */
 
@@ -12,7 +12,6 @@
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.dy.common.po.BaseEntity;
-import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.*;
 
@@ -25,7 +24,7 @@
 @Schema(name = "鍐滄埛鐢ㄦ按閲忓強璐圭敤骞寸粺璁�")
 public class StClientAmountYear implements BaseEntity {
 
-    public static final long serialVersionUID = 202407241705002L;
+    public static final long serialVersionUID = 202412300922001L;
     /**
      * 涓婚敭
      */
@@ -35,30 +34,31 @@
     public Long id;
 
     /**
-    * 鍐滄埛ID
-    */
+     * 鍐滄埛ID
+     */
     @Schema(description = "鍐滄埛澶栭敭", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
     @JSONField(serializeUsing= ObjectWriterImplToString.class)
     public Long clientId;
 
+
     /**
-    * 缁熻骞村害
-    */
-    @Schema(description = "缁熻骞村害", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+     * 骞村害
+     */
     public Integer year;
 
     /**
-    * 骞寸敤姘撮噺
-    */
-    @Schema(description = "骞寸敤姘撮噺锛坢3锛�", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
-    @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" )
+     * 骞寸敤姘撮噺缁熻
+     */
     public Double amount;
 
     /**
-    * 骞磋垂鐢�
-    */
-    @Schema(description = "骞磋垂鐢紙鍏冿級", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
-    @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" )
+     * 骞磋姳璐归噾棰�
+     */
     public Double money;
 
+    /**
+     * 骞寸敤姘存鏁�
+     */
+    public Integer times;
+
 }
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/StClientAmountDayMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/StClientAmountDayMapper.xml
index cd1e7c5..60fc47a 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/StClientAmountDayMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/StClientAmountDayMapper.xml
@@ -1187,12 +1187,36 @@
   <!-- ////////////////////////////////// -->
   <!-- 缁熻鐩稿叧                         -->
   <!-- ////////////////////////////////// -->
-  <select id="selectByClientIdAndYearAndMonthAndDay" resultType="com.dy.pipIrrGlobal.pojoSt.StClientAmountDay">
+  <select id="statisticsByClient" resultType="com.dy.pipIrrGlobal.voSt.VoClientAmountStatistics">
+    select client_id as clientId,
+    sum(
+    IFNULL(amount1,0) + IFNULL(amount2,0) + IFNULL(amount3,0) + IFNULL(amount4,0) + IFNULL(amount5,0) + IFNULL(amount6,0) + IFNULL(amount7,0) + IFNULL(amount8,0) + IFNULL(amount9,0) +
+    IFNULL(amount10,0) + IFNULL(amount11,0) + IFNULL(amount12,0) + IFNULL(amount13,0) + IFNULL(amount14,0) + IFNULL(amount15,0) + IFNULL(amount16,0) + IFNULL(amount17,0) + IFNULL(amount18,0) + IFNULL(amount19,0) +
+    IFNULL(amount20,0) + IFNULL(amount21,0) + IFNULL(amount22,0) + IFNULL(amount23,0) + IFNULL(amount24,0) + IFNULL(amount25,0) + IFNULL(amount26,0) + IFNULL(amount27,0) + IFNULL(amount28,0) + IFNULL(amount29,0) +
+    IFNULL(amount30,0) + IFNULL(amount31,0)
+    ) as amount,
+    sum(
+    IFNULL(money1,0) + IFNULL(money2,0) + IFNULL(money3,0) + IFNULL(money4,0) + IFNULL(money5,0) + IFNULL(money6,0) + IFNULL(money7,0) + IFNULL(money8,0) + IFNULL(money9,0) +
+    IFNULL(money10,0) + IFNULL(money11,0) + IFNULL(money12,0) + IFNULL(money13,0) + IFNULL(money14,0) + IFNULL(money15,0) + IFNULL(money16,0) + IFNULL(money17,0) + IFNULL(money18,0) + IFNULL(money19,0) +
+    IFNULL(money20,0) + IFNULL(money21,0) + IFNULL(money22,0) + IFNULL(money23,0) + IFNULL(money24,0) + IFNULL(money25,0) + IFNULL(money26,0) + IFNULL(money27,0) + IFNULL(money28,0) + IFNULL(money29,0) +
+    IFNULL(money30,0) + IFNULL(money31,0)
+    ) as money,
+    sum(
+    IFNULL(times1,0) + IFNULL(times2,0) + IFNULL(times3,0) + IFNULL(times4,0) + IFNULL(times5,0) + IFNULL(times6,0) + IFNULL(times7,0) + IFNULL(times8,0) + IFNULL(times9,0) +
+    IFNULL(times10,0) + IFNULL(times11,0) + IFNULL(times12,0) + IFNULL(times13,0) + IFNULL(times14,0) + IFNULL(times15,0) + IFNULL(times16,0) + IFNULL(times17,0) + IFNULL(times18,0) + IFNULL(times19,0) +
+    IFNULL(times20,0) + IFNULL(times21,0) + IFNULL(times22,0) + IFNULL(times23,0) + IFNULL(times24,0) + IFNULL(times25,0) + IFNULL(times26,0) + IFNULL(times27,0) + IFNULL(times28,0) + IFNULL(times29,0) +
+    IFNULL(times30,0) + IFNULL(times31,0)
+    ) as times
+    from st_client_amount_day
+    where year = #{year, jdbcType=INTEGER}
+    and month = #{month, jdbcType=INTEGER}
+    group by client_id
+  </select>
+  <select id="selectByYearAndMonthAndDay" resultType="com.dy.pipIrrGlobal.pojoSt.StClientAmountDay">
     select
     <include refid="Base_Column_List" />
     from st_client_amount_day
-    where client_id = #{clientId,jdbcType=BIGINT}
-    and year = #{year,jdbcType=INTEGER}
+    where year = #{year,jdbcType=INTEGER}
     and month = #{month,jdbcType=INTEGER}
   </select>
 
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/StClientAmountMonthMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/StClientAmountMonthMapper.xml
index b511957..559fde2 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/StClientAmountMonthMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/StClientAmountMonthMapper.xml
@@ -7,13 +7,49 @@
     <id column="id" jdbcType="BIGINT" property="id" />
     <result column="client_id" jdbcType="BIGINT" property="clientId" />
     <result column="year" jdbcType="INTEGER" property="year" />
-    <result column="month" jdbcType="INTEGER" property="month" />
-    <result column="amount" jdbcType="FLOAT" property="amount" />
-    <result column="money" jdbcType="FLOAT" property="money" />
+    <result column="amount1" jdbcType="FLOAT" property="amount1" />
+    <result column="money1" jdbcType="FLOAT" property="money1" />
+    <result column="times1" jdbcType="INTEGER" property="times1" />
+    <result column="amount2" jdbcType="FLOAT" property="amount2" />
+    <result column="money2" jdbcType="FLOAT" property="money2" />
+    <result column="times2" jdbcType="INTEGER" property="times2" />
+    <result column="amount3" jdbcType="FLOAT" property="amount3" />
+    <result column="money3" jdbcType="FLOAT" property="money3" />
+    <result column="times3" jdbcType="INTEGER" property="times3" />
+    <result column="amount4" jdbcType="FLOAT" property="amount4" />
+    <result column="money4" jdbcType="FLOAT" property="money4" />
+    <result column="times4" jdbcType="INTEGER" property="times4" />
+    <result column="amount5" jdbcType="FLOAT" property="amount5" />
+    <result column="money5" jdbcType="FLOAT" property="money5" />
+    <result column="times5" jdbcType="INTEGER" property="times5" />
+    <result column="amount6" jdbcType="FLOAT" property="amount6" />
+    <result column="money6" jdbcType="FLOAT" property="money6" />
+    <result column="times6" jdbcType="INTEGER" property="times6" />
+    <result column="amount7" jdbcType="FLOAT" property="amount7" />
+    <result column="money7" jdbcType="FLOAT" property="money7" />
+    <result column="times7" jdbcType="INTEGER" property="times7" />
+    <result column="amount8" jdbcType="FLOAT" property="amount8" />
+    <result column="money8" jdbcType="FLOAT" property="money8" />
+    <result column="times8" jdbcType="INTEGER" property="times8" />
+    <result column="amount9" jdbcType="FLOAT" property="amount9" />
+    <result column="money9" jdbcType="FLOAT" property="money9" />
+    <result column="times9" jdbcType="INTEGER" property="times9" />
+    <result column="amount10" jdbcType="FLOAT" property="amount10" />
+    <result column="money10" jdbcType="FLOAT" property="money10" />
+    <result column="times10" jdbcType="INTEGER" property="times10" />
+    <result column="amount11" jdbcType="FLOAT" property="amount11" />
+    <result column="money11" jdbcType="FLOAT" property="money11" />
+    <result column="times11" jdbcType="INTEGER" property="times11" />
+    <result column="amount12" jdbcType="FLOAT" property="amount12" />
+    <result column="money12" jdbcType="FLOAT" property="money12" />
+    <result column="times12" jdbcType="INTEGER" property="times12" />
   </resultMap>
   <sql id="Base_Column_List">
     <!--@mbg.generated-->
-    id, client_id, `year`, `month`, amount, money
+    id, client_id, `year`, amount1, money1, times1, amount2, money2, times2, amount3, 
+    money3, times3, amount4, money4, times4, amount5, money5, times5, amount6, money6, 
+    times6, amount7, money7, times7, amount8, money8, times8, amount9, money9, times9, 
+    amount10, money10, times10, amount11, money11, times11, amount12, money12, times12
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
     <!--@mbg.generated-->
@@ -21,22 +57,6 @@
     <include refid="Base_Column_List" />
     from st_client_amount_month
     where id = #{id,jdbcType=BIGINT}
-  </select>
-  <select id="selectByClientIdAndYearAndMonth" resultMap="BaseResultMap">
-    select
-    <include refid="Base_Column_List" />
-    from st_client_amount_month
-    <where>
-      <if test="clientId != null">
-        and client_id = #{clientId,jdbcType=BIGINT}
-      </if>
-      <if test="year != null">
-        and year = #{year,jdbcType=INTEGER}
-      </if>
-      <if test="month != null">
-        and month = #{month,jdbcType=INTEGER}
-      </if>
-    </where>
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
     <!--@mbg.generated-->
@@ -46,9 +66,33 @@
   <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoSt.StClientAmountMonth">
     <!--@mbg.generated-->
     insert into st_client_amount_month (id, client_id, `year`, 
-      `month`, amount, money)
+      amount1, money1, times1, 
+      amount2, money2, times2, 
+      amount3, money3, times3, 
+      amount4, money4, times4, 
+      amount5, money5, times5, 
+      amount6, money6, times6, 
+      amount7, money7, times7, 
+      amount8, money8, times8, 
+      amount9, money9, times9, 
+      amount10, money10, times10, 
+      amount11, money11, times11, 
+      amount12, money12, times12
+      )
     values (#{id,jdbcType=BIGINT}, #{clientId,jdbcType=BIGINT}, #{year,jdbcType=INTEGER}, 
-      #{month,jdbcType=INTEGER}, #{amount,jdbcType=FLOAT}, #{money,jdbcType=FLOAT})
+      #{amount1,jdbcType=FLOAT}, #{money1,jdbcType=FLOAT}, #{times1,jdbcType=INTEGER}, 
+      #{amount2,jdbcType=FLOAT}, #{money2,jdbcType=FLOAT}, #{times2,jdbcType=INTEGER}, 
+      #{amount3,jdbcType=FLOAT}, #{money3,jdbcType=FLOAT}, #{times3,jdbcType=INTEGER}, 
+      #{amount4,jdbcType=FLOAT}, #{money4,jdbcType=FLOAT}, #{times4,jdbcType=INTEGER}, 
+      #{amount5,jdbcType=FLOAT}, #{money5,jdbcType=FLOAT}, #{times5,jdbcType=INTEGER}, 
+      #{amount6,jdbcType=FLOAT}, #{money6,jdbcType=FLOAT}, #{times6,jdbcType=INTEGER}, 
+      #{amount7,jdbcType=FLOAT}, #{money7,jdbcType=FLOAT}, #{times7,jdbcType=INTEGER}, 
+      #{amount8,jdbcType=FLOAT}, #{money8,jdbcType=FLOAT}, #{times8,jdbcType=INTEGER}, 
+      #{amount9,jdbcType=FLOAT}, #{money9,jdbcType=FLOAT}, #{times9,jdbcType=INTEGER}, 
+      #{amount10,jdbcType=FLOAT}, #{money10,jdbcType=FLOAT}, #{times10,jdbcType=INTEGER}, 
+      #{amount11,jdbcType=FLOAT}, #{money11,jdbcType=FLOAT}, #{times11,jdbcType=INTEGER}, 
+      #{amount12,jdbcType=FLOAT}, #{money12,jdbcType=FLOAT}, #{times12,jdbcType=INTEGER}
+      )
   </insert>
   <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoSt.StClientAmountMonth">
     <!--@mbg.generated-->
@@ -63,14 +107,113 @@
       <if test="year != null">
         `year`,
       </if>
-      <if test="month != null">
-        `month`,
+      <if test="amount1 != null">
+        amount1,
       </if>
-      <if test="amount != null">
-        amount,
+      <if test="money1 != null">
+        money1,
       </if>
-      <if test="money != null">
-        money,
+      <if test="times1 != null">
+        times1,
+      </if>
+      <if test="amount2 != null">
+        amount2,
+      </if>
+      <if test="money2 != null">
+        money2,
+      </if>
+      <if test="times2 != null">
+        times2,
+      </if>
+      <if test="amount3 != null">
+        amount3,
+      </if>
+      <if test="money3 != null">
+        money3,
+      </if>
+      <if test="times3 != null">
+        times3,
+      </if>
+      <if test="amount4 != null">
+        amount4,
+      </if>
+      <if test="money4 != null">
+        money4,
+      </if>
+      <if test="times4 != null">
+        times4,
+      </if>
+      <if test="amount5 != null">
+        amount5,
+      </if>
+      <if test="money5 != null">
+        money5,
+      </if>
+      <if test="times5 != null">
+        times5,
+      </if>
+      <if test="amount6 != null">
+        amount6,
+      </if>
+      <if test="money6 != null">
+        money6,
+      </if>
+      <if test="times6 != null">
+        times6,
+      </if>
+      <if test="amount7 != null">
+        amount7,
+      </if>
+      <if test="money7 != null">
+        money7,
+      </if>
+      <if test="times7 != null">
+        times7,
+      </if>
+      <if test="amount8 != null">
+        amount8,
+      </if>
+      <if test="money8 != null">
+        money8,
+      </if>
+      <if test="times8 != null">
+        times8,
+      </if>
+      <if test="amount9 != null">
+        amount9,
+      </if>
+      <if test="money9 != null">
+        money9,
+      </if>
+      <if test="times9 != null">
+        times9,
+      </if>
+      <if test="amount10 != null">
+        amount10,
+      </if>
+      <if test="money10 != null">
+        money10,
+      </if>
+      <if test="times10 != null">
+        times10,
+      </if>
+      <if test="amount11 != null">
+        amount11,
+      </if>
+      <if test="money11 != null">
+        money11,
+      </if>
+      <if test="times11 != null">
+        times11,
+      </if>
+      <if test="amount12 != null">
+        amount12,
+      </if>
+      <if test="money12 != null">
+        money12,
+      </if>
+      <if test="times12 != null">
+        times12,
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
@@ -83,14 +226,113 @@
       <if test="year != null">
         #{year,jdbcType=INTEGER},
       </if>
-      <if test="month != null">
-        #{month,jdbcType=INTEGER},
+      <if test="amount1 != null">
+        #{amount1,jdbcType=FLOAT},
       </if>
-      <if test="amount != null">
-        #{amount,jdbcType=FLOAT},
+      <if test="money1 != null">
+        #{money1,jdbcType=FLOAT},
       </if>
-      <if test="money != null">
-        #{money,jdbcType=FLOAT},
+      <if test="times1 != null">
+        #{times1,jdbcType=INTEGER},
+      </if>
+      <if test="amount2 != null">
+        #{amount2,jdbcType=FLOAT},
+      </if>
+      <if test="money2 != null">
+        #{money2,jdbcType=FLOAT},
+      </if>
+      <if test="times2 != null">
+        #{times2,jdbcType=INTEGER},
+      </if>
+      <if test="amount3 != null">
+        #{amount3,jdbcType=FLOAT},
+      </if>
+      <if test="money3 != null">
+        #{money3,jdbcType=FLOAT},
+      </if>
+      <if test="times3 != null">
+        #{times3,jdbcType=INTEGER},
+      </if>
+      <if test="amount4 != null">
+        #{amount4,jdbcType=FLOAT},
+      </if>
+      <if test="money4 != null">
+        #{money4,jdbcType=FLOAT},
+      </if>
+      <if test="times4 != null">
+        #{times4,jdbcType=INTEGER},
+      </if>
+      <if test="amount5 != null">
+        #{amount5,jdbcType=FLOAT},
+      </if>
+      <if test="money5 != null">
+        #{money5,jdbcType=FLOAT},
+      </if>
+      <if test="times5 != null">
+        #{times5,jdbcType=INTEGER},
+      </if>
+      <if test="amount6 != null">
+        #{amount6,jdbcType=FLOAT},
+      </if>
+      <if test="money6 != null">
+        #{money6,jdbcType=FLOAT},
+      </if>
+      <if test="times6 != null">
+        #{times6,jdbcType=INTEGER},
+      </if>
+      <if test="amount7 != null">
+        #{amount7,jdbcType=FLOAT},
+      </if>
+      <if test="money7 != null">
+        #{money7,jdbcType=FLOAT},
+      </if>
+      <if test="times7 != null">
+        #{times7,jdbcType=INTEGER},
+      </if>
+      <if test="amount8 != null">
+        #{amount8,jdbcType=FLOAT},
+      </if>
+      <if test="money8 != null">
+        #{money8,jdbcType=FLOAT},
+      </if>
+      <if test="times8 != null">
+        #{times8,jdbcType=INTEGER},
+      </if>
+      <if test="amount9 != null">
+        #{amount9,jdbcType=FLOAT},
+      </if>
+      <if test="money9 != null">
+        #{money9,jdbcType=FLOAT},
+      </if>
+      <if test="times9 != null">
+        #{times9,jdbcType=INTEGER},
+      </if>
+      <if test="amount10 != null">
+        #{amount10,jdbcType=FLOAT},
+      </if>
+      <if test="money10 != null">
+        #{money10,jdbcType=FLOAT},
+      </if>
+      <if test="times10 != null">
+        #{times10,jdbcType=INTEGER},
+      </if>
+      <if test="amount11 != null">
+        #{amount11,jdbcType=FLOAT},
+      </if>
+      <if test="money11 != null">
+        #{money11,jdbcType=FLOAT},
+      </if>
+      <if test="times11 != null">
+        #{times11,jdbcType=INTEGER},
+      </if>
+      <if test="amount12 != null">
+        #{amount12,jdbcType=FLOAT},
+      </if>
+      <if test="money12 != null">
+        #{money12,jdbcType=FLOAT},
+      </if>
+      <if test="times12 != null">
+        #{times12,jdbcType=INTEGER},
       </if>
     </trim>
   </insert>
@@ -104,14 +346,113 @@
       <if test="year != null">
         `year` = #{year,jdbcType=INTEGER},
       </if>
-      <if test="month != null">
-        `month` = #{month,jdbcType=INTEGER},
+      <if test="amount1 != null">
+        amount1 = #{amount1,jdbcType=FLOAT},
       </if>
-      <if test="amount != null">
-        amount = #{amount,jdbcType=FLOAT},
+      <if test="money1 != null">
+        money1 = #{money1,jdbcType=FLOAT},
       </if>
-      <if test="money != null">
-        money = #{money,jdbcType=FLOAT},
+      <if test="times1 != null">
+        times1 = #{times1,jdbcType=INTEGER},
+      </if>
+      <if test="amount2 != null">
+        amount2 = #{amount2,jdbcType=FLOAT},
+      </if>
+      <if test="money2 != null">
+        money2 = #{money2,jdbcType=FLOAT},
+      </if>
+      <if test="times2 != null">
+        times2 = #{times2,jdbcType=INTEGER},
+      </if>
+      <if test="amount3 != null">
+        amount3 = #{amount3,jdbcType=FLOAT},
+      </if>
+      <if test="money3 != null">
+        money3 = #{money3,jdbcType=FLOAT},
+      </if>
+      <if test="times3 != null">
+        times3 = #{times3,jdbcType=INTEGER},
+      </if>
+      <if test="amount4 != null">
+        amount4 = #{amount4,jdbcType=FLOAT},
+      </if>
+      <if test="money4 != null">
+        money4 = #{money4,jdbcType=FLOAT},
+      </if>
+      <if test="times4 != null">
+        times4 = #{times4,jdbcType=INTEGER},
+      </if>
+      <if test="amount5 != null">
+        amount5 = #{amount5,jdbcType=FLOAT},
+      </if>
+      <if test="money5 != null">
+        money5 = #{money5,jdbcType=FLOAT},
+      </if>
+      <if test="times5 != null">
+        times5 = #{times5,jdbcType=INTEGER},
+      </if>
+      <if test="amount6 != null">
+        amount6 = #{amount6,jdbcType=FLOAT},
+      </if>
+      <if test="money6 != null">
+        money6 = #{money6,jdbcType=FLOAT},
+      </if>
+      <if test="times6 != null">
+        times6 = #{times6,jdbcType=INTEGER},
+      </if>
+      <if test="amount7 != null">
+        amount7 = #{amount7,jdbcType=FLOAT},
+      </if>
+      <if test="money7 != null">
+        money7 = #{money7,jdbcType=FLOAT},
+      </if>
+      <if test="times7 != null">
+        times7 = #{times7,jdbcType=INTEGER},
+      </if>
+      <if test="amount8 != null">
+        amount8 = #{amount8,jdbcType=FLOAT},
+      </if>
+      <if test="money8 != null">
+        money8 = #{money8,jdbcType=FLOAT},
+      </if>
+      <if test="times8 != null">
+        times8 = #{times8,jdbcType=INTEGER},
+      </if>
+      <if test="amount9 != null">
+        amount9 = #{amount9,jdbcType=FLOAT},
+      </if>
+      <if test="money9 != null">
+        money9 = #{money9,jdbcType=FLOAT},
+      </if>
+      <if test="times9 != null">
+        times9 = #{times9,jdbcType=INTEGER},
+      </if>
+      <if test="amount10 != null">
+        amount10 = #{amount10,jdbcType=FLOAT},
+      </if>
+      <if test="money10 != null">
+        money10 = #{money10,jdbcType=FLOAT},
+      </if>
+      <if test="times10 != null">
+        times10 = #{times10,jdbcType=INTEGER},
+      </if>
+      <if test="amount11 != null">
+        amount11 = #{amount11,jdbcType=FLOAT},
+      </if>
+      <if test="money11 != null">
+        money11 = #{money11,jdbcType=FLOAT},
+      </if>
+      <if test="times11 != null">
+        times11 = #{times11,jdbcType=INTEGER},
+      </if>
+      <if test="amount12 != null">
+        amount12 = #{amount12,jdbcType=FLOAT},
+      </if>
+      <if test="money12 != null">
+        money12 = #{money12,jdbcType=FLOAT},
+      </if>
+      <if test="times12 != null">
+        times12 = #{times12,jdbcType=INTEGER},
       </if>
     </set>
     where id = #{id,jdbcType=BIGINT}
@@ -121,18 +462,81 @@
     update st_client_amount_month
     set client_id = #{clientId,jdbcType=BIGINT},
       `year` = #{year,jdbcType=INTEGER},
-      `month` = #{month,jdbcType=INTEGER},
-      amount = #{amount,jdbcType=FLOAT},
-      money = #{money,jdbcType=FLOAT}
+      amount1 = #{amount1,jdbcType=FLOAT},
+      money1 = #{money1,jdbcType=FLOAT},
+      times1 = #{times1,jdbcType=INTEGER},
+      amount2 = #{amount2,jdbcType=FLOAT},
+      money2 = #{money2,jdbcType=FLOAT},
+      times2 = #{times2,jdbcType=INTEGER},
+      amount3 = #{amount3,jdbcType=FLOAT},
+      money3 = #{money3,jdbcType=FLOAT},
+      times3 = #{times3,jdbcType=INTEGER},
+      amount4 = #{amount4,jdbcType=FLOAT},
+      money4 = #{money4,jdbcType=FLOAT},
+      times4 = #{times4,jdbcType=INTEGER},
+      amount5 = #{amount5,jdbcType=FLOAT},
+      money5 = #{money5,jdbcType=FLOAT},
+      times5 = #{times5,jdbcType=INTEGER},
+      amount6 = #{amount6,jdbcType=FLOAT},
+      money6 = #{money6,jdbcType=FLOAT},
+      times6 = #{times6,jdbcType=INTEGER},
+      amount7 = #{amount7,jdbcType=FLOAT},
+      money7 = #{money7,jdbcType=FLOAT},
+      times7 = #{times7,jdbcType=INTEGER},
+      amount8 = #{amount8,jdbcType=FLOAT},
+      money8 = #{money8,jdbcType=FLOAT},
+      times8 = #{times8,jdbcType=INTEGER},
+      amount9 = #{amount9,jdbcType=FLOAT},
+      money9 = #{money9,jdbcType=FLOAT},
+      times9 = #{times9,jdbcType=INTEGER},
+      amount10 = #{amount10,jdbcType=FLOAT},
+      money10 = #{money10,jdbcType=FLOAT},
+      times10 = #{times10,jdbcType=INTEGER},
+      amount11 = #{amount11,jdbcType=FLOAT},
+      money11 = #{money11,jdbcType=FLOAT},
+      times11 = #{times11,jdbcType=INTEGER},
+      amount12 = #{amount12,jdbcType=FLOAT},
+      money12 = #{money12,jdbcType=FLOAT},
+      times12 = #{times12,jdbcType=INTEGER}
     where id = #{id,jdbcType=BIGINT}
   </update>
 
-
-  <select id="statisticsByClient" resultType="com.dy.pipIrrGlobal.voSt.VoClientAmountStatistics">
-    select client_id, sum(amount) as amount, sum(money) as money
+  <select id="selectByYear" resultMap="BaseResultMap">
+    select
+    <include refid="Base_Column_List" />
     from st_client_amount_month
-    where `year` = #{year,jdbcType=INTEGER}
-    group by client_id
+    <where>
+      <if test="year != null">
+        and year = #{year,jdbcType=INTEGER}
+      </if>
+    </where>
   </select>
 
+
+  <select id="statisticsByClient" resultType="com.dy.pipIrrGlobal.voSt.VoClientAmountStatistics">
+    select client_id as clientId,
+    sum(
+    IFNULL(amount1,0) + IFNULL(amount2,0) + IFNULL(amount3,0) + IFNULL(amount4,0) + IFNULL(amount5,0) + IFNULL(amount6,0) + IFNULL(amount7,0) + IFNULL(amount8,0) + IFNULL(amount9,0) +
+    IFNULL(amount10,0) + IFNULL(amount11,0) + IFNULL(amount12,0)
+    ) as amount,
+    sum(
+    IFNULL(money1,0) + IFNULL(money2,0) + IFNULL(money3,0) + IFNULL(money4,0) + IFNULL(money5,0) + IFNULL(money6,0) + IFNULL(money7,0) + IFNULL(money8,0) + IFNULL(money9,0) +
+    IFNULL(money10,0) + IFNULL(money11,0) + IFNULL(money12,0)
+    ) as money,
+    sum(
+    IFNULL(times1,0) + IFNULL(times2,0) + IFNULL(times3,0) + IFNULL(times4,0) + IFNULL(times5,0) + IFNULL(times6,0) + IFNULL(times7,0) + IFNULL(times8,0) + IFNULL(times9,0) +
+    IFNULL(times10,0) + IFNULL(times11,0) + IFNULL(times12,0)
+    ) as times
+    from st_client_amount_month
+    where year = #{year, jdbcType=INTEGER}
+    group by client_id
+
+  </select>
+
+  <!-- ////////////////////////////////// -->
+  <!-- 涓存椂浠诲姟鐩稿叧                         -->
+  <!-- ////////////////////////////////// -->
+  <delete id="deleteAll">
+    delete from st_client_amount_month
+  </delete>
 </mapper>
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/StClientAmountYearMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/StClientAmountYearMapper.xml
index 2e366bf..2027ccd 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/StClientAmountYearMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/StClientAmountYearMapper.xml
@@ -9,10 +9,11 @@
     <result column="year" jdbcType="INTEGER" property="year" />
     <result column="amount" jdbcType="FLOAT" property="amount" />
     <result column="money" jdbcType="FLOAT" property="money" />
+    <result column="times" jdbcType="INTEGER" property="times" />
   </resultMap>
   <sql id="Base_Column_List">
     <!--@mbg.generated-->
-    id, client_id, `year`, amount, money
+    id, client_id, `year`, amount, money, times
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
     <!--@mbg.generated-->
@@ -20,19 +21,6 @@
     <include refid="Base_Column_List" />
     from st_client_amount_year
     where id = #{id,jdbcType=BIGINT}
-  </select>
-  <select id="selectByClientIdAndYear" resultMap="BaseResultMap">
-    select
-    <include refid="Base_Column_List" />
-    from st_client_amount_year
-    <where>
-      <if test="clientId != null">
-        and client_id = #{clientId,jdbcType=BIGINT}
-      </if>
-      <if test="year != null">
-        and `year` = #{year,jdbcType=INTEGER}
-      </if>
-    </where>
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
     <!--@mbg.generated-->
@@ -42,9 +30,9 @@
   <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoSt.StClientAmountYear">
     <!--@mbg.generated-->
     insert into st_client_amount_year (id, client_id, `year`, 
-      amount, money)
+      amount, money, times)
     values (#{id,jdbcType=BIGINT}, #{clientId,jdbcType=BIGINT}, #{year,jdbcType=INTEGER}, 
-      #{amount,jdbcType=FLOAT}, #{money,jdbcType=FLOAT})
+      #{amount,jdbcType=FLOAT}, #{money,jdbcType=FLOAT}, #{times,jdbcType=INTEGER})
   </insert>
   <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoSt.StClientAmountYear">
     <!--@mbg.generated-->
@@ -65,6 +53,9 @@
       <if test="money != null">
         money,
       </if>
+      <if test="times != null">
+        times,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -81,6 +72,9 @@
       </if>
       <if test="money != null">
         #{money,jdbcType=FLOAT},
+      </if>
+      <if test="times != null">
+        #{times,jdbcType=INTEGER},
       </if>
     </trim>
   </insert>
@@ -100,6 +94,9 @@
       <if test="money != null">
         money = #{money,jdbcType=FLOAT},
       </if>
+      <if test="times != null">
+        times = #{times,jdbcType=INTEGER},
+      </if>
     </set>
     where id = #{id,jdbcType=BIGINT}
   </update>
@@ -109,7 +106,32 @@
     set client_id = #{clientId,jdbcType=BIGINT},
       `year` = #{year,jdbcType=INTEGER},
       amount = #{amount,jdbcType=FLOAT},
-      money = #{money,jdbcType=FLOAT}
+      money = #{money,jdbcType=FLOAT},
+      times = #{times,jdbcType=INTEGER}
     where id = #{id,jdbcType=BIGINT}
   </update>
+
+
+  <!-- ////////////////////////////////// -->
+  <!-- 缁熻鐩稿叧                         -->
+  <!-- ////////////////////////////////// -->
+  <select id="selectByYear" resultMap="BaseResultMap">
+    select
+    <include refid="Base_Column_List" />
+    from st_client_amount_year
+    <where>
+      <if test="year != null">
+        and `year` = #{year,jdbcType=INTEGER}
+      </if>
+    </where>
+  </select>
+
+
+  <!-- ////////////////////////////////// -->
+  <!-- 涓存椂浠诲姟鐩稿叧                         -->
+  <!-- ////////////////////////////////// -->
+  <delete id="deleteAll">
+    delete from st_client_amount_year
+  </delete>
+
 </mapper>
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StClientAmountSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StClientAmountSv.java
index 52f52f4..c92c250 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StClientAmountSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/statistics/StClientAmountSv.java
@@ -6,7 +6,6 @@
 import com.dy.pipIrrGlobal.daoSt.StClientAmountYearMapper;
 import com.dy.pipIrrGlobal.pojoSt.*;
 import com.dy.pipIrrGlobal.voSt.VoClientAmountStatistics;
-import com.dy.pipIrrGlobal.voSt.VoClientConsumeStatistics;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 import org.springframework.transaction.annotation.Transactional;
@@ -40,13 +39,9 @@
     protected void statisticsDay(Integer statisticsYear, Integer statisticsMonth, Integer statisticsDay, Long statisticsStartId, Long statisticsEndId){
         List<VoClientAmountStatistics> list = rmClientAmountDayDao.statisticsByClient(statisticsStartId, statisticsEndId) ;
         if(list != null && list.size() > 0){
+            List<StClientAmountDay> listOfDay = stClientAmountDayDao.selectByYearAndMonthAndDay(statisticsYear, statisticsMonth) ;
             for(VoClientAmountStatistics vo : list){
-                List<StClientAmountDay> listOfDay = stClientAmountDayDao.selectByClientIdAndYearAndMonthAndDay(vo.clientId, statisticsYear, statisticsMonth) ;
-                StClientAmountDay po = null ;
-                if(listOfDay != null && listOfDay.size() > 0){
-                    //绋嬪簭閫昏緫鎺у埗涓婏紝闆嗗悎涓彧鏈変竴涓璞�
-                    po = listOfDay.get(0) ;
-                }
+                StClientAmountDay po = this.getDayDataOfClient(listOfDay, vo.clientId) ;
                 if(po == null){
                     po = new StClientAmountDay() ;
                     po.clientId = vo.clientId ;
@@ -68,23 +63,17 @@
      */
     @Transactional
     protected void statisticsMonth(Integer statisticsYear, Integer statisticsMonth, Long statisticsStartId, Long statisticsEndId){
-        List<VoClientAmountStatistics> list = rmClientAmountDayDao.statisticsByClient(statisticsStartId, statisticsEndId) ;
+        List<VoClientAmountStatistics> list = stClientAmountDayDao.statisticsByClient(statisticsYear, statisticsMonth) ;
         if(list != null && list.size() > 0){
+            List<StClientAmountMonth> listOfMonth = stClientAmountMonthDao.selectByYear(statisticsYear) ;
             for(VoClientAmountStatistics vo : list){
-                List<StClientAmountMonth> listOfMonth = stClientAmountMonthDao.selectByClientIdAndYearAndMonth(vo.clientId, statisticsYear, statisticsMonth) ;
-                StClientAmountMonth po = null ;
-                if(listOfMonth != null && listOfMonth.size() > 0){
-                    //绋嬪簭閫昏緫鎺у埗涓婏紝闆嗗悎涓彧鏈変竴涓璞�
-                    po = listOfMonth.get(0) ;
-                }
+                 StClientAmountMonth po = this.getMonthDataOfClient(listOfMonth, vo.clientId) ;
                 if(po == null) {
                     po = new StClientAmountMonth();
                 }
                 po.clientId = vo.clientId ;
                 po.year = statisticsYear ;
-                po.month = statisticsMonth ;
-                po.amount = vo.amount;
-                po.money = vo.money ;
+                this.setValueOfMonthOfYear(statisticsMonth, vo, po) ;
                 if(po.id == null) {
                     stClientAmountMonthDao.insert(po);
                 }else{
@@ -101,20 +90,17 @@
     protected void statisticsYear(Integer statisticsYear){
         List<VoClientAmountStatistics> list = stClientAmountMonthDao.statisticsByClient(statisticsYear) ;
         if(list != null && list.size() > 0){
+            List<StClientAmountYear> listOfYear = stClientAmountYearDao.selectByYear(statisticsYear) ;
             for(VoClientAmountStatistics vo : list){
-                List<StClientAmountYear> listOfYear = stClientAmountYearDao.selectByClientIdAndYear(vo.clientId, statisticsYear) ;
-                StClientAmountYear po = null ;
-                if(listOfYear != null && listOfYear.size() > 0){
-                    //绋嬪簭閫昏緫鎺у埗涓婏紝闆嗗悎涓彧鏈変竴涓璞�
-                    po = listOfYear.get(0) ;
-                }
+                StClientAmountYear po = this.getYearDataOfClient(listOfYear, vo.clientId) ;
                 if(po == null) {
                     po = new StClientAmountYear();
                 }
                 po.clientId = vo.clientId ;
                 po.year = statisticsYear ;
-                po.amount = vo.amount;
+                po.amount = vo.amount ;
                 po.money = vo.money ;
+                po.times = vo.times ;
                 if(po.id == null) {
                     stClientAmountYearDao.insert(po);
                 }else{
@@ -122,6 +108,45 @@
                 }
             }
         }
+    }
+
+
+    private StClientAmountDay getDayDataOfClient(List<StClientAmountDay> list, Long clientId){
+        if(list != null && list.size() > 0){
+            for(StClientAmountDay po : list){
+                if(po.clientId.longValue() == clientId.longValue()){
+                    //绋嬪簭閫昏緫鎺у埗涓婏紝闆嗗悎涓彧鏈変竴涓璞�
+                    return po;
+                }
+            }
+        }
+        return null ;
+    }
+
+
+    private StClientAmountMonth getMonthDataOfClient(List<StClientAmountMonth> list, Long clientId){
+        if(list != null && list.size() > 0){
+            for(StClientAmountMonth po : list){
+                if(po.clientId.longValue() == clientId.longValue()){
+                    //绋嬪簭閫昏緫鎺у埗涓婏紝闆嗗悎涓彧鏈変竴涓璞�
+                    return po;
+                }
+            }
+        }
+        return null ;
+    }
+
+
+    private StClientAmountYear getYearDataOfClient(List<StClientAmountYear> list, Long clientId){
+        if(list != null && list.size() > 0){
+            for(StClientAmountYear po : list){
+                if(po.clientId.longValue() == clientId.longValue()){
+                    //绋嬪簭閫昏緫鎺у埗涓婏紝闆嗗悎涓彧鏈変竴涓璞�
+                    return po;
+                }
+            }
+        }
+        return null ;
     }
 
 
@@ -285,61 +310,69 @@
         }
     }
 
-    private void setValueOfMonthOfYear(Integer statisticsMonth, VoClientConsumeStatistics vo, StConsumeClientMonth po){
+    private void setValueOfMonthOfYear(Integer statisticsMonth, VoClientAmountStatistics vo, StClientAmountMonth po){
         switch (statisticsMonth) {
             case 1:
-                po.amount1 = vo.money;
+                po.amount1 = vo.amount;
+                po.money1 = vo.money;
                 po.times1 = vo.times;
                 break;
             case 2:
-                po.amount2 = vo.money;
+                po.amount2 = vo.amount;
+                po.money2 = vo.money;
                 po.times2 = vo.times;
                 break;
             case 3:
-                po.amount3 = vo.money;
+                po.amount3 = vo.amount;
+                po.money3 = vo.money;
                 po.times3 = vo.times;
                 break;
             case 4:
-                po.amount4 = vo.money;
+                po.amount4 = vo.amount;
+                po.money4 = vo.money;
                 po.times4 = vo.times;
                 break;
             case 5:
-                po.amount5 = vo.money;
+                po.amount5 = vo.amount;
+                po.money5 = vo.money;
                 po.times5 = vo.times;
                 break;
             case 6:
-                po.amount6 = vo.money;
+                po.amount6 = vo.amount;
+                po.money6 = vo.money;
                 po.times6 = vo.times;
                 break;
             case 7:
-                po.amount7 = vo.money;
+                po.amount7 = vo.amount;
+                po.money7 = vo.money;
                 po.times7 = vo.times;
                 break;
             case 8:
-                po.amount8 = vo.money;
+                po.amount8 = vo.amount;
+                po.money8 = vo.money;
                 po.times8 = vo.times;
                 break;
             case 9:
-                po.amount9 = vo.money;
+                po.amount9 = vo.amount;
+                po.money9 = vo.money;
                 po.times9 = vo.times;
                 break;
             case 10:
-                po.amount10 = vo.money;
+                po.amount10 = vo.amount;
+                po.money10 = vo.money;
                 po.times10 = vo.times;
                 break;
             case 11:
-                po.amount11 = vo.money;
+                po.amount11 = vo.amount;
+                po.money11 = vo.money;
                 po.times11 = vo.times;
                 break;
             case 12:
-                po.amount12 = vo.money;
+                po.amount12 = vo.amount;
+                po.money12 = vo.money;
                 po.times12 = vo.times;
                 break;
         }
     }
 
-    private void setValueOfYear(VoClientConsumeStatistics vo, StConsumeClientYear po){
-        po.amount = vo.money;
-        po.times = vo.times;
-    }
 }
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/statistics/StClientAmountConstant.java b/pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/statistics/StClientAmountConstant.java
new file mode 100644
index 0000000..5190805
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/statistics/StClientAmountConstant.java
@@ -0,0 +1,12 @@
+package com.dy.pipIrrTemp.statistics;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2024/12/30 13:49
+ * @Description
+ */
+public class StClientAmountConstant {
+
+    public static final int[][] yearMonthGrp = {{2024, 9}, {2024, 10}, {2024, 11}, {2024, 12}, {2025, 1}, {2025, 2}, {2025, 3}, {2025, 4}};
+
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/statistics/StClientAmountSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/statistics/StClientAmountDaySv.java
similarity index 74%
rename from pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/statistics/StClientAmountSv.java
rename to pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/statistics/StClientAmountDaySv.java
index 3509ebc..9a97dd0 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/statistics/StClientAmountSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/statistics/StClientAmountDaySv.java
@@ -24,7 +24,7 @@
 
 @Slf4j
 @Service
-public class StClientAmountSv {
+public class StClientAmountDaySv {
 
     protected RmClientAmountDayMapper rmClientAmountDayDao;
 
@@ -40,8 +40,6 @@
         this.stClientAmountDayDao = dao;
     }
 
-    private static final int[][] yearMonthGrp = {{2024, 9}, {2024, 10}, {2024, 11}, {2024, 12}, {2025, 1}, {2025, 2}, {2025, 3}, {2025, 4}};
-
     /**
      * 鍒犻櫎鎵�鏈�
      * @throws Exception
@@ -56,17 +54,18 @@
      * @throws Exception
      */
     public void transSaveClientAmountDay() throws Exception {
+        //缁熻鍒版槰澶╋紝浠婂ぉ鐨勭粺璁℃槑鏃ラ浂鏅ㄥ畾鏃朵换鍔$粺璁�
         Long yesterday = Long.parseLong(DateTime.lastXDay_yyyy_MM_dd(1).replaceAll("-", ""));
         Long atDay = Long.MAX_VALUE ;
         int endDayOfMonth = 0 ;
-        for(int[] ym : yearMonthGrp) {
+        for(int[] ym : StClientAmountConstant.yearMonthGrp) {
             endDayOfMonth = DateTime.endDayOfMonth(ym[0], ym[1]) ;
             for (int day = 1; day <= endDayOfMonth; day++) {
                 atDay = Long.parseLong(ym[0] + "" + (ym[1] < 10?("0" + ym[1]):ym[1]) + "" + (day < 10?("0" + day):day)) ;
                 if(atDay <= yesterday) {
                     Long statistics4DayStartId = IDLongGenerator.generateOneDayStartId(ym[0], ym[1], day);
                     Long statistics4DayEndId = IDLongGenerator.generateOneDayEndId(ym[0], ym[1], day);
-                    this.statisticsDay(ym[0], ym[1], day, statistics4DayStartId, statistics4DayEndId);
+                    this.doSome(ym[0], ym[1], day, statistics4DayStartId, statistics4DayEndId);
                 }
             }
         }
@@ -74,23 +73,19 @@
 
 
     @Transactional
-    protected void statisticsDay(Integer statisticsYear, Integer statisticsMonth, Integer statisticsDay, Long statisticsStartId, Long statisticsEndId){
+    protected void doSome(Integer statisticsYear, Integer statisticsMonth, Integer statisticsDay, Long statisticsStartId, Long statisticsEndId){
         List<VoClientAmountStatistics> list = rmClientAmountDayDao.statisticsByClient(statisticsStartId, statisticsEndId) ;
         if(list != null && list.size() > 0){
+            List<StClientAmountDay> listOfDay = stClientAmountDayDao.selectByYearAndMonthAndDay(statisticsYear, statisticsMonth) ;
             for(VoClientAmountStatistics vo : list){
-                List<StClientAmountDay> listOfDay = stClientAmountDayDao.selectByClientIdAndYearAndMonthAndDay(vo.clientId, statisticsYear, statisticsMonth) ;
-                StClientAmountDay po = null ;
-                if(listOfDay != null && listOfDay.size() > 0){
-                    //绋嬪簭閫昏緫鎺у埗涓婏紝闆嗗悎涓彧鏈変竴涓璞�
-                    po = listOfDay.get(0) ;
-                }
+                StClientAmountDay po = this.getDataOfClient(listOfDay, vo.clientId) ;
                 if(po == null){
                     po = new StClientAmountDay() ;
                     po.clientId = vo.clientId ;
                     po.year = statisticsYear ;
                     po.month = statisticsMonth ;
                 }
-                this.setValueOfDayOfMonth(statisticsDay, vo, po);
+                this.setValue(statisticsDay, vo, po);
                 if(po.id == null) {
                     stClientAmountDayDao.insert(po);
                 }else{
@@ -100,7 +95,20 @@
         }
     }
 
-    private void setValueOfDayOfMonth(Integer statisticsDay, VoClientAmountStatistics vo, StClientAmountDay po){
+
+    private StClientAmountDay getDataOfClient(List<StClientAmountDay> list, Long clientId){
+        if(list != null && list.size() > 0){
+            for(StClientAmountDay vo : list){
+                if(vo.clientId.longValue() == clientId.longValue()){
+                    //绋嬪簭閫昏緫鎺у埗涓婏紝闆嗗悎涓彧鏈変竴涓璞�
+                    return vo ;
+                }
+            }
+        }
+        return null ;
+    }
+
+    private void setValue(Integer statisticsDay, VoClientAmountStatistics vo, StClientAmountDay po){
         switch (statisticsDay) {
             case 1:
                 po.amount1 = vo.amount;
@@ -260,62 +268,5 @@
         }
     }
 
-    private void setValueOfMonthOfYear(Integer statisticsMonth, VoClientConsumeStatistics vo, StConsumeClientMonth po){
-        switch (statisticsMonth) {
-            case 1:
-                po.amount1 = vo.amount;
-                po.times1 = vo.times;
-                break;
-            case 2:
-                po.amount2 = vo.amount;
-                po.times2 = vo.times;
-                break;
-            case 3:
-                po.amount3 = vo.amount;
-                po.times3 = vo.times;
-                break;
-            case 4:
-                po.amount4 = vo.amount;
-                po.times4 = vo.times;
-                break;
-            case 5:
-                po.amount5 = vo.amount;
-                po.times5 = vo.times;
-                break;
-            case 6:
-                po.amount6 = vo.amount;
-                po.times6 = vo.times;
-                break;
-            case 7:
-                po.amount7 = vo.amount;
-                po.times7 = vo.times;
-                break;
-            case 8:
-                po.amount8 = vo.amount;
-                po.times8 = vo.times;
-                break;
-            case 9:
-                po.amount9 = vo.amount;
-                po.times9 = vo.times;
-                break;
-            case 10:
-                po.amount10 = vo.amount;
-                po.times10 = vo.times;
-                break;
-            case 11:
-                po.amount11 = vo.amount;
-                po.times11 = vo.times;
-                break;
-            case 12:
-                po.amount12 = vo.amount;
-                po.times12 = vo.times;
-                break;
-        }
-    }
-
-    private void setValueOfYear(VoClientConsumeStatistics vo, StConsumeClientYear po){
-        po.amount = vo.amount;
-        po.times = vo.times;
-    }
 }
 
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/statistics/StClientAmountMonthSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/statistics/StClientAmountMonthSv.java
new file mode 100644
index 0000000..b280e01
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/statistics/StClientAmountMonthSv.java
@@ -0,0 +1,170 @@
+package com.dy.pipIrrTemp.statistics;
+
+import com.dy.common.util.DateTime;
+import com.dy.common.util.IDLongGenerator;
+import com.dy.pipIrrGlobal.daoSt.StClientAmountDayMapper;
+import com.dy.pipIrrGlobal.daoSt.StClientAmountMonthMapper;
+import com.dy.pipIrrGlobal.pojoSt.StClientAmountMonth;
+import com.dy.pipIrrGlobal.pojoSt.StConsumeClientMonth;
+import com.dy.pipIrrGlobal.pojoSt.StConsumeClientYear;
+import com.dy.pipIrrGlobal.voSt.VoClientAmountStatistics;
+import com.dy.pipIrrGlobal.voSt.VoClientConsumeStatistics;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2024/12/30 09:52
+ * @Description
+ */
+
+@Slf4j
+@Service
+public class StClientAmountMonthSv {
+
+    protected StClientAmountDayMapper stClientAmountDayDao;
+
+    protected StClientAmountMonthMapper stClientAmountMonthDao;
+
+    @Autowired
+    private void setDao(StClientAmountDayMapper dao) {
+        this.stClientAmountDayDao = dao;
+    }
+
+    @Autowired
+    private void setDao(StClientAmountMonthMapper dao) {
+        this.stClientAmountMonthDao = dao;
+    }
+
+    /**
+     * 鍒犻櫎鎵�鏈�
+     * @throws Exception
+     */
+    public void deleteAllStClientAmountMonth() throws Exception {
+        stClientAmountMonthDao.deleteAll() ;
+    }
+
+    /**
+     * 杞瓨鍐滄埛鏈堝彇姘撮噺
+     *
+     * @throws Exception
+     */
+    public void statisticsClientAmountMonth() throws Exception {
+        //缁熻鍒版槰澶╋紝浠婂ぉ鐨勭粺璁℃槑鏃ラ浂鏅ㄥ畾鏃朵换鍔$粺璁�
+        Long curYm = Long.parseLong(DateTime.yyyy_MM().replaceAll("-", ""));
+        Long atMonth ;
+        for(int[] ym : StClientAmountConstant.yearMonthGrp) {
+            atMonth = Long.parseLong(ym[0] + "" + (ym[1] < 10?("0" + ym[1]):ym[1]) ) ;
+            if(atMonth <= curYm) {
+                this.doSome(ym[0], ym[1]);
+            }
+        }
+    }
+
+
+    @Transactional
+    protected void doSome(Integer statisticsYear, Integer statisticsMonth){
+        List<VoClientAmountStatistics> list = stClientAmountDayDao.statisticsByClient(statisticsYear, statisticsMonth) ;
+        if(list != null && list.size() > 0){
+            List<StClientAmountMonth> listOfMonth = stClientAmountMonthDao.selectByYear(statisticsYear) ;
+            for(VoClientAmountStatistics vo : list){
+                StClientAmountMonth po = this.getDataOfClient(listOfMonth, vo.clientId) ;
+                if(po == null){
+                    po = new StClientAmountMonth() ;
+                    po.clientId = vo.clientId ;
+                    po.year = statisticsYear ;
+                }
+                this.setValue(statisticsMonth, vo, po);
+                if(po.id == null) {
+                    stClientAmountMonthDao.insert(po);
+                }else{
+                    stClientAmountMonthDao.updateByPrimaryKeySelective(po) ;
+                }
+            }
+        }
+    }
+
+
+    private StClientAmountMonth getDataOfClient(List<StClientAmountMonth> list, Long clientId){
+        if(list != null && list.size() > 0){
+            for(StClientAmountMonth vo : list){
+                if(vo.clientId.longValue() == clientId.longValue()){
+                    //绋嬪簭閫昏緫鎺у埗涓婏紝闆嗗悎涓彧鏈変竴涓璞�
+                    return vo ;
+                }
+            }
+        }
+        return null ;
+    }
+
+    private void setValue(Integer statisticsMonth, VoClientAmountStatistics vo, StClientAmountMonth po){
+        switch (statisticsMonth) {
+            case 1:
+                po.amount1 = vo.amount;
+                po.money1 = vo.money;
+                po.times1 = vo.times;
+                break;
+            case 2:
+                po.amount2 = vo.amount;
+                po.money2 = vo.money;
+                po.times2 = vo.times;
+                break;
+            case 3:
+                po.amount3 = vo.amount;
+                po.money3 = vo.money;
+                po.times3 = vo.times;
+                break;
+            case 4:
+                po.amount4 = vo.amount;
+                po.money4 = vo.money;
+                po.times4 = vo.times;
+                break;
+            case 5:
+                po.amount5 = vo.amount;
+                po.money5 = vo.money;
+                po.times5 = vo.times;
+                break;
+            case 6:
+                po.amount6 = vo.amount;
+                po.money6 = vo.money;
+                po.times6 = vo.times;
+                break;
+            case 7:
+                po.amount7 = vo.amount;
+                po.money7 = vo.money;
+                po.times7 = vo.times;
+                break;
+            case 8:
+                po.amount8 = vo.amount;
+                po.money8 = vo.money;
+                po.times8 = vo.times;
+                break;
+            case 9:
+                po.amount9 = vo.amount;
+                po.money9 = vo.money;
+                po.times9 = vo.times;
+                break;
+            case 10:
+                po.amount10 = vo.amount;
+                po.money10 = vo.money;
+                po.times10 = vo.times;
+                break;
+            case 11:
+                po.amount11 = vo.amount;
+                po.money11 = vo.money;
+                po.times11 = vo.times;
+                break;
+            case 12:
+                po.amount12 = vo.amount;
+                po.money12 = vo.money;
+                po.times12 = vo.times;
+                break;
+        }
+    }
+
+}
+
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/statistics/StClientAmountYearSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/statistics/StClientAmountYearSv.java
new file mode 100644
index 0000000..73ff3b9
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/statistics/StClientAmountYearSv.java
@@ -0,0 +1,116 @@
+package com.dy.pipIrrTemp.statistics;
+
+import com.dy.common.util.DateTime;
+import com.dy.pipIrrGlobal.daoSt.StClientAmountDayMapper;
+import com.dy.pipIrrGlobal.daoSt.StClientAmountMonthMapper;
+import com.dy.pipIrrGlobal.daoSt.StClientAmountYearMapper;
+import com.dy.pipIrrGlobal.pojoSt.StClientAmountMonth;
+import com.dy.pipIrrGlobal.pojoSt.StClientAmountYear;
+import com.dy.pipIrrGlobal.voSt.VoClientAmountStatistics;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2024/12/30 09:52
+ * @Description
+ */
+
+@Slf4j
+@Service
+public class StClientAmountYearSv {
+
+    protected StClientAmountDayMapper stClientAmountDayDao;
+
+    protected StClientAmountMonthMapper stClientAmountMonthDao;
+
+    protected StClientAmountYearMapper stClientAmountYearDao;
+
+    @Autowired
+    private void setDao(StClientAmountDayMapper dao) {
+        this.stClientAmountDayDao = dao;
+    }
+
+    @Autowired
+    private void setDao(StClientAmountMonthMapper dao) {
+        this.stClientAmountMonthDao = dao;
+    }
+
+    @Autowired
+    private void setDao(StClientAmountYearMapper dao) {
+        this.stClientAmountYearDao = dao;
+    }
+
+    /**
+     * 鍒犻櫎鎵�鏈�
+     * @throws Exception
+     */
+    public void deleteAllStClientAmountYear() throws Exception {
+        stClientAmountYearDao.deleteAll() ;
+    }
+
+    /**
+     * 杞瓨鍐滄埛骞村彇姘撮噺
+     *
+     * @throws Exception
+     */
+    public void statisticsClientAmountYear() throws Exception {
+        //缁熻鍒版槰澶╋紝浠婂ぉ鐨勭粺璁℃槑鏃ラ浂鏅ㄥ畾鏃朵换鍔$粺璁�
+        Long curY = Long.parseLong(DateTime.yyyy().replaceAll("-", ""));
+        Long atYear ;
+        for(int[] ym : StClientAmountConstant.yearMonthGrp) {
+            atYear = ym[0] + 0L ;
+            if(atYear <= curY) {
+                this.doSome(ym[0]);
+            }
+        }
+    }
+
+
+    @Transactional
+    protected void doSome(Integer statisticsYear){
+        List<VoClientAmountStatistics> list = stClientAmountMonthDao.statisticsByClient(statisticsYear) ;
+        if(list != null && list.size() > 0){
+            List<StClientAmountYear> listOfYear = stClientAmountYearDao.selectByYear(statisticsYear) ;
+            for(VoClientAmountStatistics vo : list){
+                StClientAmountYear po = this.getDataOfClient(listOfYear, vo.clientId) ;
+                if(po == null){
+                    po = new StClientAmountYear() ;
+                    po.clientId = vo.clientId ;
+                    po.year = statisticsYear ;
+                }
+                this.setValue(vo, po);
+                if(po.id == null) {
+                    stClientAmountYearDao.insert(po);
+                }else{
+                    stClientAmountYearDao.updateByPrimaryKeySelective(po) ;
+                }
+            }
+        }
+    }
+
+
+    private StClientAmountYear getDataOfClient(List<StClientAmountYear> list, Long clientId){
+        if(list != null && list.size() > 0){
+            for(StClientAmountYear vo : list){
+                if(vo.clientId.longValue() == clientId.longValue()){
+                    //绋嬪簭閫昏緫鎺у埗涓婏紝闆嗗悎涓彧鏈変竴涓璞�
+                    return vo ;
+                }
+            }
+        }
+        return null ;
+    }
+
+    private void setValue(VoClientAmountStatistics vo, StClientAmountYear po){
+        po.amount = vo.amount;
+        po.money = vo.money;
+        po.times = vo.times;
+    }
+
+}
+
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/statistics/StSomeCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/statistics/StSomeCtrl.java
index 790a49d..9353712 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/statistics/StSomeCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/java/com/dy/pipIrrTemp/statistics/StSomeCtrl.java
@@ -19,11 +19,21 @@
 @RequestMapping(path = "stSome")
 public class StSomeCtrl {
 
-    private StClientAmountSv stClientAmountSv;
+    private StClientAmountDaySv stClientAmountDaySv;
+    private StClientAmountMonthSv stClientAmountMonthSv;
+    private StClientAmountYearSv stClientAmountYearSv;
 
     @Autowired
-    private void setSv(StClientAmountSv sv) {
-        this.stClientAmountSv = sv;
+    private void setSv(StClientAmountDaySv sv) {
+        this.stClientAmountDaySv = sv;
+    }
+    @Autowired
+    private void setSv(StClientAmountMonthSv sv) {
+        this.stClientAmountMonthSv = sv;
+    }
+    @Autowired
+    private void setSv(StClientAmountYearSv sv) {
+        this.stClientAmountYearSv = sv;
     }
 
     ///////////////////////////////////////////
@@ -38,8 +48,30 @@
     @GetMapping(path = "transSaveClientAmountDay")
     @SsoAop()
     public BaseResponse<Boolean> transSaveClientAmountDay() throws Exception{
-        this.stClientAmountSv.deleteAllStClientAmountDay();
-        this.stClientAmountSv.transSaveClientAmountDay();
+        this.stClientAmountDaySv.deleteAllStClientAmountDay();
+        this.stClientAmountDaySv.transSaveClientAmountDay();
+        return BaseResponseUtils.buildSuccess(true);
+    }
+    /**
+     * 缁熻鍐滄埛鏈堝彇姘撮噺
+     * @return
+     */
+    @GetMapping(path = "statisticsClientAmountMonth")
+    @SsoAop()
+    public BaseResponse<Boolean> statisticsClientAmountMonth() throws Exception{
+        this.stClientAmountMonthSv.deleteAllStClientAmountMonth();
+        this.stClientAmountMonthSv.statisticsClientAmountMonth();
+        return BaseResponseUtils.buildSuccess(true);
+    }
+   /**
+     * 缁熻鍐滄埛骞村彇姘撮噺
+     * @return
+     */
+    @GetMapping(path = "statisticsClientAmountYear")
+    @SsoAop()
+    public BaseResponse<Boolean> statisticsClientAmountYear() throws Exception{
+        this.stClientAmountYearSv.deleteAllStClientAmountYear();
+        this.stClientAmountYearSv.statisticsClientAmountYear();
         return BaseResponseUtils.buildSuccess(true);
     }
 
diff --git "a/pipIrr-platform/pipIrr-web/pipIrr-web-temp/\350\257\264\346\230\216.txt" "b/pipIrr-platform/pipIrr-web/pipIrr-web-temp/\350\257\264\346\230\216.txt"
index 629f33b..eb5c0cf 100644
--- "a/pipIrr-platform/pipIrr-web/pipIrr-web-temp/\350\257\264\346\230\216.txt"
+++ "b/pipIrr-platform/pipIrr-web/pipIrr-web-temp/\350\257\264\346\230\216.txt"
@@ -27,4 +27,8 @@
 
 
 10 杞瓨鍐滄埛鏃ュ彇姘撮噺锛岀敱绾靛瀷鏀逛负妯瀷锛�2025骞�4鏈堬紙鍖呮嫭锛夊墠鍙墽琛屽娆★級
-/temp/stSome/transSaveClientAmountDay
\ No newline at end of file
+/temp/stSome/transSaveClientAmountDay
+11 缁熻鍐滄埛鏈堝彇姘撮噺锛屽繀椤讳笂闈ransSaveClientAmountDay鎵ц瀹屽悗鍐嶆墽琛�
+/temp/stSome/statisticsClientAmountMonth
+12 缁熻鍐滄埛骞村彇姘撮噺锛屽繀椤讳笂闈tatisticsClientAmountMonth鎵ц瀹屽悗鍐嶆墽琛�
+/temp/stSome/statisticsClientAmountYear
\ No newline at end of file

--
Gitblit v1.8.0