From d29863abcfc8166d3b0e2f82a6a6eea9e41b9fcc Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期五, 30 十二月 2022 09:55:10 +0800 Subject: [PATCH] 12.30.1 --- src/main/resources/mapper/show/PipelineMapper.xml | 9 +-------- 1 files changed, 1 insertions(+), 8 deletions(-) diff --git a/src/main/resources/mapper/show/PipelineMapper.xml b/src/main/resources/mapper/show/PipelineMapper.xml index 7f60dac..0332d3f 100644 --- a/src/main/resources/mapper/show/PipelineMapper.xml +++ b/src/main/resources/mapper/show/PipelineMapper.xml @@ -6,14 +6,7 @@ </select> <select id="selectPipeAnalysis" resultType="com.lf.server.entity.show.PipelineEntity"> - select a.name as acrossName, b.segname as segName, b.remarks, b.pipename as pipeName, - cast( st_length( st_geographyfromtext( st_astext( st_intersection(ST_MakeValid(a.geom), ST_MakeValid(b.geom) ) ) ) ) as decimal(12, 2) ) AS acrossLength - from ${tab} as a, (select segname, remarks, pipename, geom from bs.m_pipesegment where gid = #{gid} ) as b - where ST_Intersects(a.geom, b.geom) - </select> - - <select id="selectAnalysisResult" resultType="com.lf.server.entity.show.PipelineEntity"> - select a.name as acrossName, b.segname as segName, b.remarks, b.pipename as pipeName, + select row_number() over() as gid, a.name as acrossName, b.segname as segName, b.remarks, b.pipename as pipeName, cast( st_length( st_geographyfromtext( st_astext( st_intersection(ST_MakeValid(a.geom), ST_MakeValid(b.geom) ) ) ) ) as decimal(12, 2) ) AS acrossLength, st_astext( st_intersection( ST_MakeValid(a.geom), ST_MakeValid(b.geom) ) ) as wkt from ${tab} as a, (select segname, remarks, pipename, geom from bs.m_pipesegment where gid = #{gid} ) as b -- Gitblit v1.9.3