Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bigdatainterservice
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
曹鹏
bigdatainterservice
Commits
34cd1d2b
Commit
34cd1d2b
authored
Jun 13, 2019
by
chang_chao@founder.com.cn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
时间回溯定时任务迁出
parent
f341d09a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
src/main/java/com/founder/interservice/spatiotemporalBackTrack/controller/SpatiotemporalBackTrackController.java
+1
-0
src/main/java/com/founder/interservice/spatiotemporalBackTrack/service/impl/SpatiotemporalBackTrackScheduledService.java
+8
-7
No files found.
src/main/java/com/founder/interservice/spatiotemporalBackTrack/controller/SpatiotemporalBackTrackController.java
View file @
34cd1d2b
...
...
@@ -37,6 +37,7 @@ public class SpatiotemporalBackTrackController {
private
String
cjServiceId
;
@RequestMapping
(
value
=
"/sendSpatiotemporalBackTrackTask"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
})
@ResponseBody
public
ResultVO
sendSpatiotemporalBackTrackTask
(
String
username
,
String
paramStr
,
String
asjbh
,
String
taskName
,
String
qybj
,
String
centerPoint
){
ResultVO
resultVO
=
null
;
User
user
=
null
;
...
...
src/main/java/com/founder/interservice/spatiotemporalBackTrack/service/impl/SpatiotemporalBackTrackScheduledService.java
View file @
34cd1d2b
...
...
@@ -52,7 +52,7 @@ public class SpatiotemporalBackTrackScheduledService {
* @return:
* @date: 2018/8/22 0022-16:35
*/
@Scheduled
(
initialDelay
=
60000
,
fixedDelay
=
120000
)
//每次执行完后两分钟后再次执行
//每次执行完后两分钟后再次执行
public
void
queryTimeBackTrackResult
(){
System
.
out
.
println
(
"=============SpatiotemporalBackTrack Start Running================"
);
System
.
out
.
println
(
"=============SpatiotemporalBackTrack Start Running================"
);
...
...
@@ -95,7 +95,7 @@ public class SpatiotemporalBackTrackScheduledService {
* 2.开启新线程调取标识号的关联数据
* 3.调取标识号关联数据完成,然后更新任务
*/
@Scheduled
(
initialDelay
=
120000
,
fixedDelay
=
120000
)
//项目启动后延迟两分钟执行,每次执行完后两分钟后再次执行
//项目启动后延迟两分钟执行,每次执行完后两分钟后再次执行
public
void
queryFinishTaskResult
(){
System
.
out
.
println
(
"=============开始执行时空回溯调取关联数据定时任务================"
);
System
.
out
.
println
(
"线程名称========== "
+
Thread
.
currentThread
().
getName
());
...
...
@@ -334,7 +334,6 @@ public class SpatiotemporalBackTrackScheduledService {
}
//begin
List
<
SpatiotemporalBackTrackResult
>
resultsList
=
data
.
subList
(
start
,
end
);
//从fromIndex(包含),到toIndex(不包含)
try
{
for
(
SpatiotemporalBackTrackResult
result
:
resultsList
)
{
String
objType
=
result
.
getObjectType
();
String
objValue
=
result
.
getObjectValue
();
...
...
@@ -345,7 +344,12 @@ public class SpatiotemporalBackTrackScheduledService {
JSONObject
jsonObj
=
null
;
String
relationAll
=
""
;
//获取对象关联关系
relationAll
=
pushWaDataService
.
pushRelationAll
(
DateUtil
.
getYYYYMMDDHHMM
(),
DateUtil
.
getYYYYMMDDHHMM
(),
"admin"
,
objValue
,
3
);
try
{
relationAll
=
pushWaDataService
.
pushRelationAll
(
DateUtil
.
getYYYYMMDDHHMM
(),
DateUtil
.
getYYYYMMDDHHMM
(),
"admin"
,
objValue
,
3
);
}
catch
(
Exception
e
){
continue
;
}
if
(
null
!=
relationAll
&&
relationAll
.
startsWith
(
"{"
)){
JSONObject
json
=
JSONObject
.
parseObject
(
relationAll
);
jsonObj
=
json
.
getJSONObject
(
"data"
);
...
...
@@ -391,9 +395,6 @@ public class SpatiotemporalBackTrackScheduledService {
}
}
}
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
}
}
}
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