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
288b7d9d
Commit
288b7d9d
authored
Apr 17, 2024
by
hanbing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[update] 态势监测实时推送增加空间占有率、时间占有率
parent
cbaabc92
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
7 deletions
+25
-7
TrendServiceImpl.java
...ain/java/net/wanji/opt/service/impl/TrendServiceImpl.java
+13
-3
TableQueryVO.java
...-service/src/main/java/net/wanji/opt/vo/TableQueryVO.java
+7
-0
CrossLaneDataHistPOExt.java
...ain/java/net/wanji/databus/po/CrossLaneDataHistPOExt.java
+4
-3
CrossLaneDataHistMapper.xml
...bus/src/main/resources/mapper/CrossLaneDataHistMapper.xml
+1
-1
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/service/impl/TrendServiceImpl.java
View file @
288b7d9d
...
...
@@ -1225,9 +1225,9 @@ public class TrendServiceImpl implements TrendService {
TableQueryVO
tableQueryVO
=
new
TableQueryVO
();
// 查询秒级数据
List
<
CrossLaneSnapshotDataDTO
>
dtoList
=
laneSnapshotDataQueryService
.
queryByCrossIdAndTimeSpan
(
crossId
,
realTimeStartTimeStamp
,
endTimeStamp
);
tableQueryVO
.
setRealTimeData
(
buildRealTimeList
(
dtoList
));
//
List<CrossLaneSnapshotDataDTO> dtoList =
//
laneSnapshotDataQueryService.queryByCrossIdAndTimeSpan(crossId, realTimeStartTimeStamp, endTimeStamp);
//
tableQueryVO.setRealTimeData(buildRealTimeList(dtoList));
// 查询周期数据
List
<
CrossLaneDataHistPOExt
>
poExtList
=
crossLaneDataHistMapper
...
...
@@ -1289,6 +1289,16 @@ public class TrendServiceImpl implements TrendService {
Double
vehheadTime
=
po
.
getVehheadTime
();
vo
.
setVehheadTime
((
int
)
Math
.
round
(
vehheadTime
));
Double
timeOccupancyDouble
=
po
.
getTimeOccupancy
();
if
(
timeOccupancyDouble
!=
null
)
{
vo
.
setTimeOccupancy
((
int
)
Math
.
round
(
timeOccupancyDouble
*
100
));
}
Double
vehicleNumsRatioMeanDoulbe
=
po
.
getVehicleNumsRatioMean
();
if
(
vehicleNumsRatioMeanDoulbe
!=
null
)
{
vo
.
setVehicleNumsRatioMean
((
int
)
Math
.
round
(
vehicleNumsRatioMeanDoulbe
*
100
));
}
res
.
add
(
vo
);
}
...
...
signal-optimize-service/src/main/java/net/wanji/opt/vo/TableQueryVO.java
View file @
288b7d9d
...
...
@@ -77,5 +77,12 @@ public class TableQueryVO {
@ApiModelProperty
(
value
=
"平均车头时距"
)
private
Integer
vehheadTime
;
@ApiModelProperty
(
value
=
"时间占有率"
)
private
Integer
timeOccupancy
;
@ApiModelProperty
(
value
=
"空间占有率"
)
// 空间占有率即车辆负荷比
private
Integer
vehicleNumsRatioMean
;
}
}
wj-databus/src/main/java/net/wanji/databus/po/CrossLaneDataHistPOExt.java
View file @
288b7d9d
package
net
.
wanji
.
databus
.
po
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
...
...
@@ -15,5 +12,9 @@ public class CrossLaneDataHistPOExt extends CrossLaneDataRealTimePO{
private
Integer
dir
;
// 车道序号,从左车道开始编号11、12、13...
private
Integer
sort
;
// 时间占有率
private
Double
timeOccupancy
;
// 空间占有率即车辆负荷比
private
Double
vehicleNumsRatioMean
;
}
wj-databus/src/main/resources/mapper/CrossLaneDataHistMapper.xml
View file @
288b7d9d
...
...
@@ -95,7 +95,7 @@
<select
id=
"selectByCrossIdAndTimeSpan"
resultType=
"net.wanji.databus.po.CrossLaneDataHistPOExt"
>
SELECT t2.dir, t2.sort, t1.flow, t1.speed, t1.queue_length, t1.delay_time, t1.stop_times,
t1.vehhead_time, t1.batch_time
t1.vehhead_time, t1.batch_time
, t1.time_occupancy, t1.vehicle_nums_ratio_mean
FROM t_lane_data_hist t1 JOIN t_base_lane_info t2 ON t1.id = t2.id
where t1.cross_id = #{crossId}
and batch_time
<![CDATA[ >= ]]>
#{startTimeStamp}
...
...
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