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
762e9980
Commit
762e9980
authored
Dec 03, 2024
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[add] 绿波子区时段指标
parent
dd9fa48e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
GreenBeltServiceImpl.java
...anji/opt/service/signalopt/impl/GreenBeltServiceImpl.java
+4
-3
pom.xml
signal-utc-hisense-service/pom.xml
+1
-1
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/service/signalopt/impl/GreenBeltServiceImpl.java
View file @
762e9980
...
...
@@ -37,14 +37,14 @@ public class GreenBeltServiceImpl implements GreenBeltInfoService {
LocalDate
nextDate
=
currentDate
.
plusDays
(
1
);
LocalTime
endTime
=
LocalTime
.
MIDNIGHT
;
// 00:00 of the next day
LocalDateTime
endOfDay
=
LocalDateTime
.
of
(
nextDate
,
endTime
);
long
startSecond
=
startOfDay
.
toEpochSecond
(
ZoneOffset
.
of
(
"+8"
));
long
startSecond
=
startOfDay
.
toEpochSecond
(
ZoneOffset
.
of
(
"+8"
))
+
5
*
600
;
long
endSecond
=
endOfDay
.
toEpochSecond
(
ZoneOffset
.
of
(
"+8"
));
List
<
CrossDataHistPO
>
crossDataHistPOS
=
crossDataHistMapper
.
selectByCrossIdsAndTimestamp
(
crossIds
,
(
int
)
startSecond
,
(
int
)
endSecond
);
List
<
CrossDataHistPO
>
crossDataHistPOS
=
crossDataHistMapper
.
selectByCrossIdsAndTimestamp
(
crossIds
,
(
int
)
startSecond
,
(
int
)
endSecond
);
if
(!
CollectionUtils
.
isEmpty
(
crossDataHistPOS
))
{
List
<
GreenBeltFlowStopTimeVO
>
results
=
new
ArrayList
<>();
Map
<
Date
,
List
<
CrossDataHistPO
>>
startTimeMap
=
crossDataHistPOS
.
stream
().
collect
(
Collectors
.
groupingBy
(
CrossDataHistPO:
:
getStartTime
));
GreenBeltFlowStopTimeVO
greenBeltFlowStopTimeVO
=
new
GreenBeltFlowStopTimeVO
();
for
(
Map
.
Entry
<
Date
,
List
<
CrossDataHistPO
>>
entry
:
startTimeMap
.
entrySet
())
{
GreenBeltFlowStopTimeVO
greenBeltFlowStopTimeVO
=
new
GreenBeltFlowStopTimeVO
();
Date
startDate
=
entry
.
getKey
();
List
<
GreenBeltFlowStopTimeVO
.
FlowStopTimeDetail
>
crossList
=
new
ArrayList
<>();
greenBeltFlowStopTimeVO
.
setStartTime
(
startDate
);
...
...
@@ -61,6 +61,7 @@ public class GreenBeltServiceImpl implements GreenBeltInfoService {
greenBeltFlowStopTimeVO
.
setDetailList
(
crossList
);
results
.
add
(
greenBeltFlowStopTimeVO
);
}
Collections
.
sort
(
results
,
Comparator
.
comparing
(
GreenBeltFlowStopTimeVO:
:
getStartTime
));
return
results
;
}
return
Collections
.
EMPTY_LIST
;
...
...
signal-utc-hisense-service/pom.xml
View file @
762e9980
...
...
@@ -68,7 +68,7 @@
<dependency>
<groupId>
net.wanji
</groupId>
<artifactId>
wj-databus
</artifactId>
<version>
0.0.
1
</version>
<version>
0.0.
3
</version>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
...
...
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