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
ef0c9d10
Commit
ef0c9d10
authored
Oct 23, 2023
by
duanruiming
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
ed4d8650
a6f05bc2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
4 deletions
+18
-4
SceneEvaluateServiceImpl.java
.../net/wanji/opt/service/impl/SceneEvaluateServiceImpl.java
+15
-4
HeatMapBO.java
wj-databus/src/main/java/net/wanji/databus/bo/HeatMapBO.java
+3
-0
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/service/impl/SceneEvaluateServiceImpl.java
View file @
ef0c9d10
...
@@ -412,12 +412,23 @@ public class SceneEvaluateServiceImpl implements SceneEvaluateService {
...
@@ -412,12 +412,23 @@ public class SceneEvaluateServiceImpl implements SceneEvaluateService {
public
List
<
SceneEvaluateHeatMapVO
>
heatMap
(
HeatMapBO
bo
)
{
public
List
<
SceneEvaluateHeatMapVO
>
heatMap
(
HeatMapBO
bo
)
{
String
crossId
=
bo
.
getCrossId
();
String
crossId
=
bo
.
getCrossId
();
Date
startDate
=
bo
.
getStartDate
();
Date
startDate
=
bo
.
getStartDate
();
Date
endDate
=
bo
.
getEndDate
();
String
hourMinute
=
bo
.
getHourMinute
();
endDate
=
DateUtil
.
offsetDay
(
endDate
,
1
);
// 包含最后一天
int
startStamp
=
(
int
)
(
startDate
.
getTime
()
/
1000
);
// 10位时间戳
int
endStamp
=
(
int
)
(
endDate
.
getTime
()
/
1000
);
Integer
status
=
bo
.
getStatus
();
Integer
status
=
bo
.
getStatus
();
String
[]
parts
=
hourMinute
.
split
(
":"
);
int
hour
=
Integer
.
parseInt
(
parts
[
0
]);
int
minute
=
Integer
.
parseInt
(
parts
[
1
]);
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
startDate
);
calendar
.
set
(
Calendar
.
HOUR_OF_DAY
,
hour
);
calendar
.
set
(
Calendar
.
MINUTE
,
minute
);
int
startStamp
=
(
int
)
calendar
.
getTimeInMillis
()
/
1000
;
calendar
.
add
(
Calendar
.
MINUTE
,
5
);
int
endStamp
=
(
int
)
calendar
.
getTimeInMillis
()
/
1000
;
List
<
SceneEvaluateHeatMapVO
>
res
=
new
ArrayList
<>();
List
<
SceneEvaluateHeatMapVO
>
res
=
new
ArrayList
<>();
List
<
CrossDataHistPO
>
crossDataHistPOList
=
crossDataHistMapper
.
selectByCrossIdAndStartEnd
(
List
<
CrossDataHistPO
>
crossDataHistPOList
=
crossDataHistMapper
.
selectByCrossIdAndStartEnd
(
crossId
,
startStamp
,
endStamp
);
crossId
,
startStamp
,
endStamp
);
...
...
wj-databus/src/main/java/net/wanji/databus/bo/HeatMapBO.java
View file @
ef0c9d10
...
@@ -21,4 +21,7 @@ public class HeatMapBO {
...
@@ -21,4 +21,7 @@ public class HeatMapBO {
@ApiModelProperty
(
value
=
"路口状态 0正常 1 失衡 2 拥堵 3 溢出"
)
@ApiModelProperty
(
value
=
"路口状态 0正常 1 失衡 2 拥堵 3 溢出"
)
private
Integer
status
;
private
Integer
status
;
@ApiModelProperty
(
value
=
"小时分钟 格式 08:00"
)
private
String
hourMinute
;
}
}
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