From 90c02e0ad08c054e1f44476a3e9e16b947c1fd8c Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期一, 14 七月 2025 11:49:14 +0800
Subject: [PATCH] 修改用水户年用水量统计查询中的bug

---
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/StClientAmountYearMapper.xml |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

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 3003517..366e3c2 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/StClientAmountYearMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/StClientAmountYearMapper.xml
@@ -151,7 +151,12 @@
         mtb.name like concat('%', #{name}, '%')
       </if>
     </trim>
-    order by mtb.id ASC
+    order by mtb.id DESC
+    <trim prefix="limit " >
+      <if test="start != null and count != null">
+        #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER}
+      </if>
+    </trim>
   </select>
 
   <select id="selectYearStatistics4OneYear" resultType="com.dy.pipIrrGlobal.voSt.VoStClientAmountYearRecord">
@@ -206,18 +211,20 @@
     where ctb.deleted != 1
     <trim prefix="and" suffixOverrides="and">
       <if test="year != null">
-        cayTb.`year` = #{year,jdbcType=INTEGER}
+        (cayTb.`year` = #{year,jdbcType=INTEGER} or cayTb.`year` is null)
       </if>
       <if test="name != null and name != ''">
         and ctb.name like concat('%', #{clientName}, '%')
       </if>
     </trim>
     order by ctb.id DESC
+    <!-- 2025-07-14 鍥犱负鏈塩lientIdsJson闄愬埗鐨勬暟閲忥紝鎵�浠ヤ笉鍐嶇敤limit浜�
     <trim prefix="limit " >
       <if test="start != null and count != null">
         #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER}
       </if>
     </trim>
+    -->
   </select>
 
   <!-- ////////////////////////////////// -->

--
Gitblit v1.8.0