| | |
| | | <if test="place.doorplateNum!=null and place.doorplateNum!=''"> |
| | | and jpr.doorplate_num = #{place.doorplateNum} |
| | | </if> |
| | | <if test="place.placeName!=null and place.placeName!=''"> |
| | | and jp.place_name = #{place.placeName} |
| | | </if> |
| | | limit 1 |
| | | </select> |
| | | |
| | |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="remark" column="remark" /> |
| | | <result property="isDeleted" column="is_deleted" /> |
| | | <result property="aoiCode" column="aoi_code" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectPlace"> |
| | |
| | | update_user, |
| | | update_time, |
| | | remark, |
| | | is_deleted |
| | | is_deleted, |
| | | |
| | | from |
| | | jczz_place |
| | | </sql> |
| | |
| | | <!--比对两点间的距离是否在1km 范围内(和地址总表位置对比)--> |
| | | <select id="comparisonPosition" resultType="java.lang.Integer"> |
| | | select count(1) from jczz_doorplate_address where 1=1 |
| | | and ( |
| | | and IFNULL(( |
| | | ACOS( |
| | | SIN( |
| | | ( #{place.y} * 3.1415 )/ 180 ) * SIN(( y * 3.1415 )/ 180 ) |
| | | + COS(( #{place.y} * 3.1415 )/ 180 ) * COS(( y * 3.1415 )/ 180 ) * COS(( #{place.x} * 3.1415 )/ 180 |
| | | - ( x * 3.1415 )/ 180 ))* 6370.996 |
| | | ) <= 1 |
| | | ),2) <= 1 |
| | | and address_code = #{place.houseCode} |
| | | </select> |
| | | |
| | |
| | | and source = 1 and house_code_binds is null |
| | | </select> |
| | | |
| | | <!--查询绑定的房屋--> |
| | | <select id="getHouseBindMap" resultType="java.util.Map"> |
| | | select address_code as addressCode,address_name addressName from jczz_doorplate_address |
| | | where |
| | | <choose> |
| | | <when test="houseCodeBinds!=null and houseCodeBinds!=''"> |
| | | address_code in |
| | | <foreach collection="houseCodeBinds.split(',')" item="houseCode" separator="," open="(" close=")"> |
| | | #{houseCode} |
| | | </foreach> |
| | | </when> |
| | | <otherwise> |
| | | address_code in ('') |
| | | </otherwise> |
| | | </choose> |
| | | </select> |
| | | |
| | | </mapper> |