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
bb3e1e56
Commit
bb3e1e56
authored
Oct 12, 2023
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[update] 优化海信灯态车道灯态问题2
parent
d159c659
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
96 additions
and
63 deletions
+96
-63
SignalDataCache.java
...ain/java/net/wanji/utc/hisense/cache/SignalDataCache.java
+0
-1
SignalStatusServiceImpl.java
...nji/utc/hisense/service/impl/SignalStatusServiceImpl.java
+2
-3
HisensePhaseCountDownTask.java
...net/wanji/utc/hisense/task/HisensePhaseCountDownTask.java
+94
-59
No files found.
signal-utc-hisense-service/src/main/java/net/wanji/utc/hisense/cache/SignalDataCache.java
View file @
bb3e1e56
...
@@ -24,5 +24,4 @@ public class SignalDataCache {
...
@@ -24,5 +24,4 @@ public class SignalDataCache {
public
static
final
Map
<
String
,
RunningLightsStatusPojo
>
runningStateInfoCacheUdp
=
new
HashMap
<>();
public
static
final
Map
<
String
,
RunningLightsStatusPojo
>
runningStateInfoCacheUdp
=
new
HashMap
<>();
public
static
final
Map
<
String
,
LightsStatusVO
>
runningStateInfoCache
=
new
HashMap
<>();
public
static
final
Map
<
String
,
LightsStatusVO
>
runningStateInfoCache
=
new
HashMap
<>();
public
static
final
Map
<
String
,
Long
>
runningStatusStampMap
=
new
HashMap
<>();
public
static
final
Map
<
String
,
Long
>
runningStatusStampMap
=
new
HashMap
<>();
public
static
final
Map
<
String
,
Integer
>
currentCrossPhaseNoRunPhaseTimeMap
=
new
HashMap
<>();
}
}
signal-utc-hisense-service/src/main/java/net/wanji/utc/hisense/service/impl/SignalStatusServiceImpl.java
View file @
bb3e1e56
...
@@ -153,8 +153,8 @@ public class SignalStatusServiceImpl implements SignalStatusService {
...
@@ -153,8 +153,8 @@ public class SignalStatusServiceImpl implements SignalStatusService {
}
}
Date
date
=
new
Date
();
Date
date
=
new
Date
();
Long
time
=
date
.
getTime
();
Long
time
=
date
.
getTime
();
int
offsetTime
=
(
int
)
((
time
-
signalMachineStamp
)
/
1000
)
;
int
offsetTime
=
(
int
)
((
time
-
signalMachineStamp
)
/
1000
)
-
6
;
//37.12.182.29服务器比北京时间快6秒
int
cycleCountDown
=
content
.
getCycleCountDown
()
-
offsetTime
;
int
cycleCountDown
=
content
.
getCycleCountDown
()
-
Math
.
max
(
offsetTime
,
0
)
;
int
hiControlMode
=
content
.
getControlMode
();
int
hiControlMode
=
content
.
getControlMode
();
int
period
=
content
.
getPeriod
();
int
period
=
content
.
getPeriod
();
int
runTime
=
period
-
cycleCountDown
;
int
runTime
=
period
-
cycleCountDown
;
...
@@ -204,7 +204,6 @@ public class SignalStatusServiceImpl implements SignalStatusService {
...
@@ -204,7 +204,6 @@ public class SignalStatusServiceImpl implements SignalStatusService {
Integer
changePhaseTime
=
phaseCountDownDTO
.
getChangePhaseTime
();
Integer
changePhaseTime
=
phaseCountDownDTO
.
getChangePhaseTime
();
if
(
lastPhaseCountTime
<=
runTime
&&
runTime
<
changePhaseTime
)
{
if
(
lastPhaseCountTime
<=
runTime
&&
runTime
<
changePhaseTime
)
{
phaseTimeCountDown
=
changePhaseTime
-
runTime
;
phaseTimeCountDown
=
changePhaseTime
-
runTime
;
SignalDataCache
.
currentCrossPhaseNoRunPhaseTimeMap
.
put
(
crossId
,
phaseTimeCountDown
);
break
;
break
;
}
}
lastPhaseCountTime
=
changePhaseTime
;
lastPhaseCountTime
=
changePhaseTime
;
...
...
signal-utc-hisense-service/src/main/java/net/wanji/utc/hisense/task/HisensePhaseCountDownTask.java
View file @
bb3e1e56
This diff is collapsed.
Click to expand it.
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