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
03abf7c1
Commit
03abf7c1
authored
Apr 25, 2024
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[update] 演示环境提交
parent
4087d0ae
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
5 deletions
+12
-5
EvaluateServiceImpl.java
.../java/net/wanji/opt/service/impl/EvaluateServiceImpl.java
+5
-3
MainlineEvaluateServiceImpl.java
...t/wanji/opt/service/impl/MainlineEvaluateServiceImpl.java
+3
-1
TrendServiceImpl.java
...ain/java/net/wanji/opt/service/impl/TrendServiceImpl.java
+4
-1
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/service/impl/EvaluateServiceImpl.java
View file @
03abf7c1
...
@@ -219,9 +219,10 @@ public class EvaluateServiceImpl implements EvaluateService {
...
@@ -219,9 +219,10 @@ public class EvaluateServiceImpl implements EvaluateService {
@NotNull
@NotNull
private
Map
<
Integer
,
List
<
CrossDirDataHistAvgBO
>>
getHistData
(
String
crossId
,
Integer
minutes
)
{
private
Map
<
Integer
,
List
<
CrossDirDataHistAvgBO
>>
getHistData
(
String
crossId
,
Integer
minutes
)
{
// 获取当前时间之前 minutes 分钟的10位时间戳
// 获取当前时间之前 minutes 分钟的10位时间戳
long
currentSeconds
=
DateUtil
.
currentSeconds
();
//long currentSeconds = DateUtil.currentSeconds();
long
currentSeconds
=
1700262000
l
;
long
preSeconds
=
currentSeconds
-
minutes
*
60
-
10
*
60
;
// 再向前10分钟数据才能形成对比
long
preSeconds
=
currentSeconds
-
minutes
*
60
-
10
*
60
;
// 再向前10分钟数据才能形成对比
long
endSeconds
=
DateUtil
.
currentSeconds
()
-
10
*
60
;
long
endSeconds
=
currentSeconds
-
10
*
60
;
List
<
CrossDirDataHistAvgBO
>
crossDirDataHistAvgBOList
=
crossDirDataHistMapper
.
selectByCrossIdInOutTimestamp
(
List
<
CrossDirDataHistAvgBO
>
crossDirDataHistAvgBOList
=
crossDirDataHistMapper
.
selectByCrossIdInOutTimestamp
(
crossId
,
CrossInOutEnum
.
IN
.
getCode
(),
preSeconds
,
endSeconds
);
crossId
,
CrossInOutEnum
.
IN
.
getCode
(),
preSeconds
,
endSeconds
);
Map
<
Integer
,
List
<
CrossDirDataHistAvgBO
>>
dirObjMapHist
=
crossDirDataHistAvgBOList
.
stream
()
Map
<
Integer
,
List
<
CrossDirDataHistAvgBO
>>
dirObjMapHist
=
crossDirDataHistAvgBOList
.
stream
()
...
@@ -248,7 +249,8 @@ public class EvaluateServiceImpl implements EvaluateService {
...
@@ -248,7 +249,8 @@ public class EvaluateServiceImpl implements EvaluateService {
// 路口流量
// 路口流量
// 获取当前时间前 minutes 分钟的10位时间戳
// 获取当前时间前 minutes 分钟的10位时间戳
long
currentSeconds
=
DateUtil
.
currentSeconds
();
//long currentSeconds = DateUtil.currentSeconds();
long
currentSeconds
=
1700262000
l
;
long
preSeconds
=
currentSeconds
-
(
minutes
+
5
)
*
60L
;
long
preSeconds
=
currentSeconds
-
(
minutes
+
5
)
*
60L
;
List
<
CrossDataHistPO
>
crossDataHistPOS
=
crossDataHistMapper
.
selectByCrossIdAndTimestamp
(
crossId
,
preSeconds
);
List
<
CrossDataHistPO
>
crossDataHistPOS
=
crossDataHistMapper
.
selectByCrossIdAndTimestamp
(
crossId
,
preSeconds
);
if
(
CollectionUtil
.
isNotEmpty
(
crossDataHistPOS
))
{
if
(
CollectionUtil
.
isNotEmpty
(
crossDataHistPOS
))
{
...
...
signal-optimize-service/src/main/java/net/wanji/opt/service/impl/MainlineEvaluateServiceImpl.java
View file @
03abf7c1
...
@@ -125,7 +125,7 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
...
@@ -125,7 +125,7 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
}
}
@Override
@Override
public
List
<
MainlineEvaluateBottomCurveVO
>
bottomCurve
(
BottomCurveBO
bo
)
{
public
List
<
MainlineEvaluateBottomCurveVO
>
bottomCurve
(
BottomCurveBO
bo
)
throws
Exception
{
String
crossId
=
bo
.
getCrossId
();
String
crossId
=
bo
.
getCrossId
();
Integer
scope
=
bo
.
getScope
();
Integer
scope
=
bo
.
getScope
();
List
<
String
>
scopeList
=
bo
.
getScopeList
();
List
<
String
>
scopeList
=
bo
.
getScopeList
();
...
@@ -2253,6 +2253,8 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
...
@@ -2253,6 +2253,8 @@ public class MainlineEvaluateServiceImpl implements MainlineEvaluateService {
Date
nameDate
=
chineseDayFormat
.
parse
(
name
);
Date
nameDate
=
chineseDayFormat
.
parse
(
name
);
Calendar
calendar1
=
Calendar
.
getInstance
();
Calendar
calendar1
=
Calendar
.
getInstance
();
calendar1
.
set
(
2023
,
11
,
18
,
7
,
00
,
00
);
calendar1
.
setTime
(
histGreenwaveGmtModified
);
calendar1
.
setTime
(
histGreenwaveGmtModified
);
int
month1
=
calendar1
.
get
(
Calendar
.
MONTH
)
+
1
;
// Calendar.MONTH is 0-based
int
month1
=
calendar1
.
get
(
Calendar
.
MONTH
)
+
1
;
// Calendar.MONTH is 0-based
int
day1
=
calendar1
.
get
(
Calendar
.
DAY_OF_MONTH
);
int
day1
=
calendar1
.
get
(
Calendar
.
DAY_OF_MONTH
);
...
...
signal-optimize-service/src/main/java/net/wanji/opt/service/impl/TrendServiceImpl.java
View file @
03abf7c1
...
@@ -440,7 +440,8 @@ public class TrendServiceImpl implements TrendService {
...
@@ -440,7 +440,8 @@ public class TrendServiceImpl implements TrendService {
@Override
@Override
public
List
<
GreenwaveRunMonitorVO
>
greenwaveRunMonitor
(
GreenwaveIdBO
greenwaveIdBO
)
{
public
List
<
GreenwaveRunMonitorVO
>
greenwaveRunMonitor
(
GreenwaveIdBO
greenwaveIdBO
)
{
List
<
GreenwaveRunMonitorVO
>
res
=
new
ArrayList
<>();
List
<
GreenwaveRunMonitorVO
>
res
=
new
ArrayList
<>();
Date
nowTime
=
new
Date
();
//Date nowTime = new Date();
Date
nowTime
=
new
Date
(
1705453200000L
);
List
<
GreenwaveHistPOExt
>
extList
=
greenwaveHistMapper
.
selectRunMonitor
(
nowTime
);
List
<
GreenwaveHistPOExt
>
extList
=
greenwaveHistMapper
.
selectRunMonitor
(
nowTime
);
for
(
GreenwaveHistPOExt
greenwaveHistPOExt
:
extList
)
{
for
(
GreenwaveHistPOExt
greenwaveHistPOExt
:
extList
)
{
GreenwaveRunMonitorVO
greenWaveRunMonitorVO
=
new
GreenwaveRunMonitorVO
();
GreenwaveRunMonitorVO
greenWaveRunMonitorVO
=
new
GreenwaveRunMonitorVO
();
...
@@ -1150,6 +1151,7 @@ public class TrendServiceImpl implements TrendService {
...
@@ -1150,6 +1151,7 @@ public class TrendServiceImpl implements TrendService {
// 获取当前日期和时间的 Calendar 对象
// 获取当前日期和时间的 Calendar 对象
Calendar
calendar
=
Calendar
.
getInstance
();
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
set
(
2023
,
11
,
18
,
7
,
00
,
00
);
// 设置时、分、秒和毫秒为 0,以获取当天的 00:00:00
// 设置时、分、秒和毫秒为 0,以获取当天的 00:00:00
calendar
.
set
(
Calendar
.
HOUR_OF_DAY
,
0
);
calendar
.
set
(
Calendar
.
HOUR_OF_DAY
,
0
);
calendar
.
set
(
Calendar
.
MINUTE
,
0
);
calendar
.
set
(
Calendar
.
MINUTE
,
0
);
...
@@ -1370,6 +1372,7 @@ public class TrendServiceImpl implements TrendService {
...
@@ -1370,6 +1372,7 @@ public class TrendServiceImpl implements TrendService {
List
<
MainlineSchemeAnalysisVO
.
GreenwaveData
>
greenwaveData
)
{
List
<
MainlineSchemeAnalysisVO
.
GreenwaveData
>
greenwaveData
)
{
Calendar
now
=
Calendar
.
getInstance
();
Calendar
now
=
Calendar
.
getInstance
();
now
.
set
(
2023
,
11
,
18
,
10
,
00
,
00
);
String
currentTime
=
new
SimpleDateFormat
(
"HH:mm"
).
format
(
now
.
getTime
());
String
currentTime
=
new
SimpleDateFormat
(
"HH:mm"
).
format
(
now
.
getTime
());
for
(
MainlineSchemeAnalysisVO
.
GreenwaveData
data
:
greenwaveData
)
{
for
(
MainlineSchemeAnalysisVO
.
GreenwaveData
data
:
greenwaveData
)
{
...
...
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