Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gk
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
micro_app
gk
Commits
99c4e14c
Commit
99c4e14c
authored
Apr 27, 2020
by
sunyuhua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自动打卡的代码
parent
f7a072de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
RemoteService.java
...com/dlbridge/jadp/plugins/cmpt/service/RemoteService.java
+7
-3
No files found.
src/main/java/com/dlbridge/jadp/plugins/cmpt/service/RemoteService.java
View file @
99c4e14c
...
@@ -370,14 +370,18 @@ public class RemoteService {
...
@@ -370,14 +370,18 @@ public class RemoteService {
String
resultString
=
forEntity
.
getBody
();
String
resultString
=
forEntity
.
getBody
();
log
.
info
(
"计时打卡点:"
+
resultString
);
log
.
info
(
"计时打卡点:"
+
resultString
);
JSONObject
object
=
JSONObject
.
parseObject
(
resultString
);
JSONObject
object
=
JSONObject
.
parseObject
(
resultString
);
JSONArray
result
=
object
.
getJSONArray
(
"segCps"
);
JSONArray
segsResult
=
object
.
getJSONObject
(
"road"
).
getJSONArray
(
"segs"
);
if
(
segsResult
==
null
||
segsResult
.
isEmpty
())
return
null
;
//暂不支持多日赛
JSONObject
resultObject
=
(
JSONObject
)
segsResult
.
get
(
0
);
JSONArray
result
=
resultObject
.
getJSONArray
(
"segCps"
);
if
(
result
==
null
||
result
.
isEmpty
())
return
null
;
if
(
result
==
null
||
result
.
isEmpty
())
return
null
;
//获取每个打卡点的信息
//获取每个打卡点的信息
for
(
int
i
=
0
;
i
<
result
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
result
.
size
();
i
++)
{
RoadsGpsCheckpointMap
roadsGpsCheckpointMap
=
new
RoadsGpsCheckpointMap
();
RoadsGpsCheckpointMap
roadsGpsCheckpointMap
=
new
RoadsGpsCheckpointMap
();
JSONObject
o
=
(
JSONObject
)
result
.
get
(
i
);
JSONObject
o
=
(
JSONObject
)
result
.
get
(
i
);
String
checkpointId
=
o
.
getString
(
"
i
d"
);
String
checkpointId
=
o
.
getString
(
"
checkPointI
d"
);
String
checkpointName
=
o
.
getString
(
"
n
ame"
);
String
checkpointName
=
o
.
getString
(
"
cpN
ame"
);
roadsGpsCheckpointMap
.
setCmptId
(
cmptId
).
setRoadId
(
roadId
).
setCheckpointId
(
Integer
.
parseInt
(
checkpointId
)).
setCheckpointName
(
checkpointName
);
roadsGpsCheckpointMap
.
setCmptId
(
cmptId
).
setRoadId
(
roadId
).
setCheckpointId
(
Integer
.
parseInt
(
checkpointId
)).
setCheckpointName
(
checkpointName
);
roadsGpsCheckpointMapList
.
add
(
roadsGpsCheckpointMap
);
roadsGpsCheckpointMapList
.
add
(
roadsGpsCheckpointMap
);
}
}
...
...
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