| | |
| | | |
| | | @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") |
| | |
| | | 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) { |
| | |
| | | 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; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 根据范围统计 |
| | | * |
| | | * @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); |
| | | } |
| | |
| | | host: 127.0.0.1 |
| | | port: 6369 |
| | | password: rediS_5L#F4_Server |
| | | timeout: 30000 # 连接超时时长(毫秒) |
| | | timeout: 90000 # 连接超时时长(毫秒) |
| | | pool: |
| | | max-active: 1000 # 连接池最大连接数(使用负值表示没有限制) |
| | | max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制) |