From 86719a90118b4b458ae593b53457f23c11ee8d44 Mon Sep 17 00:00:00 2001
From: Administrator <zhubaomin>
Date: 星期四, 25 七月 2024 15:27: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/RmIntakeAmountDayLastMapper.xml |   47 +++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 47 insertions(+), 0 deletions(-)

diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmIntakeAmountDayLastMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmIntakeAmountDayLastMapper.xml
index 25a5872..ea0db3b 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmIntakeAmountDayLastMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/RmIntakeAmountDayLastMapper.xml
@@ -167,4 +167,51 @@
       rtu_dt_last = #{rtuDtLast,jdbcType=TIMESTAMP}
     where id = #{id,jdbcType=BIGINT}
   </update>
+  <!--鏍规嵁鎸囧畾鏉′欢鑾峰彇璁板綍鎬绘暟-->
+  <select id="getRecordCount" resultType="java.lang.Long">
+    select count(*)
+    from rm_intake_amount_day_last riadl
+    Left join pr_intake pint on pint.id = riadl.intake_id
+    <where>
+      <if test="intakeName != null">
+        and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
+      </if>
+      <if test="startDt != null">
+        and riadl.dt &gt;= #{startDt,jdbcType=DATE}
+      </if>
+      <if test="endDt != null">
+        and riadl.dt &lt;= #{endDt,jdbcType=DATE}
+      </if>
+    </where>
+    </select>
+  <!--鏍规嵁鎸囧畾鏉′欢鑾峰彇璁板綍-->
+  <select id="getIntakeAmountDayLast" resultType="com.dy.pipIrrGlobal.voRm.VoIntakeAmountDay">
+    select
+    CAST(riadl.intake_id AS char)AS intakeId,
+    pint.name as intakeName,
+    riadl.dt as dt,
+    riadl.amount as amount,
+    riadl.dt_last as dtLast,
+    riadl.rtu_addr_last as rtuAddrLast,
+    CAST(riadl.controller_id_last AS char)AS controllerIdLast,
+    riadl.total_amount_last as totalAmountLast,
+    riadl.rtu_dt_last as rtuDtLast
+    from rm_intake_amount_day_last riadl
+    Left join pr_intake pint on pint.id = riadl.intake_id
+    <where>
+      <if test="intakeName != null">
+        and pint.name like CONCAT('%',#{intakeName,jdbcType=VARCHAR},'%')
+      </if>
+      <if test="startDt != null">
+        and riadl.dt &gt;= #{startDt,jdbcType=DATE}
+      </if>
+      <if test="endDt != null">
+        and riadl.dt &lt;= #{endDt,jdbcType=DATE}
+      </if>
+    </where>
+    ORDER BY riadl.id DESC
+    <if test="pageCurr != null and pageSize != null">
+      LIMIT ${(pageCurr-1)*pageSize}, ${pageSize}
+    </if>
+  </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0