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
96fba4c9
Commit
96fba4c9
authored
Dec 31, 2024
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[add] 优化控制表中无数据插入逻辑;优化事件告警逻辑
parent
e668828c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
6 deletions
+5
-6
SignalCommandSyncTask.java
...c/main/java/net/wanji/utc/task/SignalCommandSyncTask.java
+5
-4
SignalCommandLogPOMapper.xml
...us/src/main/resources/mapper/SignalCommandLogPOMapper.xml
+0
-1
SignalCommandPOMapper.xml
...tabus/src/main/resources/mapper/SignalCommandPOMapper.xml
+0
-1
No files found.
signal-utc-service/src/main/java/net/wanji/utc/task/SignalCommandSyncTask.java
View file @
96fba4c9
...
...
@@ -99,12 +99,13 @@ public class SignalCommandSyncTask {
signalCommandPOMapper
.
updateBatch
(
updateList
);
List
<
SignalCommandLogPO
>
signalCommandLogPOS
=
new
ArrayList
<>(
updateList
.
size
());
BeanListUtils
.
populateList
(
updateList
,
signalCommandLogPOS
,
SignalCommandLogPO
.
class
);
signalCommandLogPOMapper
.
update
Batch
(
signalCommandLogPOS
);
signalCommandLogPOMapper
.
insert
Batch
(
signalCommandLogPOS
);
log
.
info
(
"路口状态控制模式变动,数据库更新成功:{}"
,
updateList
);
}
signalCommandPOS
.
addAll
(
insertList
);
signalCommandPOS
.
addAll
(
updateList
);
sendAlarmKafka
(
signalCommandPOS
);
List
<
SignalCommandPO
>
sendList
=
new
ArrayList
<>();
sendList
.
addAll
(
insertList
);
sendList
.
addAll
(
updateList
);
sendAlarmKafka
(
sendList
);
}
else
{
log
.
error
(
"从路口灯态缓存获取控制模式在线离线状态为空:{}"
,
crossLightsStatusMap
);
}
...
...
wj-databus/src/main/resources/mapper/SignalCommandLogPOMapper.xml
View file @
96fba4c9
...
...
@@ -17,7 +17,6 @@
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
""
separator=
";"
close=
""
>
UPDATE t_signal_command_log
<set>
<if
test=
"item.commandResult != null"
>
command_result = #{item.commandResult},
</if>
<if
test=
"item.runMode != null"
>
run_mode = #{item.runMode},
</if>
<if
test=
"item.updateTime != null"
>
update_time = #{item.updateTime},
</if>
<if
test=
"item.status != null"
>
status = #{item.status},
</if>
...
...
wj-databus/src/main/resources/mapper/SignalCommandPOMapper.xml
View file @
96fba4c9
...
...
@@ -17,7 +17,6 @@
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
""
separator=
";"
close=
""
>
UPDATE t_signal_command
<set>
<if
test=
"item.commandResult != null"
>
command_result = #{item.commandResult},
</if>
<if
test=
"item.runMode != null"
>
run_mode = #{item.runMode},
</if>
<if
test=
"item.updateTime != null"
>
update_time = #{item.updateTime},
</if>
<if
test=
"item.status != null"
>
status = #{item.status},
</if>
...
...
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