管道基础大数据平台系统开发-【后端】-Server
13693261870
2024-02-26 3b55584efb14459e4343972253080f90f9084154
src/main/resources/mapper/sys/ReportMapper.xml
@@ -118,4 +118,19 @@
        where pid = 0
        order by a.code;
    </select>
    <!-- 按项目统计钻孔数据 -->
    <select id="countExplorationPoints" resultType="com.lf.server.entity.ctrl.CountEntity">
        select
            name "m1",
            (select count(*) from bs.s_explorationpoint b where dirid like a.code || '%') "count",
            (select coalesce(round(sum(sizes)::numeric, 3), 0)
                from bs.s_explorationpoint b
                inner join lf.sys_meta c
                on b.parentid = c.eventid
                where b.dirid like a.code || '%') "sizes"
        from lf.sys_dir a
        where pid = 0
        order by code;
    </select>
</mapper>