Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
operating-vehicle
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杜发飞
operating-vehicle
Commits
27c4f5c8
Commit
27c4f5c8
authored
Oct 27, 2019
by
dufafei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
09c081de
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
src/main/scala/com/hikcreate/data/sync/SyncIgnite1.scala
+0
-0
src/main/scala/com/hikcreate/data/util/Tools.scala
+3
-3
No files found.
src/main/scala/com/hikcreate/data/sync/SyncIgnite1.scala
View file @
27c4f5c8
src/main/scala/com/hikcreate/data/util/Tools.scala
View file @
27c4f5c8
...
@@ -73,10 +73,10 @@ object Tools extends Logging{
...
@@ -73,10 +73,10 @@ object Tools extends Logging{
arr
.
add
(
lonAndLat
)
arr
.
add
(
lonAndLat
)
}
}
json
.
put
(
"locations"
,
arr
)
json
.
put
(
"locations"
,
arr
)
val
startTime
=
DateTime
.
now
()
//
val startTime = DateTime.now()
val
response
=
Http
(
Const
.
areaCodeAndAddressUrl
).
postData
(
json
.
toJSONString
).
header
(
"content-type"
,
"application/json"
).
asString
val
response
=
Http
(
Const
.
areaCodeAndAddressUrl
).
postData
(
json
.
toJSONString
).
header
(
"content-type"
,
"application/json"
).
asString
val
endTime
=
DateTime
.
now
()
//
val endTime = DateTime.now()
println
(
"http请求时间:"
+
new
Duration
(
startTime
,
endTime
).
getMillis
)
//println("http请求时间:"+new Duration(startTime,endTime).getMillis/1000
)
val
body
=
JSON
.
parseObject
(
response
.
body
)
val
body
=
JSON
.
parseObject
(
response
.
body
)
val
items
=
body
.
getJSONObject
(
"result"
).
getJSONArray
(
"regeoItems"
)
val
items
=
body
.
getJSONObject
(
"result"
).
getJSONArray
(
"regeoItems"
)
(
0
until
items
.
size
()).
map
{
index
=>
(
0
until
items
.
size
()).
map
{
index
=>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment