| | |
| | | * @return 管线实体类集合 |
| | | */ |
| | | public List<PipelineEntity> selectPipeAnalysis(String tab, Integer gid); |
| | | |
| | | /** |
| | | * 查询分析结果 |
| | | * |
| | | * @param tab 表名 |
| | | * @param gid ID |
| | | * @return 管线实体类集合 |
| | | */ |
| | | public List<PipelineEntity> selectAnalysisResult(String tab, Integer gid); |
| | | } |
| | |
| | | public List<PipelineEntity> selectPipeAnalysis(String tab, Integer gid) { |
| | | return pipelineMapper.selectPipeAnalysis(tab, gid); |
| | | } |
| | | |
| | | @Override |
| | | public List<PipelineEntity> selectAnalysisResult(String tab, Integer gid) { |
| | | return pipelineMapper.selectAnalysisResult(tab, gid); |
| | | } |
| | | } |
| | |
| | | |
| | | <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, |
| | | 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 |