|
@@ -3,13 +3,17 @@
|
|
|
<mapper namespace="com.zjugis.yzt.dao.DataCenterMapper">
|
|
|
|
|
|
<select id="getGddkList" parameterType="Map" resultType="Map">
|
|
|
- with tx as (
|
|
|
- select t.*,st_area(shape) area
|
|
|
+ select tx.*
|
|
|
+ <if test="map.wkt!=null and map.wkt!=''">
|
|
|
+ ,st_area(st_geometry(intersect_area::varchar,4528)) as xjmj
|
|
|
+ </if>
|
|
|
+ from(
|
|
|
+ select t.*,st_area(shape) as area
|
|
|
<if test="map.wkt!=null and map.wkt!=''">
|
|
|
,st_astext(st_intersection(st_geometry(st_astext(shape)::varchar, 4528),st_geometry(#{map.wkt}, 4528)))::varchar
|
|
|
- intersect_area
|
|
|
+ as intersect_area
|
|
|
</if>
|
|
|
- from ${map.tableName} t
|
|
|
+ from ${map.tableName} as t
|
|
|
<where>
|
|
|
<if test="map.fieldName!=null and map.fieldName!=''">
|
|
|
<choose>
|
|
@@ -22,13 +26,10 @@
|
|
|
</choose>
|
|
|
</if>
|
|
|
<if test="map.wkt!=null and map.wkt!=''">
|
|
|
- st_intersects (shape,st_geometry(#{map.wkt}, 4528 )) is true
|
|
|
+ st_intersects(shape,st_geometry(#{map.wkt}, 4528 ))
|
|
|
</if>
|
|
|
</where>
|
|
|
- )
|
|
|
- select tx.*,
|
|
|
- st_area(st_geometry(intersect_area::varchar,4528)) xjmj
|
|
|
- from tx
|
|
|
+ ) as tx
|
|
|
</select>
|
|
|
<select id="getGddkListMj" parameterType="Map" resultType="Map">
|
|
|
with tx as (
|