Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
aroad_aqsc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
许言琪
aroad_aqsc
Commits
5e5fc153
提交
5e5fc153
authored
6月 17, 2019
作者:
xuyanqi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
点击地图查询路线信息
上级
93d0eab2
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
33 行增加
和
10 行删除
+33
-10
SzglController.java
...k/galaxy/aroad/module/szgl/controller/SzglController.java
+26
-5
application-dev.yml
src/main/resources/application-dev.yml
+4
-3
application-prod.yml
src/main/resources/application-prod.yml
+3
-2
没有找到文件。
src/main/java/com/elephant/framework/galaxy/aroad/module/szgl/controller/SzglController.java
浏览文件 @
5e5fc153
...
@@ -13,6 +13,7 @@ import com.elephant.framework.galaxy.aroad.module.szgl.entity.Line;
...
@@ -13,6 +13,7 @@ import com.elephant.framework.galaxy.aroad.module.szgl.entity.Line;
import
com.elephant.framework.galaxy.aroad.module.szgl.service.SzglService
;
import
com.elephant.framework.galaxy.aroad.module.szgl.service.SzglService
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
org.apache.commons.lang.StringEscapeUtils
;
import
org.apache.commons.lang.StringEscapeUtils
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.client.RestTemplate
;
...
@@ -25,9 +26,10 @@ import java.util.Map;
...
@@ -25,9 +26,10 @@ import java.util.Map;
@RestController
@RestController
@RequestMapping
(
"/szgl"
)
@RequestMapping
(
"/szgl"
)
@AllArgsConstructor
@AllArgsConstructor
public
class
SzglController
{
public
class
SzglController
{
@Value
(
"${shape.identify-url}"
)
private
final
String
identify
=
""
;
private
final
BaseindexdataService
baseindexdataService
;
private
final
BaseindexdataService
baseindexdataService
;
private
final
RoadConditionEventService
eventService
;
private
final
RoadConditionEventService
eventService
;
private
final
SzglService
szglService
;
private
final
SzglService
szglService
;
...
@@ -216,7 +218,9 @@ public class SzglController {
...
@@ -216,7 +218,9 @@ public class SzglController {
*/
*/
@GetMapping
(
"/getObjByLngLat/{lng}/{lat}"
)
@GetMapping
(
"/getObjByLngLat/{lng}/{lat}"
)
public
R
getObjByLngLat
(
@PathVariable
String
lng
,
@PathVariable
String
lat
)
throws
Exception
{
public
R
getObjByLngLat
(
@PathVariable
String
lng
,
@PathVariable
String
lat
)
throws
Exception
{
String
uri
=
"http://47.105.99.44:8080/sdlkapi/LRS/IdentifyM?longitude="
+
lng
+
"&latitude="
+
lat
;
System
.
out
.
println
(
identify
);
String
uri
=
"http://47.105.99.44:8080/sdlkapi/LRS/IdentifyM?longitude="
;
uri
+=
lng
+
"&latitude="
+
lat
;
RestTemplate
rest
=
new
RestTemplate
();
RestTemplate
rest
=
new
RestTemplate
();
ResponseEntity
<
String
>
response
=
rest
.
getForEntity
(
uri
,
String
.
class
);
ResponseEntity
<
String
>
response
=
rest
.
getForEntity
(
uri
,
String
.
class
);
String
body
=
response
.
getBody
().
trim
();
String
body
=
response
.
getBody
().
trim
();
...
@@ -228,13 +232,22 @@ public class SzglController {
...
@@ -228,13 +232,22 @@ public class SzglController {
String
mm
=
StringEscapeUtils
.
unescapeJava
(
text
);
String
mm
=
StringEscapeUtils
.
unescapeJava
(
text
);
JSONObject
object
=
JSONObject
.
parseObject
(
mm
);
JSONObject
object
=
JSONObject
.
parseObject
(
mm
);
Line
line
=
object
.
toJavaObject
(
Line
.
class
);
Line
line
=
object
.
toJavaObject
(
Line
.
class
);
/* List<Basehighwayalldata> lines = EsUtil_fanshe.queryHighWayFiler(line.getCode(), line.getM()
, road.getIndexType());
List
<
Basehighwayalldata
>
lines
=
EsUtil_fanshe
.
queryHighWayFiler
(
line
.
getCode
(),
line
.
getM
(),
"basehighwayalldata"
,
road
.
getIndexType
());
if
(
lines
!=
null
&&
lines
.
size
()
>
0
)
{
if
(
lines
!=
null
&&
lines
.
size
()
>
0
)
{
lx
=
lines
.
get
(
0
);
lx
=
lines
.
get
(
0
);
}
*/
}
}
}
return
new
R
(
lx
);
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<
String
,
Object
>();
if
(
lx
!=
null
){
resultMap
.
put
(
"name"
,
lx
.
getLuxianmingcheng
());
resultMap
.
put
(
"code"
,
lx
.
getLuxianbianhao
());
resultMap
.
put
(
"iden"
,
"luxian"
);
resultMap
.
put
(
"idenVal"
,
"路线"
);
resultMap
.
put
(
"data"
,
lx
);
resultMap
.
put
(
"total"
,
1
);
}
return
new
R
(
resultMap
);
}
}
/**
/**
* 根据路线编号、中心桩号 查询路况事件
* 根据路线编号、中心桩号 查询路况事件
...
@@ -276,4 +289,11 @@ public class SzglController {
...
@@ -276,4 +289,11 @@ public class SzglController {
public
R
getQzZhEvent
(
@RequestParam
(
"roadCode"
)
String
roadCode
,
@RequestParam
(
"startM"
)
String
startM
,
@RequestParam
(
"endM"
)
String
endM
){
public
R
getQzZhEvent
(
@RequestParam
(
"roadCode"
)
String
roadCode
,
@RequestParam
(
"startM"
)
String
startM
,
@RequestParam
(
"endM"
)
String
endM
){
return
new
R
<>(
eventService
.
getQzdzhEvent
(
startM
,
endM
,
roadCode
));
return
new
R
<>(
eventService
.
getQzdzhEvent
(
startM
,
endM
,
roadCode
));
}
}
/**
* 查询桥梁全部数据
*/
@GetMapping
(
"/qlall"
)
public
R
getQlAll
()
throws
Exception
{
return
new
R
<>(
EsUtil_fanshe
.
queryBridgeAll
(
"basebridgealldata"
,
"2018"
,
0
,
20000
));
}
}
}
\ No newline at end of file
src/main/resources/application-dev.yml
浏览文件 @
5e5fc153
...
@@ -14,7 +14,7 @@ spring:
...
@@ -14,7 +14,7 @@ spring:
driver-class-name
:
com.mysql.jdbc.Driver
driver-class-name
:
com.mysql.jdbc.Driver
url
:
jdbc:mysql://127.0.0.1:3306/aroad?useUnicode=true&characterEncoding=utf-8&useSSL=false
url
:
jdbc:mysql://127.0.0.1:3306/aroad?useUnicode=true&characterEncoding=utf-8&useSSL=false
username
:
root
username
:
root
password
:
123456
password
:
root
cache
:
cache
:
type
:
redis
type
:
redis
redis
:
redis
:
...
@@ -57,4 +57,5 @@ connect:
...
@@ -57,4 +57,5 @@ connect:
host_3
:
192.168.7.220
host_3
:
192.168.7.220
port_net
:
9300
port_net
:
9300
shape
:
shape
:
url
:
http://47.105.99.44:8080/sdlkapi/LRS/GetAmapGeometry?geometry=
url
:
http://47.105.99.44:8080/sdlkapi/LRS/GetAmapGeometry?geometry=
\ No newline at end of file
identify-url
:
http://47.105.99.44:8080/sdlkapi/LRS/IdentifyM?longitude=
\ No newline at end of file
src/main/resources/application-prod.yml
浏览文件 @
5e5fc153
...
@@ -58,4 +58,5 @@ connect:
...
@@ -58,4 +58,5 @@ connect:
host_3
:
192.168.7.220
host_3
:
192.168.7.220
port_net
:
9300
port_net
:
9300
shape
:
shape
:
url
:
http://47.105.99.44:8080/sdlkapi/LRS/GetAmapGeometry?geometry=
url
:
http://47.105.99.44:8080/sdlkapi/LRS/GetAmapGeometry?geometry=
\ No newline at end of file
identifyurl
:
http://47.105.99.44:8080/sdlkapi/LRS/IdentifyM?longitude=
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论