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
40a20376
Commit
40a20376
authored
Mar 02, 2025
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[add] 诱导屏定时任务异常问题优化
parent
0bde6e7f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
InducesMonitorTask.java
.../src/main/java/net/wanji/opt/task/InducesMonitorTask.java
+5
-1
StrategyGreenOptHistMapper.xml
.../src/main/resources/mapper/StrategyGreenOptHistMapper.xml
+1
-4
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/task/InducesMonitorTask.java
View file @
40a20376
...
...
@@ -169,6 +169,10 @@ public class InducesMonitorTask {
List
<
StrategyGreenOptHistEntity
>
strategyGreenOptHistEntitiesList
=
strategyGreenOptHistMapper
.
selectByGreenId
(
String
.
valueOf
(
greenwaveInfoPO
.
getId
())).
stream
().
distinct
().
collect
(
Collectors
.
toList
());
if
(
Objects
.
nonNull
(
strategyGreenOptHistEntitiesList
))
{
for
(
StrategyGreenOptHistEntity
greenOptHistEntity
:
strategyGreenOptHistEntitiesList
)
{
Integer
controlMethod
=
greenOptHistEntity
.
getControlMethod
();
if
(
Objects
.
equals
(-
1
,
controlMethod
))
{
continue
;
}
// LambdaQueryWrapper<GreenwaveInducesHist> greenwaveInducesHistQueryWrapper = new LambdaQueryWrapper<>();
// greenwaveInducesHistQueryWrapper.eq(GreenwaveInducesHist::getGreenId, greenwaveInfoPO.getId());
// greenwaveInducesHistQueryWrapper.eq(GreenwaveInducesHist::getDir, getDir(greenOptHistEntity.getDir()));
...
...
@@ -319,7 +323,7 @@ public class InducesMonitorTask {
long
current
=
System
.
currentTimeMillis
();
// 结束时间小于服务器时间15分钟不在下屏
long
time
=
parse
.
getTime
();
if
(
time
-
current
<
15
*
60
*
1000
)
{
if
(
time
-
current
<
15
*
60
*
1000
||
StringUtils
.
isBlank
(
equipCode
)
)
{
continue
;
}
messageParam
.
setFlg
(
2
);
...
...
signal-optimize-service/src/main/resources/mapper/StrategyGreenOptHistMapper.xml
View file @
40a20376
...
...
@@ -14,11 +14,8 @@
<!-- 查询绿波优化记录表当天结束的绿波-->
<select
id=
"selectGreenOptEndTimeEquipCode"
resultType=
"net.wanji.opt.dto.induce.MessageParam"
>
<!-- select t1.green_id as greenId, t1.control_time as endTime, t2.equip_code as equipCode, t2.id as induceId, t2.source_id as sourceId from-->
<!-- (select green_id, control_time from t_strategy_green_opt_hist t1 where control_time > now() and control_method = -1) t1-->
<!-- left join t_greenwave_induces t2 on t1.green_id = t2.green_id-->
select t1.green_id as greenId, t1.control_time as endTime, t2.equip_code as equipCode, t2.id as induceId, t2.source_id as sourceId from
(select green_id, control_time from t_strategy_green_opt_hist t1 where control_time >
STR_TO_DATE('2025-03-01', '%Y-%m-%d'
) and control_method = -1) t1
(select green_id, control_time from t_strategy_green_opt_hist t1 where control_time >
CURDATE(
) and control_method = -1) t1
left join t_greenwave_induces t2 on t1.green_id = t2.green_id
</select>
...
...
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