| | |
| | | </select> |
| | | |
| | | <!-- 统计全国管网图输送介质长度 --> |
| | | <select id="countZhPipeMapLenByMed" resultType="java.util.Map"> |
| | | <!--select id="countZhPipeMapLenByMed" resultType="java.util.Map"> |
| | | SELECT medium AS type,count(*) AS count,sum(length)AS length FROM bs.m_pipesegment GROUP BY medium ; |
| | | </select--> |
| | | <select id="countZhPipeMapLenByMed" resultType="java.util.Map"> |
| | | select case medium when 'CO' then '原油' when 'RP' then '成品油' when 'GS' then '天然气' else '其它' end "type", |
| | | count(*) "count", round(sum(ST_Length(geom)::numeric), 2) "length" |
| | | from bs.m_pipeline |
| | | group by medium; |
| | | </select> |
| | | |
| | | <!-- 统计全国站场座数、阀室、管道数等 --> |
| | | <!-- 统计全国站场座数、阀室、管道数量 --> |
| | | <select id="countZhPipeStations" resultType="java.util.Map"> |
| | | select |
| | | case medium when 'CPY' then '成品油' when 'TRQ' then '天然气' when 'YY' then '原油' else '其它' end "输送介质", |
| | | case medium when 'CO' then '原油' when 'RP' then '成品油' when 'GS' then '天然气' else '其它' end "输送介质", |
| | | round(sum(st_length(geom))::numeric, 2) "总里程", |
| | | count(*) "管道数量", |
| | | (select count(*) from bs.m_sitepoint b inner join bs.m_pipeline c on b.pipename = c.pipename where c.medium = a.medium) "站场数量", |