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
23bdf468
Commit
23bdf468
authored
Jun 19, 2024
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[update] 微观大数据平台-时区优化
parent
8a6319b2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
8 deletions
+23
-8
AnalysisRidTurnIndicators.java
...ava/net/wanji/opt/po/trend/AnalysisRidTurnIndicators.java
+6
-5
TrendServiceImpl.java
...ain/java/net/wanji/opt/service/impl/TrendServiceImpl.java
+17
-3
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/po/trend/AnalysisRidTurnIndicators.java
View file @
23bdf468
...
...
@@ -62,7 +62,7 @@ public class AnalysisRidTurnIndicators implements Serializable {
private
Integer
queueLength
;
@ApiModelProperty
(
value
=
"绿灯有效利用率"
)
@ExcelProperty
(
"绿灯有效利用率
"
)
//@ExcelProperty("绿灯有效利用率%
")
private
BigDecimal
greenUsageRate
;
@ApiModelProperty
(
value
=
"平均停车次数"
)
...
...
@@ -70,19 +70,20 @@ public class AnalysisRidTurnIndicators implements Serializable {
private
BigDecimal
stopNum
;
@ApiModelProperty
(
value
=
"一次停车率"
)
@ExcelProperty
(
"一次停车率"
)
@ExcelProperty
(
"一次停车率%"
)
@JsonFormat
()
private
BigDecimal
onceStopRate
;
@ApiModelProperty
(
value
=
"二次停车率"
)
@ExcelProperty
(
"二次停车率"
)
@ExcelProperty
(
"二次停车率
%
"
)
private
BigDecimal
secondStopRate
;
@ApiModelProperty
(
value
=
"三次停车率"
)
@ExcelProperty
(
"三次停车率"
)
@ExcelProperty
(
"三次停车率
%
"
)
private
BigDecimal
threeStopRate
;
@ApiModelProperty
(
value
=
"不停车通过率"
)
@ExcelProperty
(
"不停车通过率"
)
@ExcelProperty
(
"不停车通过率
%
"
)
private
BigDecimal
noStopRate
;
@ApiModelProperty
(
value
=
"交通状态"
)
...
...
signal-optimize-service/src/main/java/net/wanji/opt/service/impl/TrendServiceImpl.java
View file @
23bdf468
...
...
@@ -5,6 +5,7 @@ import cn.hutool.core.date.DateTime;
import
cn.hutool.core.date.DateUnit
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.alibaba.excel.util.DateUtils
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
...
...
@@ -1715,7 +1716,8 @@ public class TrendServiceImpl implements TrendService {
hotspotCrossVO
.
setDetailList
(
dirDetails
);
Date
currentDate
=
new
Date
(
entry
.
getKey
()
*
1000L
);
hotspotCrossVO
.
setTimeStamp
(
currentDate
);
hotspotCrossVO
.
setHourMinute
(
DateUtil
.
format
(
currentDate
,
DateStyle
.
HH_MM
.
getValue
()));
// 相差八小时
hotspotCrossVO
.
setHourMinute
(
DateUtils
.
format
(
org
.
apache
.
commons
.
lang3
.
time
.
DateUtils
.
addHours
(
currentDate
,
-
8
),
"HH:mm"
));
hotspotCrossVO
.
setCrossId
(
abnormalCrossListVO
.
getId
());
hotspotCrossVOS
.
add
(
hotspotCrossVO
);
}
...
...
@@ -2065,8 +2067,20 @@ public class TrendServiceImpl implements TrendService {
queryWrapper
.
between
(
AnalysisRidTurnIndicators:
:
getWindowStartTime
,
startDate
,
endDate
);
queryWrapper
.
orderByDesc
(
AnalysisRidTurnIndicators:
:
getWindowStartTime
);
List
<
AnalysisRidTurnIndicators
>
dataList
=
ridTurnIndicatorsMapper
.
selectList
(
queryWrapper
);
ExcelExportUtils
.
exportExcel
(
response
,
startStr
,
endStr
,
dataList
,
"周期转向数据"
,
AnalysisRidTurnIndicators
.
class
);
// 部分数据*100
BigDecimal
offset
=
new
BigDecimal
(
"100"
);
List
<
AnalysisRidTurnIndicators
>
result
=
dataList
.
stream
()
.
map
(
item
->
{
// 假设有一个名为value的字段需要乘以100
item
.
setGreenUsageRate
(
item
.
getGreenUsageRate
().
multiply
(
offset
));
item
.
setOnceStopRate
(
item
.
getOnceStopRate
().
multiply
(
offset
));
item
.
setSecondStopRate
(
item
.
getSecondStopRate
().
multiply
(
offset
));
item
.
setThreeStopRate
(
item
.
getThreeStopRate
().
multiply
(
offset
));
item
.
setNoStopRate
(
item
.
getNoStopRate
().
multiply
(
offset
));
return
item
;
}).
collect
(
Collectors
.
toList
());
ExcelExportUtils
.
exportExcel
(
response
,
startStr
,
endStr
,
result
,
"周期转向数据"
,
AnalysisRidTurnIndicators
.
class
);
}
@Override
...
...
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