| | |
| | | if (null == vo.getPid() || vo.getPid() < 0) { |
| | | vo.setPid(0); |
| | | } |
| | | if (StringHelper.isEmpty(vo.getName())) { |
| | | vo.setName(StringHelper.YMDHMS2_FORMAT.format(new Date())); |
| | | } |
| | | if (null == vo.getNum() || vo.getNum() < 1) { |
| | | vo.setNum(simuService.getMaxId() + 1); |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 使用空间范围查询 管点,管线,建筑物 3个图层,且每个图层的数量大于0,返回 true。 |
| | | */ |
| | | @ApiOperation(value = "降水范围校验") |
| | | @GetMapping("/rangeVerif") |
| | | public R<Object> rangeVerif(@RequestParam @ApiParam("最小X") Double minx, |
| | | @RequestParam @ApiParam("最小y") Double miny, |
| | | @RequestParam @ApiParam("最大X") Double maxx, |
| | | @RequestParam @ApiParam("最大y") Double maxy) { |
| | | @GetMapping("/rangeVerify") |
| | | public R<Object> rangeVerify(@RequestParam @ApiParam("最小X") double minx, |
| | | @RequestParam @ApiParam("最小y") double miny, |
| | | @RequestParam @ApiParam("最大X") double maxx, |
| | | @RequestParam @ApiParam("最大y") double maxy) { |
| | | try { |
| | | DataPo data = new DataPo(); |
| | | data.setMinx(minx); |
| | |
| | | data.setMaxx(maxx); |
| | | data.setMaxy(maxy); |
| | | data.setEpsg(4326); |
| | | |
| | | String token = gedbService.getToken(); |
| | | GeDb db = gedbService.connectGedb(token, data); |
| | | List<GeLayer> layers = gedbService.getLayers(token, db); |
| | | return success(gedbService.queryBboxCount(token,db, layers)); |
| | | |
| | | return success(gedbService.queryBboxCount(token, db, layers)); |
| | | } catch (Exception ex) { |
| | | return fail(ex, null); |
| | | return fail(ex, false); |
| | | } |
| | | } |
| | | } |