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
c52bc3e3
Commit
c52bc3e3
authored
Mar 01, 2024
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[update] 态势检测-问题路口列表 优化拥堵指数1.57时不保留两位小数问题
parent
9b9117d7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
TrendServiceImpl.java
...ain/java/net/wanji/opt/service/impl/TrendServiceImpl.java
+5
-1
AbnormalCrossDetailVO.java
...src/main/java/net/wanji/opt/vo/AbnormalCrossDetailVO.java
+2
-1
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/service/impl/TrendServiceImpl.java
View file @
c52bc3e3
...
...
@@ -306,7 +306,8 @@ public class TrendServiceImpl implements TrendService {
abnormalCrossDetailVO
.
setCrossQueueLength
(
crossDataRealtimePO
.
getQueueLength
());
abnormalCrossDetailVO
.
setCrossFlowRate
((
double
)
crossDataRealtimePO
.
getFlow
());
abnormalCrossDetailVO
.
setCrossStopTimes
(
crossDataRealtimePO
.
getStopTimes
());
abnormalCrossDetailVO
.
setCongestionIndex
(
crossDataRealtimePO
.
getCongestionIndex
());
BigDecimal
bigDecimal
=
BigDecimal
.
valueOf
(
crossDataRealtimePO
.
getCongestionIndex
()).
setScale
(
2
,
RoundingMode
.
HALF_UP
);
abnormalCrossDetailVO
.
setCongestionIndex
(
bigDecimal
);
// 构造转向实时数据
List
<
AbnormalCrossDetailVO
.
TurnDataElement
>
turnData
=
buildTurnData
(
crossId
);
abnormalCrossDetailVO
.
setTurnData
(
turnData
);
...
...
@@ -1090,6 +1091,7 @@ public class TrendServiceImpl implements TrendService {
// 获取当前日期和时间的 Calendar 对象
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
set
(
2024
,
Calendar
.
JANUARY
,
15
,
10
,
0
,
0
);
// 设置时、分、秒和毫秒为 0,以获取当天的 00:00:00
calendar
.
set
(
Calendar
.
HOUR_OF_DAY
,
0
);
...
...
@@ -1301,6 +1303,8 @@ public class TrendServiceImpl implements TrendService {
List
<
MainlineSchemeAnalysisVO
.
GreenwaveData
>
greenwaveData
)
{
Calendar
now
=
Calendar
.
getInstance
();
now
.
set
(
2024
,
Calendar
.
JANUARY
,
15
,
10
,
0
,
0
);
String
currentDayType
=
getDayType
(
now
);
String
currentTime
=
new
SimpleDateFormat
(
"HH:mm"
).
format
(
now
.
getTime
());
...
...
signal-optimize-service/src/main/java/net/wanji/opt/vo/AbnormalCrossDetailVO.java
View file @
c52bc3e3
...
...
@@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -26,7 +27,7 @@ public class AbnormalCrossDetailVO {
@ApiModelProperty
(
value
=
"平均停车次数"
)
private
Double
crossStopTimes
;
@ApiModelProperty
(
value
=
"拥堵指数"
)
private
Double
congestionIndex
;
private
BigDecimal
congestionIndex
;
@ApiModelProperty
(
value
=
"转向实时数据"
)
private
List
<
TurnDataElement
>
turnData
;
@ApiModelProperty
(
value
=
"方向实时数据"
)
...
...
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