From be72f3839cab77e0d0e80f4bf0b574042c7c3f9b Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期一, 30 十二月 2024 14:03:52 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV

---
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/StClientAmountDayMapper.xml |   40 +++++++++++++++++++++++++++++++++++++---
 1 files changed, 37 insertions(+), 3 deletions(-)

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 0afb8e5..60fc47a 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/StClientAmountDayMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/StClientAmountDayMapper.xml
@@ -1184,12 +1184,46 @@
     where id = #{id,jdbcType=BIGINT}
   </update>
 
-  <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>
+
+  <!-- ////////////////////////////////// -->
+  <!-- 涓存椂浠诲姟鐩稿叧                         -->
+  <!-- ////////////////////////////////// -->
+  <delete id="deleteAll">
+    delete from st_client_amount_day
+  </delete>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0