管道基础大数据平台系统开发-【后端】-Server
13693261870
2024-03-12 c0ffe9147554b1e3e4d5459b1cc530d09b55b165
src/main/resources/mapper/show/OneMapMapper.xml
@@ -257,7 +257,7 @@
    <select id="countProjectType" resultType="java.util.Map">
        SELECT a.type,
               count(a.type) AS number,
               sum(a.sizes) AS capacity
               coalesce( cast(sum(a.sizes) as decimal(12, 2) ), 0)  AS capacity
        FROM lf.sys_meta a
                 INNER JOIN lf.sys_dir b ON a.dircode = b.code
        WHERE a.dircode LIKE '${projectCode}%'
@@ -305,7 +305,7 @@
        select '勘察(EGE)' "m1", '三维地质模型' "m2", '平方米' "m3", (
         select coalesce(sum(b.area), 0) from lf.sys_meta b
          inner join lf.sys_dir c on b.dircode = c.code
          where b.type in ('fbx', 'ifc', 'rvt') ) "sizes"
          where b.type in ('fbx', 'ifc') ) "sizes"
        union all
        select '地灾(EGD)' "m1", '地灾点' "m2", '个' "m3", count(*) "sizes" from bd.b_geologic_hazard;
    </select>
@@ -314,4 +314,23 @@
    <select id="selectLineBuffer" resultType="java.lang.Integer">
        select fn_line_buffer();
    </select>
    <!-- 根据类型查询元数据(用于计算面积) -->
    <select id="selectMetaByType" resultType="com.lf.server.entity.ctrl.IdNameEntity">
        (select a.id, 'DOM' name from lf.sys_meta a
            inner join lf.sys_dir b on a.dircode = b.code
            where a.area is null and a.type in ('img', 'tif', 'tiff') and b.name = '数字正射影像图')
        union all
        (select a.id, 'DEM' name from lf.sys_meta a
            inner join lf.sys_dir b on a.dircode = b.code
            where a.area is null and a.type in ('dem', 'tif', 'tiff') and b.name = '数字高程模型')
        union all
        (select id, 'OSGB' name from lf.sys_meta where area is null and type = 'osgb')
        union all
        (select id, 'LAS' name from lf.sys_meta where area is null and type = 'las' or type = 'laz')
        union all
        (select id, 'IFC' name from lf.sys_meta where area is null and type = 'ifc')
        union all
        (select id, 'FBX' name from lf.sys_meta where area is null and type = 'fbx')
    </select>
</mapper>