Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
TDLCloud
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
WitCloud
TDLCloud
Commits
13f9be95
Commit
13f9be95
authored
Oct 16, 2020
by
Carit Zhu
🎱
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'tdl_bosch_carit' into tdl_bosch
parents
f9a453fc
326951c7
Pipeline
#665
passed with stage
in 0 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
8 deletions
+31
-8
DataController.java
src/main/java/com/example/tdl/web/DataController.java
+24
-4
application.properties
src/main/resources/application.properties
+7
-4
No files found.
src/main/java/com/example/tdl/web/DataController.java
View file @
13f9be95
...
...
@@ -95,6 +95,23 @@ public class DataController {
add
(
"\"ta\""
);
}};
private
boolean
checkShockPoint
(
LocationDataVo
current
,
LocationDataVo
last
,
List
<
String
>
shockTimeList
)
{
try
{
long
curPointTs
=
Long
.
parseLong
(
current
.
getTime
());
long
lastPointTs
=
last
!=
null
?
Long
.
parseLong
(
last
.
getTime
())
:
0
;
for
(
String
timeString
:
shockTimeList
)
{
long
shockTs
=
Long
.
parseLong
(
timeString
);
if
(
shockTs
>
lastPointTs
&&
shockTs
<=
curPointTs
)
{
// The point is shocked
return
true
;
}
}
}
catch
(
NumberFormatException
ignored
)
{
}
return
false
;
}
//获取坐标数据数据
@ApiOperation
(
value
=
"获取坐标数据数据"
,
notes
=
"获取坐标数据数据:"
+
" time:时间,"
+
...
...
@@ -187,14 +204,17 @@ public class DataController {
if
(
queryResult3
.
getResults
()
!=
null
)
{
time
=
getShockLocation
(
queryResult3
);
}
LocationDataVo
lastLocationDataVo
=
null
;
for
(
LocationDataVo
locationDataVo
:
locationDataVos
)
{
if
(
time
.
contains
(
locationDataVo
.
getTime
()))
{
//if (time.contains(locationDataVo.getTime())) {
if
(
checkShockPoint
(
locationDataVo
,
lastLocationDataVo
,
time
))
{
locationDataVo
.
setError
(
1
);
locationDataVoList
.
add
(
locationDataVo
);
}
else
{
locationDataVo
.
setError
(
0
);
locationDataVoList
.
add
(
locationDataVo
);
}
locationDataVoList
.
add
(
locationDataVo
);
// Set current as last
lastLocationDataVo
=
locationDataVo
;
}
return
gson
.
toJson
(
locationDataVoList
);
}
else
{
...
...
src/main/resources/application.properties
View file @
13f9be95
...
...
@@ -3,6 +3,9 @@ spring.datasource.username=root
spring.datasource.password
=
37774020
spring.datasource.driver-class-name
=
com.mysql.jdbc.Driver
#spring.datasource.url=jdbc:mysql://rm-bp12687cq31d42453so.mysql.rds.aliyuncs.com:3306/tdlcloud?useUnicode=true&characterEncoding=utf-8&useSSL=false
#spring.datasource.username=witcloud
#spring.datasource.password=Witcloud37774020
threadpool.corepoolsize
=
30
threadpool.maxpoolsize
=
50
...
...
@@ -58,10 +61,10 @@ spring.influxdb.password=Witcloud37774020
spring.influxdb.url
=
http://172.16.1.24:8086
spring.influxdb.database
=
logistics
#spring.influxdb.url=http
://47.97.184.225:8086
#spring.influxdb.username=
admin
#spring.influxdb.password=37774020
#spring.influxdb.database=
original
#spring.influxdb.url=http
s://ts-bp1q738i505oj79t7.influxdata.rds.aliyuncs.com:3242
#spring.influxdb.username=
witcloud
#spring.influxdb.password=
Witcloud
37774020
#spring.influxdb.database=
warehouse_bosch
spring.influxdb.retentionPolicy
=
tdl_policy
spring.influxdb.connent-timeout
=
10
spring.influxdb.read-timeout
=
30
...
...
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