Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
traffic-signal-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
signal
traffic-signal-platform
Commits
f8de0161
Commit
f8de0161
authored
Jan 06, 2025
by
zhouleilei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[update] 控制指令下发失败,定时恢复的定时任务修改
parent
1f7be484
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
CommandFaildTask.java
...ce/src/main/java/net/wanji/utc/task/CommandFaildTask.java
+7
-7
No files found.
signal-utc-service/src/main/java/net/wanji/utc/task/CommandFaildTask.java
View file @
f8de0161
...
@@ -50,7 +50,7 @@ public class CommandFaildTask {
...
@@ -50,7 +50,7 @@ public class CommandFaildTask {
@Resource
@Resource
private
SignalCommandLogPOMapper
signalCommandLogPOMapper
;
private
SignalCommandLogPOMapper
signalCommandLogPOMapper
;
@Scheduled
(
cron
=
"0/5 * * * * ?"
)
@Scheduled
(
fixedRate
=
5
*
1000
,
initialDelay
=
10
*
1000
)
public
void
commandFaildTask
()
throws
Exception
{
public
void
commandFaildTask
()
throws
Exception
{
try
{
try
{
LambdaQueryWrapper
<
SignalCommandPO
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
SignalCommandPO
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
...
@@ -244,9 +244,9 @@ public class CommandFaildTask {
...
@@ -244,9 +244,9 @@ public class CommandFaildTask {
//插入日志表
//插入日志表
int
insert
=
signalCommandLogPOMapper
.
insert
(
signalCommandLogPO
);
int
insert
=
signalCommandLogPOMapper
.
insert
(
signalCommandLogPO
);
if
(
insert
>
0
)
{
if
(
insert
>
0
)
{
log
.
info
(
"定时任务 插入t_signal_command_log成功,crossId = {},commandType = {},time = {},insert = {}"
,
jsonObject
.
getString
(
"crossId"
),
commandType
,
LocalDateTimeUtil
.
formatNow
(
LocalDateTimeUtil
.
TIMEFORMATTER
),
insert
);
log
.
info
(
"定时任务 插入t_signal_command_log成功,crossId = {},commandType = {},time = {},insert = {}"
,
jsonObject
.
getString
(
"crossId"
),
commandType
,
LocalDateTimeUtil
.
formatNow
(
LocalDateTimeUtil
.
TIMEFORMATTER
),
insert
);
}
else
{
}
else
{
log
.
info
(
"定时任务 插入t_signal_command_log失败,crossId = {},commandType = {},time = {},insert = {}"
,
jsonObject
.
getString
(
"crossId"
),
commandType
,
LocalDateTimeUtil
.
formatNow
(
LocalDateTimeUtil
.
TIMEFORMATTER
),
insert
);
log
.
info
(
"定时任务 插入t_signal_command_log失败,crossId = {},commandType = {},time = {},insert = {}"
,
jsonObject
.
getString
(
"crossId"
),
commandType
,
LocalDateTimeUtil
.
formatNow
(
LocalDateTimeUtil
.
TIMEFORMATTER
),
insert
);
}
}
SignalCommandPO
signalCommandPO
=
new
SignalCommandPO
();
SignalCommandPO
signalCommandPO
=
new
SignalCommandPO
();
BeanUtil
.
copyProperties
(
signalCommandLogPO
,
signalCommandPO
);
BeanUtil
.
copyProperties
(
signalCommandLogPO
,
signalCommandPO
);
...
@@ -256,9 +256,9 @@ public class CommandFaildTask {
...
@@ -256,9 +256,9 @@ public class CommandFaildTask {
lambdaQueryWrapper
.
eq
(
SignalCommandPO:
:
getCrossId
,
jsonObject
.
getString
(
"crossId"
));
lambdaQueryWrapper
.
eq
(
SignalCommandPO:
:
getCrossId
,
jsonObject
.
getString
(
"crossId"
));
int
update
=
signalCommandPOMapper
.
update
(
signalCommandPO
,
lambdaQueryWrapper
);
int
update
=
signalCommandPOMapper
.
update
(
signalCommandPO
,
lambdaQueryWrapper
);
if
(
update
>
0
)
{
if
(
update
>
0
)
{
log
.
info
(
"定时任务 更新t_signal_command成功,crossId = {},commandType = {},time = {},update = {}"
,
jsonObject
.
getString
(
"crossId"
),
commandType
,
LocalDateTimeUtil
.
formatNow
(
LocalDateTimeUtil
.
TIMEFORMATTER
),
update
);
log
.
info
(
"定时任务 更新t_signal_command成功,crossId = {},commandType = {},time = {},update = {}"
,
jsonObject
.
getString
(
"crossId"
),
commandType
,
LocalDateTimeUtil
.
formatNow
(
LocalDateTimeUtil
.
TIMEFORMATTER
),
update
);
}
else
{
}
else
{
log
.
info
(
"定时任务 更新t_signal_command失败,crossId = {},commandType = {},time = {},update = {}"
,
jsonObject
.
getString
(
"crossId"
),
commandType
,
LocalDateTimeUtil
.
formatNow
(
LocalDateTimeUtil
.
TIMEFORMATTER
),
update
);
log
.
info
(
"定时任务 更新t_signal_command失败,crossId = {},commandType = {},time = {},update = {}"
,
jsonObject
.
getString
(
"crossId"
),
commandType
,
LocalDateTimeUtil
.
formatNow
(
LocalDateTimeUtil
.
TIMEFORMATTER
),
update
);
}
}
List
<
SignalCommandPO
>
signalCommandPOS
=
signalCommandPOMapper
.
selectList
(
lambdaQueryWrapper
);
List
<
SignalCommandPO
>
signalCommandPOS
=
signalCommandPOMapper
.
selectList
(
lambdaQueryWrapper
);
log
.
error
(
"定时任务 更新t_signal_command成功,数据库中查询结果集:{}"
,
signalCommandPOS
);
log
.
error
(
"定时任务 更新t_signal_command成功,数据库中查询结果集:{}"
,
signalCommandPOS
);
...
...
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