| | |
| | | select name "m1", |
| | | (select cast( coalesce(sum(b.area), 0) as decimal(20, 2) ) from lf.sys_meta b |
| | | inner join lf.sys_dir c on b.dircode = c.code |
| | | where c.name = '数字高程模型' and b.type in ('dem', 'tif', 'tiff') and b.depcode like a.code || '%') "area" |
| | | where c.name = '数字高程模型' and b.type in ('dem', 'tif', 'tiff') and b.dircode like a.code || '%') "area" |
| | | from lf.sys_dir a |
| | | where pid = 0 |
| | | order by code; |
| | |
| | | <!-- 按项目统计倾斜摄影模型面积:osgb --> |
| | | <select id="countOsgbAreaByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | select name "m1", |
| | | (select coalesce(sum(b.area), 0) from lf.sys_meta b |
| | | where b.type = 'osgb' and b.depcode like a.code || '%') "area" |
| | | (select cast( coalesce(sum(area), 0) as decimal(20, 2) ) from lf.sys_meta b |
| | | where b.type = 'osgb' and b.dircode like a.code || '%') "area" |
| | | from lf.sys_dir a |
| | | where pid = 0 |
| | | order by code; |
| | |
| | | <select id="countLasAreaByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | select name "m1", |
| | | (select cast( coalesce(sum(area), 0) as decimal(20, 2) ) from lf.sys_meta b |
| | | where b.type in ('las', 'laz') and b.depcode like a.code || '%') "area" |
| | | where b.type in ('las', 'laz') and b.dircode like a.code || '%') "area" |
| | | from lf.sys_dir a |
| | | where pid = 0 |
| | | order by code; |
| | |
| | | |
| | | <!-- 统计数字线划图面积 --> |
| | | <select id="countDlgAreaByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | select name "m1", area * 1000000 "area" from lf.sys_line_buffer; |
| | | select dir "m1", cast( coalesce(sum(area), 0) as decimal(20, 2) ) "area" |
| | | from lf.sys_line_buffer |
| | | group by code, dir |
| | | order by code; |
| | | </select> |
| | | |
| | | <!-- 按项目统计数字正射影像图面积 --> |
| | |
| | | select name "m1", |
| | | (select cast( coalesce(sum(b.area), 0) as decimal(20, 2) ) from lf.sys_meta b |
| | | inner join lf.sys_dir c on b.dircode = c.code |
| | | where c.name = '数字正射影像图' and b.type in ('img', 'tif', 'tiff') and b.depcode like a.code || '%') "area" |
| | | where c.name = '数字正射影像图' and b.type in ('img', 'tif', 'tiff') and b.dircode like a.code || '%') "area" |
| | | from lf.sys_dir a |
| | | where pid = 0 |
| | | order by code; |
| | | </select> |
| | | |
| | | <!-- 统计管线长度 --> |
| | | <!-- 按项目统计管线长度 --> |
| | | <select id="countLineLength" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | select name "m1", code, |
| | | select name "m1", |
| | | (select cast( coalesce(sum( ST_Length( ST_GeographyFromText( ST_AsText(geom) ) ) ) / 1000, 0) as decimal(20, 2) ) |
| | | from bs.m_pipeline b where b.dirid like a.code || '%') as "sizes" |
| | | from bs.m_pipeline b where b.dirid like a.code || '%') as "len" |
| | | from lf.sys_dir a |
| | | where pid = 0 |
| | | order by a.code; |
| | |
| | | order by code; |
| | | </select> |
| | | |
| | | <!-- 按项目统计地质模型面积 --> |
| | | <!-- 按项目统计三维地质模型面积 --> |
| | | <select id="countGeoModelAreaByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | select name "m1", |
| | | (select cast( coalesce(sum(b.area), 0) as decimal(20, 2) ) |
| | | from lf.sys_meta b where b.dircode like a.code || '%') "area" |
| | | from lf.sys_meta b where b.type in ('fbx', 'ifc') and b.dircode like a.code || '%') "area" |
| | | from lf.sys_dir a |
| | | where pid = 0 |
| | | order by code; |
| | |
| | | where pid = 0 |
| | | order by code; |
| | | </select> |
| | | |
| | | <!-- 项目数据分类统计 --> |
| | | <select id="countVariousDataByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | (select '数字线划图' "m1", 'area' "m2", 0 "count", cast( coalesce(sum(area), 0) as decimal(20, 2) ) "area", 0 "len" |
| | | from lf.sys_line_buffer |
| | | <where> |
| | | <if test="null != code"> |
| | | code like #{code} |
| | | </if> |
| | | </where> |
| | | ) |
| | | union all |
| | | (select '数字高程模型' "m1", 'area' "m2", 0 "count", cast( coalesce(sum(b.area), 0) as decimal(20, 2) ) "area", 0 "len" |
| | | from lf.sys_meta b inner join lf.sys_dir c on b.dircode = c.code |
| | | <where> |
| | | c.name = '数字高程模型' and b.type in ('dem', 'tif', 'tiff') |
| | | <if test="null != code"> |
| | | and b.dircode like #{code} |
| | | </if> |
| | | </where> |
| | | ) |
| | | union all |
| | | (select '数字正射影像图' "m1", 'area' "m2", 0 "count", cast( coalesce(sum(b.area), 0) as decimal(20, 2) ) "area", 0 "len" |
| | | from lf.sys_meta b inner join lf.sys_dir c on b.dircode = c.code |
| | | <where> |
| | | c.name = '数字正射影像图' and b.type in ('img', 'tif', 'tiff') |
| | | <if test="null != code"> |
| | | and b.dircode like #{code} |
| | | </if> |
| | | </where> |
| | | ) |
| | | union all |
| | | (select '倾斜摄影模型' "m1", 'area' "m2", 0 "count", cast( coalesce(sum(b.area), 0) as decimal(20, 2) ) "area", 0 "len" |
| | | from lf.sys_meta b |
| | | <where> |
| | | b.type = 'osgb' |
| | | <if test="null != code"> |
| | | and b.dircode like #{code} |
| | | </if> |
| | | </where> |
| | | ) |
| | | union all |
| | | (select '激光点云模型' "m1", 'area' "m2", 0 "count", cast( coalesce(sum(b.area), 0) as decimal(20, 2) ) "area", 0 "len" |
| | | from lf.sys_meta b |
| | | <where> |
| | | b.type in ('las', 'laz') |
| | | <if test="null != code"> |
| | | and b.dircode like #{code} |
| | | </if> |
| | | </where> |
| | | ) |
| | | union all |
| | | (select '管线长度' "m1", 'len' "m2", 0 "count", 0 "area", |
| | | cast( coalesce(sum( ST_Length( ST_GeographyFromText( ST_AsText(geom) ) ) ) / 1000, 0) as decimal(20, 2) ) "len" |
| | | from bs.m_pipeline b |
| | | <where> |
| | | <if test="null != code"> |
| | | b.dirid like #{code} |
| | | </if> |
| | | </where> |
| | | ) |
| | | union all |
| | | (select '勘探点' "m1", 'count' "m2", count(*), 0 "area", 0 "len" from bs.s_explorationpoint b |
| | | <where> |
| | | <if test="null != code"> |
| | | b.dirid like #{code} |
| | | </if> |
| | | </where> |
| | | ) |
| | | union all |
| | | (select '勘察工点' "m1", 'count' "m2", count(*), 0 "area", 0 "len" from bs.s_surveyworksite b |
| | | <where> |
| | | <if test="null != code"> |
| | | b.dirid like #{code} |
| | | </if> |
| | | </where> |
| | | ) |
| | | union all |
| | | (select '勘察报告' "m1", 'count' "m2", count(*), 0 "area", 0 "len" from bs.s_explorationpoint b |
| | | inner join lf.sys_attach c on b.eventid = c.tab_guid |
| | | <where> |
| | | <if test="null != code"> |
| | | b.dirid like #{code} |
| | | </if> |
| | | </where> |
| | | ) |
| | | union all |
| | | (select '三维地质模型' "m1", 'area' "m2", 0 "count", cast( coalesce(sum(b.area), 0) as decimal(20, 2) ) "area", 0 "len" from lf.sys_meta b |
| | | <where> |
| | | b.type in ('fbx', 'ifc') |
| | | <if test="null != code"> |
| | | and b.dircode like #{code} |
| | | </if> |
| | | </where> |
| | | ) |
| | | union all |
| | | (select '地灾点' "m1", 'count' "m2", count(*), 0 "area", 0 "len" from bd.b_geologic_hazard b |
| | | <where> |
| | | <if test="null != code"> |
| | | b.dirid like #{code} |
| | | </if> |
| | | </where> |
| | | ) |
| | | union all |
| | | (select '崩塌' "m1", 'count' "m2", count(*), 0 "area", 0 "len" from bs.g_collapse b |
| | | <where> |
| | | <if test="null != code"> |
| | | b.dirid like #{code} |
| | | </if> |
| | | </where> |
| | | ) |
| | | union all |
| | | (select '泥石流' "m1", 'count' "m2", count(*), 0 "area", 0 "len" from bs.g_debrisflow b |
| | | <where> |
| | | <if test="null != code"> |
| | | b.dirid like #{code} |
| | | </if> |
| | | </where> |
| | | ) |
| | | union all |
| | | (select '地面塌陷' "m1", 'count' "m2", count(*), 0 "area", 0 "len" from bs.g_ground_collapse b |
| | | <where> |
| | | <if test="null != code"> |
| | | b.dirid like #{code} |
| | | </if> |
| | | </where> |
| | | ) |
| | | union all |
| | | (select '高陡边坡' "m1", 'count' "m2", count(*), 0 "area", 0 "len" from bs.g_highandsteep_slope b |
| | | <where> |
| | | <if test="null != code"> |
| | | b.dirid like #{code} |
| | | </if> |
| | | </where> |
| | | ) |
| | | union all |
| | | (select '滑坡' "m1", 'count' "m2", count(*), 0 "area", 0 "len" from bs.g_landslide b |
| | | <where> |
| | | <if test="null != code"> |
| | | b.dirid like #{code} |
| | | </if> |
| | | </where> |
| | | ) |
| | | union all |
| | | (select '不稳定斜坡' "m1", 'count' "m2", count(*), 0 "area", 0 "len" from bs.g_unstable_slope b |
| | | <where> |
| | | <if test="null != code"> |
| | | b.dirid like #{code} |
| | | </if> |
| | | </where> |
| | | ) |
| | | union all |
| | | (select '水毁' "m1", 'count' "m2", count(*), 0 "area", 0 "len" from bs.g_water_damage b |
| | | <where> |
| | | <if test="null != code"> |
| | | b.dirid like #{code} |
| | | </if> |
| | | </where> |
| | | ); |
| | | </select> |
| | | </mapper> |