From c4e2c196aad8af656d94bc47e9f1a80bc504b5d7 Mon Sep 17 00:00:00 2001
From: lin <sbla5888@163.com>
Date: Thu, 14 Mar 2024 18:15:29 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.xml | 110 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 105 insertions(+), 5 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 4208aa7..ec411a2 100644
--- a/src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.xml
+++ b/src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.xml
@@ -484,6 +484,10 @@
where 1=1
and jh.house_code is null
and doorplate_type = '户室牌'
+ <if test="townName!=null and townName!=''">
+ and jda.town_street_name like concat('%',#{townName},'%')
+ </if>
+ limit 0,1000
</select>
<!--查询商超-->
@@ -536,16 +540,18 @@
<!--查询所有的地址表id集合-->
<select id="getAoiCodeList" resultType="java.lang.Long">
select
- max(id)
+ min(id)
from jczz_doorplate_address
where aoi_code != "" and aoi_name !=""
+ and doorplate_type = '大门牌'
GROUP BY aoi_code
union all
(
select
- max(id)
+ min(id)
from jczz_doorplate_address
where aoi_code != "" and sub_aoi != ""
+ and doorplate_type = '大门牌'
group by aoi_code
)
</select>
@@ -566,14 +572,78 @@
<select id="getPlaceList" resultType="org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity">
select jda.*
from jczz_doorplate_address jda
+ left join jczz_grid_range jgr on jda.address_code = jgr.house_code
where 1=1
- and (doorplate_type = '小门牌' or (doorplate_type = '中门牌' and address_level = 1))
+-- and (doorplate_type = '小门牌' or (doorplate_type = '中门牌' and address_level = 1))
<if test="doorplateAddress.addressName!=null and doorplateAddress.addressName!=''">
- and address_name like concat('%',#{doorplateAddress.addressName},'%')
+ and jda.address_name like concat('%',#{doorplateAddress.addressName},'%')
</if>
<if test="doorplateAddress.poi!=null and doorplateAddress.poi!=''">
- and poi like concat('%',#{doorplateAddress.poi},'%')
+ and jda.poi like concat('%',#{doorplateAddress.poi},'%')
</if>
+ <if test="doorplateAddress.addressCode!=null and doorplateAddress.addressCode!=''">
+ and jda.address_code in
+ <foreach collection="addressCode.split(',')" item="addressCode" open="(" close=")" separator=",">
+ #{addressCode}
+ </foreach>
+ </if>
+ <if test="isAdministrator==2">
+ <choose>
+ <when test="doorplateAddress.roleName != null and doorplateAddress.roleName != ''">
+ <if test="doorplateAddress.roleName=='wgy'">
+ <choose>
+ <when test="gridCodeList !=null and gridCodeList.size()>0">
+ and jgr.grid_code in
+ <foreach collection="gridCodeList" item="code" open="(" close=")" separator=",">
+ #{code}
+ </foreach>
+ </when>
+ <otherwise>
+ and jgr.grid_code in ('')
+ </otherwise>
+ </choose>
+ </if>
+ <if test="doorplateAddress.roleName=='mj'">
+ <choose>
+ <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
+ and jda.nei_code in
+ <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
+ #{code}
+ </foreach>
+ </when>
+ <otherwise>
+ and jda.nei_code in ('')
+ </otherwise>
+ </choose>
+ </if>
+ </when>
+ <otherwise>
+ <choose>
+ <when test="regionChildCodesList !=null and regionChildCodesList.size()>0">
+ and
+ (
+ jgr.grid_code in
+ <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
+ #{code}
+ </foreach>
+ or
+ jda.nei_code in
+ <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=",">
+ #{code}
+ </foreach>
+ )
+ </when>
+ <otherwise>
+ and
+ (
+ jgr.grid_code in ('') or jda.nei_code in ('')
+ )
+ </otherwise>
+ </choose>
+ </otherwise>
+ </choose>
+ </if>
+ limit 0,#{size}
</select>
<!--查询地址表详情-->
@@ -596,4 +666,34 @@
jda.nei_name,
jda.town_street_code
</select>
+
+
+ <select id="getHouseBuildingCode"
+ resultType="org.springblade.modules.doorplateAddress.vo.DoorplateAddressVO">
+
+ SELECT DISTINCT
+ jda.building_code,
+ jda.building_name
+ FROM
+ jczz_doorplate_address jda
+ LEFT JOIN jczz_district jd ON jd.aoi_code = jda.aoi_code
+ WHERE
+ jd.id = #{districtId}
+ and jda.building_code is not null
+
+ </select>
+
+
+ <!--查询所有户室数据-->
+ <select id="getNotHouseListCount" resultType="java.lang.Integer">
+ select count(*) from jczz_doorplate_address jda
+ left join jczz_house jh on jh.house_code = jda.address_code
+ where 1=1
+ and jh.house_code is null
+ and doorplate_type = '户室牌'
+ <if test="townName!=null and townName!=''">
+ and jda.town_street_name like concat('%',#{townName},'%')
+ </if>
+ limit 0,1000
+ </select>
</mapper>
--
Gitblit v1.9.3