管道基础大数据平台系统开发-【后端】-Server
13693261870
2024-03-01 3d4e14a8ee14658591fc9ea38ce8c9a789149fe4
解决空指针异常
已修改3个文件
12 ■■■■ 文件已修改
src/main/java/com/lf/server/controller/data/DataCountController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application.yml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/sys/ReportMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/lf/server/controller/data/DataCountController.java
@@ -148,7 +148,7 @@
    @SysLog()
    @ApiOperation(value = "下载报告")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "报告ID", dataType = "Integer", paramType = "7")
            @ApiImplicitParam(name = "id", value = "报告ID", dataType = "Integer", paramType = "query", example = "18")
    })
    @GetMapping(value = "/downloadReport")
    public void downloadReport(Integer id, HttpServletRequest req, HttpServletResponse res) {
src/main/resources/application.yml
@@ -46,11 +46,11 @@
    name: prod
    # JDBC 基本配置 &currentSchema=public
    #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
    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
    password: postgres
    password: Postgres!_14_Lf
    #password: postgres
    driver-class-name: org.postgresql.Driver
    platform: POSTGRESQL
    type: com.alibaba.druid.pool.DruidDataSource
src/main/resources/mapper/sys/ReportMapper.xml
@@ -122,7 +122,7 @@
    <!-- 按项目统计钻孔数据 -->
    <select id="countExplorationPoints" resultType="com.lf.server.entity.ctrl.CountEntity">
        select
            name "m1", a.code "m3",
            name "m1", a.code "m3", 0.0 "area",
            (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