| | |
| | | <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)) |
| | | <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="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> |
| | | |
| | | <!--查询地址表详情--> |