zhongrj
2023-11-27 56bc68fc3f207a37ff170a503c6cf1f2f061abbe
src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.xml
@@ -106,7 +106,7 @@
        )
        union all
        (
        select '商超' as id,'商超' as name,4 as addressType from jczz_place_rel jpl
        select '企业商超' as id,'企业商超' as name,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
        <if test="houseParam.communityName!=null and houseParam.communityName!=''">
@@ -114,6 +114,9 @@
        </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}
        </if>
        limit 1
        )
@@ -411,4 +414,22 @@
        group by aoi_code
        )
    </select>
    <!--查询所有的地址表和场所表差集集合(小区和非小区的)-->
    <select id="getPlaceList" resultType="org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity">
        select jda.* from jczz_doorplate_address jda
        left join jczz_place jp on jp.house_code = jda.address_code and jp.is_deleted =0
        where 1=1
        and jp.house_code is null
        and (doorplate_type = '小门牌' or (doorplate_type = '中门牌' and address_level = 1))
        union all
        (
        select jda.* from jczz_doorplate_address jda
        left join jczz_place jp on jp.house_code = jda.address_code and jp.is_deleted =0
        where 1=1
        and jp.house_code is null
        and aoi_code is null
      and doorplate_type='中门牌'
        )
    </select>
</mapper>