|
@@ -16,18 +16,31 @@
|
|
</otherwise>
|
|
</otherwise>
|
|
</choose>
|
|
</choose>
|
|
</foreach>
|
|
</foreach>
|
|
- <choose>
|
|
|
|
- <when test="siweiArea == true">
|
|
|
|
- , public.st_area(geom::public.geography) AS siweiArea
|
|
|
|
- </when>
|
|
|
|
- </choose>
|
|
|
|
|
|
+ <if test="siweiArea == true">
|
|
|
|
+ , public.st_area(
|
|
|
|
+ <choose>
|
|
|
|
+ <when test="srid!=null">
|
|
|
|
+ st_taransform(geom,srid)
|
|
|
|
+ </when>
|
|
|
|
+ <otherwise>
|
|
|
|
+ geom
|
|
|
|
+ </otherwise>
|
|
|
|
+ </choose>
|
|
|
|
+ <if test="isGeography==true">
|
|
|
|
+ ::public.geography
|
|
|
|
+ </if>
|
|
|
|
+ ) AS siweiArea
|
|
|
|
+ </if>
|
|
FROM
|
|
FROM
|
|
"${rawTableName}"
|
|
"${rawTableName}"
|
|
- WHERE
|
|
|
|
- id IN
|
|
|
|
- <foreach item="id" collection="ids" open="(" separator="," close=")">
|
|
|
|
- #{id}
|
|
|
|
- </foreach>
|
|
|
|
|
|
+
|
|
|
|
+ <if test="ids != null and ids.size()>0 ">
|
|
|
|
+ WHERE
|
|
|
|
+ (id::varchar) IN
|
|
|
|
+ <foreach item="id" collection="ids" open="(" separator="," close=")">
|
|
|
|
+ #{id}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="getTargetTable" resultType="Map">
|
|
<select id="getTargetTable" resultType="Map">
|
|
@@ -46,18 +59,33 @@
|
|
</if>
|
|
</if>
|
|
public.st_asewkt(b.geom) AS geom
|
|
public.st_asewkt(b.geom) AS geom
|
|
<if test="siweiArea == true">
|
|
<if test="siweiArea == true">
|
|
- , public.st_area(b.geom::public.geography) AS siweiArea
|
|
|
|
|
|
+ , public.st_area(
|
|
|
|
+ <choose>
|
|
|
|
+ <when test="srid!=null">
|
|
|
|
+ st_taransform(b.geom,srid)
|
|
|
|
+ </when>
|
|
|
|
+ <otherwise>
|
|
|
|
+ b.geom
|
|
|
|
+ </otherwise>
|
|
|
|
+ </choose>
|
|
|
|
+ <if test="isGeography==true">
|
|
|
|
+ ::public.geography
|
|
|
|
+ </if>
|
|
|
|
+ ) AS siweiArea
|
|
</if>
|
|
</if>
|
|
FROM
|
|
FROM
|
|
- "${rawTableName}" a
|
|
|
|
- JOIN
|
|
|
|
"${targetTableName}" b
|
|
"${targetTableName}" b
|
|
|
|
+ JOIN
|
|
|
|
+ "${rawTableName}" a
|
|
ON a.id = b.id
|
|
ON a.id = b.id
|
|
- WHERE
|
|
|
|
- a.id IN
|
|
|
|
- <foreach item="id" collection="ids" open="(" separator="," close=")">
|
|
|
|
- #{id}
|
|
|
|
- </foreach>
|
|
|
|
|
|
+
|
|
|
|
+ <if test="ids != null and ids.size()>0 ">
|
|
|
|
+ WHERE
|
|
|
|
+ a.id::VARCHAR IN
|
|
|
|
+ <foreach item="id" collection="ids" open="(" separator="," close=")">
|
|
|
|
+ #{id}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
</mapper>
|
|
</mapper>
|