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
775e21e3
Commit
775e21e3
authored
Dec 13, 2024
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[add] 海信灯态下一方案相位优化
parent
f758e2be
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
HisensePhaseCountDownTask.java
...net/wanji/utc/hisense/task/HisensePhaseCountDownTask.java
+6
-4
No files found.
signal-utc-hisense-service/src/main/java/net/wanji/utc/hisense/task/HisensePhaseCountDownTask.java
View file @
775e21e3
...
@@ -65,9 +65,11 @@ public class HisensePhaseCountDownTask {
...
@@ -65,9 +65,11 @@ public class HisensePhaseCountDownTask {
String
currentTime
=
String
.
valueOf
(
currentDate
.
getTime
());
String
currentTime
=
String
.
valueOf
(
currentDate
.
getTime
());
Date
date2HoursAgo
=
DateUtils
.
addHours
(
currentDate
,
-
1
);
Date
date2HoursAgo
=
DateUtils
.
addHours
(
currentDate
,
-
1
);
if
(
StringUtils
.
equalsIgnoreCase
(
schemeStartTime
,
currentTime
)
||
Long
.
parseLong
(
schemeStartTime
)
<
date2HoursAgo
.
getTime
())
{
if
(
StringUtils
.
equalsIgnoreCase
(
schemeStartTime
,
currentTime
)
||
Long
.
parseLong
(
schemeStartTime
)
<
date2HoursAgo
.
getTime
())
{
crossSchemePO
=
crossSchemeMapper
.
selectByCrossIdAndSchemeNo
(
crossId
,
Integer
.
valueOf
(
nextSectionSchemeNo
));
if
(
StringUtils
.
isNotBlank
(
nextSectionSchemeNo
))
{
executeNextSectionScheme
(
crossId
,
lightsStatusVO
,
crossSchemePO
);
crossSchemePO
=
crossSchemeMapper
.
selectByCrossIdAndSchemeNo
(
crossId
,
Integer
.
valueOf
(
nextSectionSchemeNo
));
lightsStatusVO
.
setCycleLen
(
crossSchemePO
.
getCycle
());
executeNextSectionScheme
(
crossId
,
lightsStatusVO
,
crossSchemePO
);
lightsStatusVO
.
setCycleLen
(
crossSchemePO
.
getCycle
());
}
}
else
{
}
else
{
executeNextPeriod
(
crossId
,
lightsStatusVO
,
phaseId
,
crossSchemePO
);
executeNextPeriod
(
crossId
,
lightsStatusVO
,
phaseId
,
crossSchemePO
);
}
}
...
@@ -268,7 +270,7 @@ public class HisensePhaseCountDownTask {
...
@@ -268,7 +270,7 @@ public class HisensePhaseCountDownTask {
if
(
StringUtils
.
equalsIgnoreCase
(
phaseId
,
crossPhasePOS
.
get
(
i
).
getPhaseNo
()))
{
if
(
StringUtils
.
equalsIgnoreCase
(
phaseId
,
crossPhasePOS
.
get
(
i
).
getPhaseNo
()))
{
if
(
i
==
crossPhasePOS
.
size
()
-
1
)
{
if
(
i
==
crossPhasePOS
.
size
()
-
1
)
{
nextPhaseTime
=
crossPhasePOS
.
get
(
0
).
getPhaseTime
();
nextPhaseTime
=
crossPhasePOS
.
get
(
0
).
getPhaseTime
();
nextPhaseId
=
"1"
;
nextPhaseId
=
crossPhasePOS
.
get
(
0
).
getPhaseNo
()
;
}
else
{
}
else
{
nextPhaseTime
=
crossPhasePOS
.
get
(
i
+
1
).
getPhaseTime
();
nextPhaseTime
=
crossPhasePOS
.
get
(
i
+
1
).
getPhaseTime
();
nextPhaseId
=
crossPhasePOS
.
get
(
i
+
1
).
getPhaseNo
();
nextPhaseId
=
crossPhasePOS
.
get
(
i
+
1
).
getPhaseNo
();
...
...
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