From 73887da1c95e54971951a40421980eb15296caab Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Wed, 20 Dec 2023 15:28:53 +0800
Subject: [PATCH] 统计接口优化

---
 src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml b/src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml
index f85fa3d..4bd2647 100644
--- a/src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml
+++ b/src/main/java/org/springblade/modules/house/mapper/HouseMapper.xml
@@ -272,7 +272,7 @@
         </if>
 
         <if test="aoiCode != null  and aoiCode != ''">
-            and jda.aoi_code=#{aoiCode}}
+            and jda.aoi_code=#{aoiCode}
         </if>
         <if test="userId != null">
         AND jda.address_code IN (
@@ -305,16 +305,18 @@
         WHERE
         jda.nei_code = #{code}
         AND jh.is_deleted = 0
+
         <if test="buildingCode != null  and buildingCode != ''">
             and jda.building_code=#{buildingCode}
         </if>
 
         <if test="uniCode != null  and uniCode != ''">
             and jda.unit_code=#{uniCode}
+            AND jda.unit_code is not null
         </if>
 
         <if test="aoiCode != null  and aoiCode != ''">
-            and jda.aoi_code=#{aoiCode}}
+            and jda.aoi_code=#{aoiCode}
         </if>
         <if test="userId != null">
             AND jda.address_code IN (
@@ -349,10 +351,11 @@
 
         <if test="uniCode != null  and uniCode != ''">
             and jda.unit_code=#{uniCode}
+            AND jda.unit_code is not null
         </if>
 
         <if test="aoiCode != null  and aoiCode != ''">
-            and jda.aoi_code=#{aoiCode}}
+            and jda.aoi_code=#{aoiCode}
         </if>
         <if test="userId != null">
         AND jda.address_code IN (
@@ -383,6 +386,7 @@
         WHERE
         jda.nei_code = #{code}
         AND jh.is_deleted = 0
+        AND jda.unit_code is not null
         <if test="buildingCode != null  and buildingCode != ''">
             and jda.building_code=#{buildingCode}
         </if>
@@ -392,7 +396,7 @@
         </if>
 
         <if test="aoiCode != null  and aoiCode != ''">
-            and jda.aoi_code=#{aoiCode}}
+            and jda.aoi_code=#{aoiCode}
         </if>
         <if test="userId != null">
             AND jda.address_code IN (

--
Gitblit v1.9.3