|
@@ -1,29 +1,12 @@
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.onemap.apply.mapper.tdgy.LandIdleConfirmMapper">
|
|
|
-
|
|
|
-<!-- <select id="getIdleLandList" resultType="Map">-->
|
|
|
-<!-- SELECT td.id,td.srf,td.crmj,td.cqzh ,public.st_asewkt(public.st_union(tb.geom))-->
|
|
|
-<!-- from base.t_land_idle_confirm as confirm,vector.tdgy_sj as td,vector."TB_TDGY_SJ" as tb-->
|
|
|
-<!-- WHERE confirm.land_id=td.id::VARCHAR and tb.pid=td.id and is_idle=#{isConfirm}-->
|
|
|
-<!-- <if test="key != null and key != ''">-->
|
|
|
-<!-- and (td.srf like '%'||#{key}||'%' or td.cqzh like '%'||#{key}||'%')-->
|
|
|
-<!-- </if>-->
|
|
|
-<!-- <if test="xzqh != null and xzqh != ''">-->
|
|
|
-<!-- and td.xzqh = #{xzqh}-->
|
|
|
-<!-- </if>-->
|
|
|
-<!-- <if test="idleReason != null and idleReason != ''">-->
|
|
|
-<!-- and confirm.idle_reason = #{idleReason}-->
|
|
|
-<!-- </if>-->
|
|
|
-<!-- GROUP BY td.id,td.srf,td.crmj,td.cqzh-->
|
|
|
-<!-- </select>-->
|
|
|
-
|
|
|
<select id="getIdleLandList" resultType="Map">
|
|
|
SELECT td.id, td.srf, td.crmj, td.cqzh, public.st_asewkt(public.st_union(tb.geom))
|
|
|
FROM base.t_land_idle_confirm AS confirm
|
|
|
JOIN vector.tdgy_sj AS td ON confirm.land_id = td.id::VARCHAR
|
|
|
JOIN vector."TB_TDGY_SJ" AS tb ON tb.pid = td.id
|
|
|
- WHERE confirm.is_idle = #{isConfirm}
|
|
|
+ WHERE confirm.is_idle = #{isConfirm} AND confirm.is_disposal = #{isDisposal}
|
|
|
<if test="key != null and key != ''">
|
|
|
AND (td.srf LIKE '%' || #{key} || '%' OR td.cqzh LIKE '%' || #{key} || '%')
|
|
|
</if>
|
|
@@ -41,7 +24,7 @@
|
|
|
SELECT COUNT(td.id)
|
|
|
FROM base.t_land_idle_confirm AS confirm
|
|
|
JOIN vector.tdgy_sj AS td ON confirm.land_id = td.id::VARCHAR
|
|
|
- WHERE confirm.is_idle = #{isConfirm}
|
|
|
+ WHERE confirm.is_idle = #{isConfirm} AND confirm.is_disposal = #{isDisposal}
|
|
|
<if test="key != null and key != ''">
|
|
|
AND (td.srf LIKE '%' || #{key} || '%' OR td.cqzh LIKE '%' || #{key} || '%')
|
|
|
</if>
|
|
@@ -52,11 +35,4 @@
|
|
|
AND confirm.idle_reason = #{idleReason}
|
|
|
</if>
|
|
|
</select>
|
|
|
-
|
|
|
- <!-- <select id="getLandGeometry" resultType="String">-->
|
|
|
- <!-- public.st_asewkt(public.st_union(geom))-->
|
|
|
- <!-- from "TB_TDGY_SJ"-->
|
|
|
- <!-- WHERE pid=-->
|
|
|
- <!-- #{pid};-->
|
|
|
- <!-- </select>-->
|
|
|
</mapper>
|