From 016e47ea961d84a186db0bbd45cd6d7eaaa57bc3 Mon Sep 17 00:00:00 2001
From: linwei <872216696@qq.com>
Date: Fri, 26 Jan 2024 16:30:20 +0800
Subject: [PATCH] 文章添加小区id 字段
---
src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.xml | 18 ++++++------------
1 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.xml b/src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.xml
index aa4de06..d3f36ee 100644
--- a/src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.xml
+++ b/src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.xml
@@ -111,7 +111,7 @@
select aoi_code as id,sub_aoi as name,1 as addressType from jczz_doorplate_address
where 1=1
and aoi_code !=''
- and aoi_name =''
+ and aoi_name is null
and sub_aoi != ''
<if test="houseParam.name != null and houseParam.name!=''">
and nei_name = #{houseParam.name}
@@ -145,9 +145,6 @@
where jpl.is_deleted = 0
<if test="houseParam.communityName!=null and houseParam.communityName!=''">
and community_name like concat('%',#{houseParam.communityName},'%')
- </if>
- <if test="houseParam.gridName!=null and houseParam.gridName!=''">
- and grid_name like concat('%',#{houseParam.gridName},'%')
</if>
<if test="houseParam.code != null and houseParam.code!=''">
and community_code = #{houseParam.code}
@@ -200,7 +197,7 @@
left join
(
SELECT house_code, NAME, relationship FROM jczz_household WHERE id in(
- SELECT max(id) FROM jczz_household where relationship = 1 GROUP BY house_code
+ SELECT max(id) FROM jczz_household where is_deleted =0 and relationship = 1 GROUP BY house_code
)
) jh
on jda.address_code = jh.house_code
@@ -310,7 +307,7 @@
jp.id as cid,jp.*,jp.create_time as pcreateTime,
bu.real_name as createUserName
FROM jczz_doorplate_address jda
- left join jczz_place jp on jda.address_code = jp.house_code and jp.is_deleted = 0
+ left join jczz_place jp on locate(jda.address_code,jp.house_code)>0 and jp.is_deleted = 0
left join blade_user bu on bu.id = jp.create_user and bu.is_deleted = 0
WHERE 1=1
<if test="vo.stdId != null and vo.stdId != ''">
@@ -415,25 +412,22 @@
<if test="houseParam.communityName!=null and houseParam.communityName!=''">
and community_name like concat('%',#{houseParam.communityName},'%')
</if>
- <if test="houseParam.gridName!=null and houseParam.gridName!=''">
- and grid_name like concat('%',#{houseParam.gridName},'%')
- </if>
group by building_name
</select>
<!--查询商超详情集合-->
<select id="getPlaceRelDetailList" resultType="org.springblade.modules.doorplateAddress.vo.FuncNode">
select jp.id as addressCode,
+ jpl.grid_name as unitName,
+ jpl.community_code as unitCode,
doorplate_num as floor,
4 as addressType
from jczz_place_rel jpl
join jczz_place jp on jpl.place_id = jp.id and jp.is_deleted = 0
where jpl.is_deleted = 0
+ and doorplate_num!=''
<if test="houseParam.communityName!=null and houseParam.communityName!=''">
and community_name like concat('%',#{houseParam.communityName},'%')
- </if>
- <if test="houseParam.gridName!=null and houseParam.gridName!=''">
- and grid_name like concat('%',#{houseParam.gridName},'%')
</if>
<if test="houseParam.buildingName!=null and houseParam.buildingName!=''">
and building_name = #{houseParam.buildingName}
--
Gitblit v1.9.3