| | |
| | | select * from lf.sys_user |
| | | select * from lf.sys_menu where cn_name='数据管理' |
| | | |
| | | delete from lf.sys_meta |
| | | select * from lf.sys_meta |
| | | select * from lf.sys_fme_log |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | select '国' "key", cname "value" from bs.th_globe_country where ST_Intersects(ST_PointFromText('POINT(114.178955 38.991743)', 4490), geom) |
| | | union all |
| | | select '省' "key", cname "value" from bs.th_province_area where ST_Intersects(ST_PointFromText('POINT(114.178955 38.991743)', 4490), geom) |
| | | union all |
| | | select '市' "key", cname "value" from bs.th_district_area where ST_Intersects(ST_PointFromText('POINT(114.178955 38.991743)', 4490), geom) |
| | | union all |
| | | select '县' "key", cname "value" from bs.th_county_area where ST_Intersects(ST_PointFromText('POINT(114.178955 38.991743)', 4490), geom); |
| | | |
| | | |
| | | |
| | |
| | | import com.lf.server.controller.all.BaseController; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.bs.BsprojectEntity; |
| | | import com.lf.server.entity.ctrl.KeyValueEntity; |
| | | import com.lf.server.entity.data.DictEntity; |
| | | import com.lf.server.entity.data.DirEntity; |
| | | import com.lf.server.entity.sys.DepEntity; |
| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "查询位置") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "x", value = "X", dataType = "Double", paramType = "query", example = "114.178955"), |
| | | @ApiImplicitParam(name = "y", value = "Y", dataType = "Double", paramType = "query", example = "38.991743") |
| | | }) |
| | | @GetMapping(value = "/selectLocation") |
| | | public ResponseMsg<Object> selectLocation(double x, double y) { |
| | | try { |
| | | String wkt = String.format("POINT(%f %f)", x, y); |
| | | List<KeyValueEntity> list = baseQueryService.selectLocation(wkt); |
| | | |
| | | return success(list); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "删除一条") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "gid", value = "ID", dataType = "int", paramType = "query", example = "1") |
| | |
| | | package com.lf.server.mapper.all; |
| | | |
| | | import com.lf.server.entity.ctrl.IdNameEntity; |
| | | import com.lf.server.entity.ctrl.KeyValueEntity; |
| | | import com.lf.server.entity.ctrl.TabEntity; |
| | | import com.lf.server.entity.data.DictEntity; |
| | | import com.lf.server.entity.data.DomainEntity; |
| | |
| | | * @return 多线 |
| | | */ |
| | | public String selectRoute(double x1, double y1, double x2, double y2); |
| | | |
| | | /** |
| | | * 查询位置 |
| | | * |
| | | * @param wkt WKT字符串 |
| | | * @return 位置 |
| | | */ |
| | | public List<KeyValueEntity> selectLocation(String wkt); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.lf.server.entity.all.RedisCacheKey; |
| | | import com.lf.server.entity.ctrl.IdNameEntity; |
| | | import com.lf.server.entity.ctrl.KeyValueEntity; |
| | | import com.lf.server.entity.ctrl.TabEntity; |
| | | import com.lf.server.entity.data.DictEntity; |
| | | import com.lf.server.entity.data.DomainEntity; |
| | |
| | | public String selectRoute(double x1, double y1, double x2, double y2) { |
| | | return baseQueryMapper.selectRoute(x1, y1, x2, y2); |
| | | } |
| | | |
| | | @Override |
| | | public List<KeyValueEntity> selectLocation(String wkt) { |
| | | return baseQueryMapper.selectLocation(wkt); |
| | | } |
| | | } |
| | |
| | | <select id="selectRoute" resultType="java.lang.String"> |
| | | select ST_astext(ST_Union(geom)) as route from pgr_fromAtoB('lrdl'::text, #{x1}, #{y1}, #{x2}, #{y2}); |
| | | </select> |
| | | |
| | | <select id="selectLocation" resultType="com.lf.server.entity.ctrl.KeyValueEntity"> |
| | | select '国' "key", cname "value" from bs.th_globe_country where ST_Intersects(ST_PointFromText(#{wkt}, 4490), geom) |
| | | union all |
| | | select '省' "key", cname "value" from bs.th_province_area where ST_Intersects(ST_PointFromText(#{wkt}, 4490), geom) |
| | | union all |
| | | select '市' "key", cname "value" from bs.th_district_area where ST_Intersects(ST_PointFromText(#{wkt}, 4490), geom) |
| | | union all |
| | | select '县' "key", cname "value" from bs.th_county_area where ST_Intersects(ST_PointFromText(#{wkt}, 4490), geom); |
| | | </select> |
| | | </mapper> |