Jelajahi Sumber

返回图斑的合并图层展示

chenendian 2 hari lalu
induk
melakukan
b6e785b0ef

+ 4 - 3
siwei-modules/siwei-apply/src/main/resources/mapper/YdbpDataMapper.xml

@@ -140,11 +140,12 @@
                 ) AS zs_area,
                 ) AS zs_area,
 
 
         <if test="hasGeom != null and hasGeom">
         <if test="hasGeom != null and hasGeom">
-            (SELECT array_to_string(array_agg(ST_AsEWKT(gd.geom)), '|')
+            COALESCE((
+            SELECT ST_AsEWKT(ST_Union(gd.geom))
             FROM t_node_land nl
             FROM t_node_land nl
             LEFT JOIN t_geom_db_details gd ON nl.geom_db_id = gd.upload_id
             LEFT JOIN t_geom_db_details gd ON nl.geom_db_id = gd.upload_id
-            WHERE nl.node_id = bp.id
-            AND gd.geom IS NOT NULL) as geom,
+            WHERE nl.node_id = bp.id AND gd.geom IS NOT NULL
+            ), '') AS geom,
         </if>
         </if>
         -- left(pf_date,4) AS nf,
         -- left(pf_date,4) AS nf,
         '亩' as  zs_unit,
         '亩' as  zs_unit,

+ 4 - 3
siwei-modules/siwei-apply/src/main/resources/mapper/YdbpMapper.xml

@@ -72,11 +72,12 @@
             '亩' as yd_unit,
             '亩' as yd_unit,
             '亩' as zs_unit,
             '亩' as zs_unit,
             <if test="hasGeom != null and hasGeom">
             <if test="hasGeom != null and hasGeom">
-                (SELECT array_to_string(array_agg(ST_AsEWKT(gd.geom)), '|')
+                COALESCE((
+                SELECT ST_AsEWKT(ST_Union(gd.geom))
                 FROM t_node_land nl
                 FROM t_node_land nl
                 LEFT JOIN t_geom_db_details gd ON nl.geom_db_id = gd.upload_id
                 LEFT JOIN t_geom_db_details gd ON nl.geom_db_id = gd.upload_id
-                WHERE nl.node_id = bp.id
-                AND gd.geom IS NOT NULL) as geom,
+                WHERE nl.node_id = bp.id AND gd.geom IS NOT NULL
+                ), '') AS geom,
             </if>
             </if>
             COALESCE (
             COALESCE (
                     CASE
                     CASE