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
8fafabbc
Commit
8fafabbc
authored
May 27, 2024
by
hanbing
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
900b7da2
b1499500
Changes
13
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
207 additions
and
71 deletions
+207
-71
TrendController.java
...c/main/java/net/wanji/opt/controller/TrendController.java
+16
-4
AnalysisRidTurnIndicators.java
...ava/net/wanji/opt/po/trend/AnalysisRidTurnIndicators.java
+1
-1
TrendService.java
...ice/src/main/java/net/wanji/opt/service/TrendService.java
+4
-2
LaneSnapshotDataQueryService.java
...et/wanji/opt/service/es/LaneSnapshotDataQueryService.java
+1
-1
TrendServiceImpl.java
...ain/java/net/wanji/opt/service/impl/TrendServiceImpl.java
+112
-56
CommonCrossIdDateTimeVO.java
...c/main/java/net/wanji/opt/vo/CommonCrossIdDateTimeVO.java
+1
-1
HoloEventVO.java
...e-service/src/main/java/net/wanji/opt/vo/HoloEventVO.java
+16
-0
LaneIdAliasNameVO.java
...ice/src/main/java/net/wanji/opt/vo/LaneIdAliasNameVO.java
+18
-0
LaneSnapshotIndexVO.java
...e/src/main/java/net/wanji/opt/vo/LaneSnapshotIndexVO.java
+30
-0
TableQueryVO.java
...-service/src/main/java/net/wanji/opt/vo/TableQueryVO.java
+3
-0
CrossLaneDataHistPOExt.java
...ain/java/net/wanji/databus/po/CrossLaneDataHistPOExt.java
+0
-4
CrossLaneDataRealTimePO.java
...in/java/net/wanji/databus/po/CrossLaneDataRealTimePO.java
+2
-0
CrossLaneDataHistMapper.xml
...bus/src/main/resources/mapper/CrossLaneDataHistMapper.xml
+3
-2
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/controller/TrendController.java
View file @
8fafabbc
...
@@ -298,8 +298,8 @@ public class TrendController {
...
@@ -298,8 +298,8 @@ public class TrendController {
@ApiResponses
({
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
TableQueryVO
.
RealTimeDataElement
.
class
),
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
TableQueryVO
.
RealTimeDataElement
.
class
),
})
})
public
JsonViewObject
laneSnapshotIndex
(
@RequestBody
CommonCrossIdDateTimeVO
crossIdDateTime
VO
)
throws
Exception
{
public
JsonViewObject
laneSnapshotIndex
(
@RequestBody
LaneSnapshotIndexVO
laneSnapshotIndex
VO
)
throws
Exception
{
List
<
TableQueryVO
.
RealTimeDataElement
>
result
=
trendService
.
laneSnapshotIndex
(
crossIdDateTime
VO
);
List
<
TableQueryVO
.
RealTimeDataElement
>
result
=
trendService
.
laneSnapshotIndex
(
laneSnapshotIndex
VO
);
return
JsonViewObject
.
newInstance
().
success
(
result
);
return
JsonViewObject
.
newInstance
().
success
(
result
);
}
}
...
@@ -322,8 +322,20 @@ public class TrendController {
...
@@ -322,8 +322,20 @@ public class TrendController {
@ApiResponses
({
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
HoloEventInfoPO
.
class
),
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
HoloEventInfoPO
.
class
),
})
})
public
JsonViewObject
holoEvenList
(
@RequestBody
CommonCrossIdDateTimeVO
crossIdDateTimeVO
)
throws
Exception
{
public
JsonViewObject
holoEvenList
(
@RequestBody
HoloEventVO
holoEventVO
)
throws
Exception
{
List
<
HoloEventInfoPO
>
result
=
trendService
.
holoEvenList
(
crossIdDateTimeVO
);
List
<
HoloEventInfoPO
>
result
=
trendService
.
holoEvenList
(
holoEventVO
);
return
JsonViewObject
.
newInstance
().
success
(
result
);
}
@ApiOperation
(
value
=
"车道查询列表"
,
notes
=
"车道查询列表"
,
response
=
JsonViewObject
.
class
,
produces
=
MediaType
.
APPLICATION_JSON
,
consumes
=
MediaType
.
APPLICATION_JSON
)
@PostMapping
(
value
=
"/laneIdList"
,
produces
=
MediaType
.
APPLICATION_JSON
,
consumes
=
MediaType
.
APPLICATION_JSON
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
LaneIdAliasNameVO
.
class
),
})
public
JsonViewObject
laneIdList
(
@RequestBody
CommonCrossIdVO
commonCrossIdVO
)
throws
Exception
{
List
<
LaneIdAliasNameVO
>
result
=
trendService
.
laneIdList
(
commonCrossIdVO
);
return
JsonViewObject
.
newInstance
().
success
(
result
);
return
JsonViewObject
.
newInstance
().
success
(
result
);
}
}
}
}
\ No newline at end of file
signal-optimize-service/src/main/java/net/wanji/opt/po/trend/AnalysisRidTurnIndicators.java
View file @
8fafabbc
...
@@ -16,7 +16,7 @@ import java.util.Date;
...
@@ -16,7 +16,7 @@ import java.util.Date;
@Data
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@EqualsAndHashCode
(
callSuper
=
false
)
@TableName
(
"t_analysis_rid_turn_indicators"
)
@TableName
(
"t_analysis_rid_turn_indicators"
)
@ApiModel
(
value
=
"AnalysisRidTurnIndicators"
,
description
=
""
)
@ApiModel
(
value
=
"AnalysisRidTurnIndicators"
,
description
=
"
通过航向角计算方向转向流量排队数据
"
)
public
class
AnalysisRidTurnIndicators
implements
Serializable
{
public
class
AnalysisRidTurnIndicators
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
...
signal-optimize-service/src/main/java/net/wanji/opt/service/TrendService.java
View file @
8fafabbc
...
@@ -61,9 +61,11 @@ public interface TrendService {
...
@@ -61,9 +61,11 @@ public interface TrendService {
List
<
TableQueryVO
.
CycleDataElement
>
laneTrafficIndex
(
CommonCrossIdDateTimeVO
crossIdDateTimeVO
)
throws
Exception
;
List
<
TableQueryVO
.
CycleDataElement
>
laneTrafficIndex
(
CommonCrossIdDateTimeVO
crossIdDateTimeVO
)
throws
Exception
;
List
<
TableQueryVO
.
RealTimeDataElement
>
laneSnapshotIndex
(
CommonCrossIdDateTimeVO
crossIdDateTime
VO
)
throws
Exception
;
List
<
TableQueryVO
.
RealTimeDataElement
>
laneSnapshotIndex
(
LaneSnapshotIndexVO
laneSnapshotIndex
VO
)
throws
Exception
;
List
<
AnalysisRidTurnIndicators
>
lanePeriodTurnData
(
LanePeriodTurnVO
lanePeriodTurnVO
)
throws
Exception
;
List
<
AnalysisRidTurnIndicators
>
lanePeriodTurnData
(
LanePeriodTurnVO
lanePeriodTurnVO
)
throws
Exception
;
List
<
HoloEventInfoPO
>
holoEvenList
(
CommonCrossIdDateTimeVO
crossIdDateTimeVO
)
throws
Exception
;
List
<
HoloEventInfoPO
>
holoEvenList
(
HoloEventVO
holoEventVO
)
throws
Exception
;
List
<
LaneIdAliasNameVO
>
laneIdList
(
CommonCrossIdVO
commonCrossIdVO
)
throws
Exception
;
}
}
signal-optimize-service/src/main/java/net/wanji/opt/service/es/LaneSnapshotDataQueryService.java
View file @
8fafabbc
...
@@ -63,7 +63,7 @@ public class LaneSnapshotDataQueryService implements LaneSnapshotService {
...
@@ -63,7 +63,7 @@ public class LaneSnapshotDataQueryService implements LaneSnapshotService {
searchSourceBuilder
searchSourceBuilder
.
query
(
boolQuery
)
.
query
(
boolQuery
)
.
from
(
pageNum
)
.
from
(
pageNum
*
500
)
.
size
((
pageNum
+
1
)
*
500
);
.
size
((
pageNum
+
1
)
*
500
);
searchRequest
.
source
(
searchSourceBuilder
);
searchRequest
.
source
(
searchSourceBuilder
);
...
...
signal-optimize-service/src/main/java/net/wanji/opt/service/impl/TrendServiceImpl.java
View file @
8fafabbc
This diff is collapsed.
Click to expand it.
signal-optimize-service/src/main/java/net/wanji/opt/vo/CommonCrossIdDateTimeVO.java
View file @
8fafabbc
...
@@ -17,7 +17,7 @@ import java.util.Date;
...
@@ -17,7 +17,7 @@ import java.util.Date;
@Data
@Data
@NoArgsConstructor
@NoArgsConstructor
@ApiModel
(
value
=
"CommonCrossIdDateTimeVO"
)
@ApiModel
(
value
=
"CommonCrossIdDateTimeVO"
)
public
class
CommonCrossIdDateTimeVO
extends
PageNumVO
{
public
class
CommonCrossIdDateTimeVO
{
@ApiModelProperty
(
value
=
"路口ID"
)
@ApiModelProperty
(
value
=
"路口ID"
)
@NotBlank
(
message
=
"路口编号不能为空"
)
@NotBlank
(
message
=
"路口编号不能为空"
)
private
String
crossId
;
private
String
crossId
;
...
...
signal-optimize-service/src/main/java/net/wanji/opt/vo/HoloEventVO.java
0 → 100644
View file @
8fafabbc
package
net
.
wanji
.
opt
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @author duanruiming
* @date 2024/05/24 8:57
*/
@Data
@ApiModel
(
value
=
"HoloEventVO"
,
description
=
"全息事件查询实体"
)
public
class
HoloEventVO
extends
CommonCrossIdDateTimeVO
{
@ApiModelProperty
(
value
=
"事件类型"
)
private
String
types
;
}
signal-optimize-service/src/main/java/net/wanji/opt/vo/LaneIdAliasNameVO.java
0 → 100644
View file @
8fafabbc
package
net
.
wanji
.
opt
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @author duanruiming
* @date 2024/05/23 9:28
*/
@Data
@ApiModel
(
value
=
"LaneIdAliasNameVO"
,
description
=
"车道名称实体"
)
public
class
LaneIdAliasNameVO
{
@ApiModelProperty
(
value
=
"车道编号"
)
private
String
laneId
;
@ApiModelProperty
(
value
=
"车道别名"
)
private
String
aliasName
;
}
signal-optimize-service/src/main/java/net/wanji/opt/vo/LaneSnapshotIndexVO.java
0 → 100644
View file @
8fafabbc
package
net
.
wanji
.
opt
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.util.Date
;
/**
* @author duanruiming
* @date 2024/05/23 10:17
*/
@Data
@ApiModel
(
value
=
"LaneSnapshotIndexVO"
,
description
=
"车道快照请求体"
)
public
class
LaneSnapshotIndexVO
extends
PageNumVO
{
@ApiModelProperty
(
value
=
"路口ID"
)
@NotBlank
(
message
=
"路口编号不能为空"
)
private
String
crossId
;
@ApiModelProperty
(
value
=
"开始时间"
)
@NotNull
(
message
=
"开始日期不能为空"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
start
;
@ApiModelProperty
(
value
=
"结束时间"
)
@NotNull
(
message
=
"结束时间不能为空"
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
end
;
}
signal-optimize-service/src/main/java/net/wanji/opt/vo/TableQueryVO.java
View file @
8fafabbc
...
@@ -72,6 +72,9 @@ public class TableQueryVO {
...
@@ -72,6 +72,9 @@ public class TableQueryVO {
@ApiModelProperty
(
value
=
"队尾距离(米)"
)
@ApiModelProperty
(
value
=
"队尾距离(米)"
)
private
double
teamTailDistance
;
private
double
teamTailDistance
;
@ApiModelProperty
(
value
=
"车头间距方差>车道内空间占有率"
)
private
double
stdSpaceHeadway
;
}
}
@NoArgsConstructor
@NoArgsConstructor
...
...
wj-databus/src/main/java/net/wanji/databus/po/CrossLaneDataHistPOExt.java
View file @
8fafabbc
...
@@ -12,10 +12,6 @@ public class CrossLaneDataHistPOExt extends CrossLaneDataRealTimePO{
...
@@ -12,10 +12,6 @@ public class CrossLaneDataHistPOExt extends CrossLaneDataRealTimePO{
private
Integer
dir
;
private
Integer
dir
;
// 车道序号,从左车道开始编号11、12、13...
// 车道序号,从左车道开始编号11、12、13...
private
Integer
sort
;
private
Integer
sort
;
// 时间占有率
private
Double
timeOccupancy
;
// 空间占有率即车辆负荷比
private
Double
vehicleNumsRatioMean
;
// 转向
// 转向
private
Integer
turn
;
private
Integer
turn
;
...
...
wj-databus/src/main/java/net/wanji/databus/po/CrossLaneDataRealTimePO.java
View file @
8fafabbc
package
net
.
wanji
.
databus
.
po
;
package
net
.
wanji
.
databus
.
po
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
...
@@ -72,6 +73,7 @@ public class CrossLaneDataRealTimePO {
...
@@ -72,6 +73,7 @@ public class CrossLaneDataRealTimePO {
@ApiModelProperty
(
value
=
"非机动车流量"
,
notes
=
""
)
@ApiModelProperty
(
value
=
"非机动车流量"
,
notes
=
""
)
private
int
nonMotorFlow
;
private
int
nonMotorFlow
;
@ApiModelProperty
(
value
=
"85位速度(km/h)"
,
notes
=
""
)
@ApiModelProperty
(
value
=
"85位速度(km/h)"
,
notes
=
""
)
@TableField
(
value
=
"v_85"
)
private
double
v85
;
private
double
v85
;
@ApiModelProperty
(
value
=
"大车流量"
,
notes
=
""
)
@ApiModelProperty
(
value
=
"大车流量"
,
notes
=
""
)
private
int
trafficFlowA
;
private
int
trafficFlowA
;
...
...
wj-databus/src/main/resources/mapper/CrossLaneDataHistMapper.xml
View file @
8fafabbc
...
@@ -103,8 +103,9 @@
...
@@ -103,8 +103,9 @@
</select>
</select>
<select
id=
"selectByCrossIdAndTimeSpan"
resultType=
"net.wanji.databus.po.CrossLaneDataHistPOExt"
>
<select
id=
"selectByCrossIdAndTimeSpan"
resultType=
"net.wanji.databus.po.CrossLaneDataHistPOExt"
>
SELECT t1.id, t2.dir, t2.sort, t1.flow, t1.speed, t1.queue_length, t1.delay_time, t1.stop_times,
SELECT t1.id, t2.dir,t2.turn, t2.sort, t1.flow, t1.speed, t1.queue_length, t1.delay_time, t1.stop_times,
t1.vehhead_time, t1.batch_time, t1.time_occupancy, t1.vehicle_nums_ratio_mean, t1.start_time
t1.vehhead_time, t1.batch_time, t1.time_occupancy, t1.vehicle_nums_ratio_mean, t1.start_time,
t1.traffic_flow_A, t1.traffic_flow_B, t1.traffic_flow_C,t1.v_85, t1.non_motor_flow, t1.time_occupancy
FROM t_lane_data_hist t1 JOIN t_base_lane_info t2 ON t1.id = t2.id
FROM t_lane_data_hist t1 JOIN t_base_lane_info t2 ON t1.id = t2.id
where t1.cross_id = #{crossId}
where t1.cross_id = #{crossId}
and batch_time
<![CDATA[ >= ]]>
#{startTimeStamp}
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