管道基础大数据平台系统开发-【后端】-Server
13693261870
2024-02-26 3b55584efb14459e4343972253080f90f9084154
按项目统计钻孔数据
已修改5个文件
46 ■■■■■ 文件已修改
src/main/java/com/lf/server/controller/data/DataCountController.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/lf/server/mapper/sys/ReportMapper.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/lf/server/service/sys/ReportService.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application.yml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/sys/ReportMapper.xml 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/lf/server/controller/data/DataCountController.java
@@ -133,6 +133,19 @@
    }
    @SysLog()
    @ApiOperation(value = "按项目统计钻孔数据")
    @GetMapping(value = "/countExplorationPoints")
    public ResponseMsg<Object> countExplorationPoints() {
        try {
            List<CountEntity> list = reportService.countExplorationPoints();
            return success(list);
        } catch (Exception ex) {
            return fail(ex, null);
        }
    }
    @SysLog()
    @ApiOperation(value = "下载报告")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "报告ID", dataType = "Integer", paramType = "7")
src/main/java/com/lf/server/mapper/sys/ReportMapper.java
@@ -131,4 +131,11 @@
     * @return
     */
    public List<CountEntity> countSizesByPrj();
    /**
     * 按项目统计钻孔数据
     *
     * @return
     */
    public List<CountEntity> countExplorationPoints();
}
src/main/java/com/lf/server/service/sys/ReportService.java
@@ -113,6 +113,11 @@
        return reportMapper.countSizesByPrj();
    }
    @Override
    public List<CountEntity> countExplorationPoints() {
        return reportMapper.countExplorationPoints();
    }
    /**
     * 创建报告
     */
src/main/resources/application.yml
@@ -45,8 +45,8 @@
  datasource:
    name: prod
    # JDBC 基本配置 &currentSchema=public
    #url: jdbc:postgresql://106.120.22.35:5433/langfang?useAffectedRows=true
    url: jdbc:postgresql://192.168.20.205:5433/langfang?useAffectedRows=true
    #url: jdbc:postgresql://103.135.160.14:5433/langfang?useAffectedRows=true
    url: jdbc:postgresql://192.168.11.205:5433/langfang?useAffectedRows=true
    #url: jdbc:postgresql://127.0.0.1:5433/langfang?useAffectedRows=true
    username: postgres
    password: Postgres!_14_Lf
@@ -134,7 +134,7 @@
  iisHost: 127.0.0.1
  # FME服务地址
  #fmeUrl: http://106.120.22.35:8051/
  fmeUrl: http://192.168.20.205:88/
  fmeUrl: http://192.168.11.205:88/
  # 出图服务
  exportServer: http://127.0.0.1/ExportMap
  #exportServer: http://103.85.165.99:8050/ExportMap
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>