Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
e682d724
Commit
e682d724
authored
Apr 25, 2023
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
巡检添加中心级/站端标识 -> 是否跑定时任务
parent
576fbc9b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
14 deletions
+26
-14
PlanTaskController.java
...n/amos/patrol/business/controller/PlanTaskController.java
+21
-12
application-dev.properties
...stem-patrol/src/main/resources/application-dev.properties
+5
-2
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/PlanTaskController.java
View file @
e682d724
...
@@ -28,6 +28,7 @@ import io.swagger.annotations.ApiParam;
...
@@ -28,6 +28,7 @@ import io.swagger.annotations.ApiParam;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
...
@@ -58,6 +59,9 @@ public class PlanTaskController extends AbstractBaseController {
...
@@ -58,6 +59,9 @@ public class PlanTaskController extends AbstractBaseController {
@Autowired
@Autowired
private
IRouteService
routeService
;
private
IRouteService
routeService
;
@Value
(
"${params.isPush:false}"
)
private
Boolean
isZxj
;
@Autowired
@Autowired
private
RemoteSecurityService
remoteSecurityService
;
private
RemoteSecurityService
remoteSecurityService
;
...
@@ -386,16 +390,19 @@ public class PlanTaskController extends AbstractBaseController {
...
@@ -386,16 +390,19 @@ public class PlanTaskController extends AbstractBaseController {
@ApiOperation
(
value
=
"定时执行任务表生成(<font color='blue'>release</font>)"
,
notes
=
"定时执行任务表生成"
)
@ApiOperation
(
value
=
"定时执行任务表生成(<font color='blue'>release</font>)"
,
notes
=
"定时执行任务表生成"
)
@RequestMapping
(
value
=
"/queryOmission"
,
method
=
RequestMethod
.
GET
,
produces
=
"application/json;charset=UTF-8"
)
@RequestMapping
(
value
=
"/queryOmission"
,
method
=
RequestMethod
.
GET
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
pushCarData
()
{
public
CommonResponse
pushCarData
()
{
try
{
if
(
Boolean
.
TRUE
.
equals
(!
isZxj
))
{
RequestAttributes
reqs
=
RequestContextHolder
.
getRequestAttributes
();
try
{
RequestContextHolder
.
setRequestAttributes
(
reqs
,
true
);
RequestAttributes
reqs
=
RequestContextHolder
.
getRequestAttributes
();
planTaskService
.
taskExecution
(
null
);
RequestContextHolder
.
setRequestAttributes
(
reqs
,
true
);
return
CommonResponseUtil
.
success
();
planTaskService
.
taskExecution
(
null
);
}
catch
(
Exception
e
)
{
return
CommonResponseUtil
.
success
();
e
.
printStackTrace
();
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
e
.
printStackTrace
();
return
CommonResponseUtil
.
failure
();
log
.
error
(
e
.
getMessage
(),
e
);
return
CommonResponseUtil
.
failure
();
}
}
}
return
CommonResponseUtil
.
success
();
}
}
/**
/**
...
@@ -403,9 +410,11 @@ public class PlanTaskController extends AbstractBaseController {
...
@@ -403,9 +410,11 @@ public class PlanTaskController extends AbstractBaseController {
*/
*/
@Scheduled
(
cron
=
"${jobs.cron}"
)
@Scheduled
(
cron
=
"${jobs.cron}"
)
public
void
taskMessage
()
{
public
void
taskMessage
()
{
RequestAttributes
reqs
=
RequestContextHolder
.
getRequestAttributes
();
if
(
Boolean
.
TRUE
.
equals
(!
isZxj
))
{
RequestContextHolder
.
setRequestAttributes
(
reqs
,
true
);
RequestAttributes
reqs
=
RequestContextHolder
.
getRequestAttributes
();
planTaskService
.
taskMessage
(
null
);
RequestContextHolder
.
setRequestAttributes
(
reqs
,
true
);
planTaskService
.
taskMessage
(
null
);
}
}
}
/**
/**
...
...
amos-boot-system-patrol/src/main/resources/application-dev.properties
View file @
e682d724
...
@@ -95,4 +95,7 @@ emqx.max-inflight=1000
...
@@ -95,4 +95,7 @@ emqx.max-inflight=1000
file.url
=
http://172.16.11.201:9000/
file.url
=
http://172.16.11.201:9000/
##代码中有部分逻辑冲突需要处理 为区分机场和电力逻辑 增加开关 若为true 则为机场逻辑 为false 则为电力逻辑
##代码中有部分逻辑冲突需要处理 为区分机场和电力逻辑 增加开关 若为true 则为机场逻辑 为false 则为电力逻辑
logic
=
false
logic
=
false
\ No newline at end of file
#是否为中心级系统 true-中心级系统 false-站端系统
is.zxj
=
true
\ No newline at end of file
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