Commit c1ff536734b0d065830d48aeb9a1d7db27c38d04

Authored by yiming
1 parent dd588add

bf2

bsthLineProfiles/src/main/java/com/ruoyi/project/system/line/controller/BsthTLineController.java
1 1 package com.ruoyi.project.system.line.controller;
2 2  
  3 +import cn.hutool.http.HttpUtil;
  4 +import com.alibaba.fastjson.JSONArray;
  5 +import com.alibaba.fastjson.JSONObject;
3 6 import com.ruoyi.common.utils.poi.ExcelUtil;
4 7 import com.ruoyi.common.utils.security.ShiroUtils;
5 8 import com.ruoyi.framework.aspectj.lang.annotation.Log;
... ... @@ -310,5 +313,14 @@ public class BsthTLineController extends BaseController
310 313 return bsthTLineKFKS;
311 314 }
312 315  
  316 + @GetMapping("/getStation")
  317 + @ResponseBody
  318 + public JSONObject getStation(String lng,String lat,String dis)
  319 + {
  320 + String url="https://180.167.126.126:18991/prod-api/service/interfact/getStation?lng="+lng+"&lat="+lat+"&dis="+dis;
  321 + String s=HttpUtil.get(url);
  322 + System.out.println(s);
  323 + return JSONObject.parseObject(s);
  324 + }
313 325  
314 326 }
... ...
bsthLineProfiles/src/main/resources/templates/system/line/map.html
... ... @@ -209,6 +209,9 @@ body, html, #container {
209 209 //地点查询
210 210 function searchStation(){
211 211 var distance=$("#distance").val();
  212 + if(distance==''){
  213 + return;
  214 + }
212 215 map.clearOverlays();
213 216 map.centerAndZoom(sp, 18);
214 217 var marker = new BMapGL.Marker(sp);
... ... @@ -244,7 +247,7 @@ body, html, #container {
244 247  
245 248 //站点标注
246 249 function a(lng,lat,distance){
247   - $.get("https://180.167.126.126:18991/prod-api/service/interfact/getStation?lng="
  250 + $.get("../line/getStation?lng="
248 251 +lng + "&lat=" + lat + "&dis="
249 252 + distance / 1000, function(data) {
250 253 if (data.code == "200") {
... ... @@ -308,7 +311,7 @@ body, html, #container {
308 311  
309 312 //站点标注用来查道路的 多了个站点筛选和 去除 圆形范围
310 313 function b(lng,lat,distance,roadName){
311   - $.get("https://180.167.126.126:18991/prod-api/service/interfact/getStation?lng="
  314 + $.get("../line/getStation?lng="
312 315 +lng + "&lat=" + lat + "&dis="
313 316 + distance / 1000, function(data) {
314 317 if (data.code == "200") {
... ...