霍林河露天煤矿生产一体化平台
1
13693261870
2023-04-11 5af8ff1fbdc7183bf611f1971edf1f6e8f68c961
1
已修改3个文件
20 ■■■■■ 文件已修改
src/main/java/com/terra/coal/controller/MainController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/terra/coal/mapper/MainMapper.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/terra/coal/controller/MainController.java
@@ -76,8 +76,8 @@
    @ApiOperation(value = "根据范围统计")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "z", value = "高度", dataType = "double", paramType = "query", example = "640"),
            @ApiImplicitParam(name = "deep", value = "深度", dataType = "double", paramType = "query", example = "50"),
            @ApiImplicitParam(name = "z", value = "高度", dataType = "double", paramType = "query", example = "750"),
            @ApiImplicitParam(name = "deep", value = "深度", dataType = "double", paramType = "query", example = "150"),
            @ApiImplicitParam(name = "wkt", value = "WKT文本", dataType = "String", paramType = "query", example = "POLYGON ((113.5807 45.4897,113.5898 45.4893,113.5857 45.4837,113.5807 45.4897))")
    })
    @GetMapping(value = "/countByRange")
@@ -93,7 +93,7 @@
                return fail("开挖深度过小", null);
            }
            List<CountEntity> rs = mainService.countByRange(z, z + deep, wkt);
            List<CountEntity> rs = mainService.countByRange(z, z - deep, wkt);
            return success("成功", null == rs ? 0 : rs.size(), rs);
        } catch (Exception ex) {
src/main/java/com/terra/coal/mapper/MainMapper.java
@@ -1,13 +1,11 @@
package com.terra.coal.mapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.terra.coal.entity.CountEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import java.math.BigDecimal;
import java.util.List;
/**
@@ -20,13 +18,13 @@
    /**
     * 根据范围统计
     *
     * @param top
     * @param bottom
     * @param wkt
     * @return
     * @param top    顶高
     * @param bottom 底高
     * @param wkt    WKT
     * @return CountEntity集合
     */
    @Select("select ctype, sum(volume) \"volume\", sum(coal_prod) \"coal_prod\", sum(gangue_prod) \"gangue_prod\", 0 \"soil_prod\" from public.coal2000 " +
            "where (top between #{top} and #{bottom} or bottom between #{top} and #{bottom}) and ST_Intersects(geom, ST_PolygonFromText(#{wkt}, 4490))" +
            "where (top between #{bottom} and #{top} or bottom between #{bottom} and #{top}) and ST_Intersects(geom, ST_PolygonFromText(#{wkt}, 4490)) " +
            "group by ctype order by ctype")
    public List<CountEntity> countByRange(@Param("top") Double top, @Param("bottom") Double bottom, @Param("wkt") String wkt);
}
src/main/resources/application.yml
@@ -15,7 +15,7 @@
    host: 127.0.0.1
    port: 6369
    password: rediS_5L#F4_Server
    timeout: 30000  # 连接超时时长(毫秒)
    timeout: 90000  # 连接超时时长(毫秒)
    pool:
      max-active: 1000  # 连接池最大连接数(使用负值表示没有限制)
      max-wait: -1      # 连接池最大阻塞等待时间(使用负值表示没有限制)