From 539d9ffc477d28a23a923b41fdeabc8c37c99ce6 Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期一, 23 九月 2024 14:43:31 +0800
Subject: [PATCH] #

---
 src/main/resources/mapper/SaasLogMapper.xml |   53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 53 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mapper/SaasLogMapper.xml b/src/main/resources/mapper/SaasLogMapper.xml
index 6dcd2b3..eab3742 100644
--- a/src/main/resources/mapper/SaasLogMapper.xml
+++ b/src/main/resources/mapper/SaasLogMapper.xml
@@ -10,7 +10,60 @@
         <result column="matnr" property="matnr" />
         <result column="io_time" property="ioTime" />
         <result column="create_by" property="createBy" />
+        <result column="create_by_name" property="createByName" />
 
     </resultMap>
+    <select id="selectListSummary" resultType="com.zy.system.entity.SaasLog">
+        select
+            ISNULL(owner,
+                   '') owner,
+            type,
+            matnr ,
+            sum(ssl.anfme) anfme
+        from
+            sys_saas_log ssl
+        <where>
+            <if test="sDate != null">
+                and io_time &gt; #{sDate}
+            </if>
+            <if test="eDate != null">
+                and io_time &lt; #{eDate}
+            </if>
+            <if test="type != null and type != ''">
+                and type = #{type}
+            </if>
+            <if test="owner != null and owner != ''">
+                and owner = #{owner}
+            </if>
+        </where>
+        group by
+            ssl.owner,
+            ssl.type,
+            ssl.matnr
+        order by
+            ssl.owner,
+            type
+    </select>
+    <select id="selectListSummaryBySubtotal" resultType="com.zy.system.entity.SaasLog">
+        select owner,type,sum(anfme) anfme from sys_saas_log
+        <where>
+            <if test="owner == ''">
+                owner IS NULL
+            </if>
+            <if test="owner != ''">
+                owner = #{owner}
+            </if>
+            <if test="sDate != null">
+                and io_time &gt; #{sDate}
+            </if>
+            <if test="eDate != null">
+                and io_time &lt; #{eDate}
+            </if>
+            <if test="type != null and type != ''">
+                and type = #{type}
+            </if>
+        </where>
+        group by owner,type order by owner,type
+    </select>
 
 </mapper>

--
Gitblit v1.9.1