| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.lf.server.mapper.sys.ReportMapper"> |
| | | <mapper namespace="com.terra.system.mapper.sys.ReportMapper"> |
| | | <select id="selectCount" resultType="java.lang.Integer"> |
| | | select count(*) from lf.sys_report |
| | | <where> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectByPage" resultType="com.lf.server.entity.sys.ReportEntity"> |
| | | <select id="selectByPage" resultType="com.terra.system.entity.sys.ReportEntity"> |
| | | select a.*,fn_uname(a.create_user) createName,fn_uname(a.update_user) updateName from lf.sys_report a |
| | | <where> |
| | | <if test="name != null"> |
| | |
| | | limit #{limit} offset #{offset} |
| | | </select> |
| | | |
| | | <select id="selectAll" resultType="com.lf.server.entity.sys.ReportEntity"> |
| | | <select id="selectAll" resultType="com.terra.system.entity.sys.ReportEntity"> |
| | | select * from lf.sys_report order by id desc; |
| | | </select> |
| | | |
| | | <select id="selectById" resultType="com.lf.server.entity.sys.ReportEntity"> |
| | | <select id="selectById" resultType="com.terra.system.entity.sys.ReportEntity"> |
| | | select * from lf.sys_report where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.lf.server.entity.sys.ReportEntity"> |
| | | <insert id="insert" parameterType="com.terra.system.entity.sys.ReportEntity"> |
| | | insert into lf.sys_report |
| | | (name,type,fname,guid,code,create_user,create_time,bak) |
| | | values |
| | |
| | | </update> |
| | | |
| | | <!-- 数据量统计 --> |
| | | <select id="countSizes" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countSizes" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select fn_get_fullname(depcode, 1) "m1", cast(sum(sizes) as decimal(18, 3)) "sizes", count(*) "count" |
| | | from lf.sys_meta |
| | | group by depcode |
| | |
| | | </select> |
| | | |
| | | <!-- 按文件类型统计 --> |
| | | <select id="countSizesByType" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countSizesByType" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select type "m1", cast(sum(sizes) as decimal(18, 3)) "sizes", count(*) "count" |
| | | from lf.sys_meta |
| | | group by type |
| | |
| | | </select> |
| | | |
| | | <!-- 服务调用量统计 --> |
| | | <select id="countServices" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countServices" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select name "m1", count(*) "count" |
| | | from lf.sys_serve_log |
| | | group by name |
| | |
| | | </select> |
| | | |
| | | <!-- 用户流量统计 --> |
| | | <select id="countOperates" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countOperates" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select modular1 "m1", modular2 "m2", count(*) "count" |
| | | from lf.sys_operate |
| | | group by modular1,modular2 |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计数据 --> |
| | | <select id="countSizesByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countSizesByPrj" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select name "m1", |
| | | (select cast( coalesce(sum(sizes), 0) as decimal(18, 3) ) from lf.sys_meta b where b.dircode like a.code || '%') as "sizes", |
| | | (select count(*) from lf.sys_meta b where b.dircode like a.code || '%') "count" |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计钻孔数据 --> |
| | | <select id="countExplorationPoints" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countExplorationPoints" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select |
| | | name "m1", a.code "m3", 0.0 "area", |
| | | (select count(*) from bs.s_explorationpoint b where dirid like a.code || '%') "count", |
| | |
| | | </select> |
| | | |
| | | <!-- 根据项目编码查询钻孔数据坐标点 --> |
| | | <select id="selectExplorationPoints" resultType="com.lf.server.entity.ctrl.CoordinateEntity"> |
| | | <select id="selectExplorationPoints" resultType="com.terra.system.entity.ctrl.CoordinateEntity"> |
| | | select ST_X(geom) "x", ST_Y(geom) "y" |
| | | from bs.s_explorationpoint b |
| | | <where> |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计数字高程模型面积 --> |
| | | <select id="countDemAreaByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countDemAreaByPrj" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | 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 |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计三维地形模型面积:mpt --> |
| | | <select id="countMptAreaByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countMptAreaByPrj" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select name "m1", 0.0 "area" |
| | | from lf.sys_dir a |
| | | where pid = 0 |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计倾斜摄影模型面积:osgb --> |
| | | <select id="countOsgbAreaByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countOsgbAreaByPrj" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select name "m1", |
| | | (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" |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计激光点云模型面积:las,laz --> |
| | | <select id="countLasAreaByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countLasAreaByPrj" resultType="com.terra.system.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.dircode like a.code || '%') "area" |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计勘察工点个数 --> |
| | | <select id="countSurveyWorksiteByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countSurveyWorksiteByPrj" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select name "m1", |
| | | (select count(*) from bs.s_surveyworksite b where b.dirid like a.code || '%') "count" |
| | | from lf.sys_dir a |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计勘察报告个数 --> |
| | | <select id="countExplorationReportByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countExplorationReportByPrj" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select name "m1", |
| | | (select count(*) from bs.s_explorationpoint b |
| | | inner join lf.sys_attach c on b.eventid = c.tab_guid |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计崩塌个数 --> |
| | | <select id="countCollapseByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countCollapseByPrj" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select name "m1", |
| | | (select count(*) from bs.g_collapse b where b.dirid like a.code || '%') "count" |
| | | from lf.sys_dir a |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计泥石流个数 --> |
| | | <select id="countDebrisFlowByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countDebrisFlowByPrj" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select name "m1", |
| | | (select count(*) from bs.g_debrisflow b where b.dirid like a.code || '%') "count" |
| | | from lf.sys_dir a |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计地面塌陷个数 --> |
| | | <select id="countGroundCollapseByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countGroundCollapseByPrj" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select name "m1", |
| | | (select count(*) from bs.g_ground_collapse b where b.dirid like a.code || '%') "count" |
| | | from lf.sys_dir a |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计高陡边坡个数 --> |
| | | <select id="countHighSteepSlopeByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countHighSteepSlopeByPrj" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select name "m1", |
| | | (select count(*) from bs.g_highandsteep_slope b where b.dirid like a.code || '%') "count" |
| | | from lf.sys_dir a |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计滑坡个数 --> |
| | | <select id="countLandSlideByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countLandSlideByPrj" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select name "m1", |
| | | (select count(*) from bs.g_landslide b where b.dirid like a.code || '%') "count" |
| | | from lf.sys_dir a |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计不稳定斜坡个数 --> |
| | | <select id="countUnstableSlopeByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countUnstableSlopeByPrj" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select name "m1", |
| | | (select count(*) from bs.g_unstable_slope b where b.dirid like a.code || '%') "count" |
| | | from lf.sys_dir a |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计水毁个数 --> |
| | | <select id="countWaterDamageByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countWaterDamageByPrj" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select name "m1", |
| | | (select count(*) from bs.g_water_damage b where b.dirid like a.code || '%') "count" |
| | | from lf.sys_dir a |
| | |
| | | </select> |
| | | |
| | | <!-- 统计数字线划图面积 --> |
| | | <select id="countDlgAreaByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countDlgAreaByPrj" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select dir "m1", cast( coalesce(sum(area), 0) as decimal(20, 2) ) "area" |
| | | from lf.sys_line_buffer |
| | | group by code, dir |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计数字正射影像图面积 --> |
| | | <select id="countDomAreaByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countDomAreaByPrj" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | 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 |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计管线长度 --> |
| | | <select id="countLineLength" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countLineLength" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | 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 "len" |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计勘探点个数 --> |
| | | <select id="countExplorationPointByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countExplorationPointByPrj" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select name "m1", |
| | | (select count(*) from bs.s_explorationpoint b where b.dirid like a.code || '%') "count" |
| | | from lf.sys_dir a |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计三维地质模型面积 --> |
| | | <select id="countGeoModelAreaByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countGeoModelAreaByPrj" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select name "m1", |
| | | (select cast( coalesce(sum(b.area), 0) as decimal(20, 2) ) |
| | | from lf.sys_meta b where b.type in ('fbx', 'ifc') and b.dircode like a.code || '%') "area" |
| | |
| | | </select> |
| | | |
| | | <!-- 按项目统计地灾点个数 --> |
| | | <select id="countGeologicHazardByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countGeologicHazardByPrj" resultType="com.terra.system.entity.ctrl.CountEntity"> |
| | | select name "m1", |
| | | (select count(*) from bd.b_geologic_hazard b where b.dirid like a.code || '%') "count" |
| | | from lf.sys_dir a |
| | |
| | | </select> |
| | | |
| | | <!-- 项目数据分类统计 --> |
| | | <select id="countVariousDataByPrj" resultType="com.lf.server.entity.ctrl.CountEntity"> |
| | | <select id="countVariousDataByPrj" resultType="com.terra.system.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> |