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
a88921c6
Commit
a88921c6
authored
Aug 22, 2023
by
hanbing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[add] 新信号评价-运行评价-详细指标查询-范围下拉列表
parent
d2afa625
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
338 additions
and
19 deletions
+338
-19
MetricsDetailBO.java
...rvice/src/main/java/net/wanji/opt/bo/MetricsDetailBO.java
+30
-0
RunningEvaluateController.java
...a/net/wanji/opt/controller/RunningEvaluateController.java
+27
-3
RunningEvaluateService.java
...in/java/net/wanji/opt/service/RunningEvaluateService.java
+7
-3
RunningEvaluateServiceImpl.java
...et/wanji/opt/service/impl/RunningEvaluateServiceImpl.java
+94
-11
RunningEvaluateMetricsDetailVO.java
...java/net/wanji/opt/vo/RunningEvaluateMetricsDetailVO.java
+16
-0
RunningEvaluateScopeTreeVO.java
...ain/java/net/wanji/opt/vo/RunningEvaluateScopeTreeVO.java
+47
-0
TurnConvertEnum.java
...src/main/java/net/wanji/common/enums/TurnConvertEnum.java
+14
-1
BaseCrossDirInfoMapper.java
.../net/wanji/databus/dao/mapper/BaseCrossDirInfoMapper.java
+2
-0
BaseCrossTurnInfoMapper.java
...net/wanji/databus/dao/mapper/BaseCrossTurnInfoMapper.java
+12
-0
LaneInfoMapper.java
...ain/java/net/wanji/databus/dao/mapper/LaneInfoMapper.java
+2
-0
CrossTurnInfoPO.java
...s/src/main/java/net/wanji/databus/po/CrossTurnInfoPO.java
+38
-0
RunningEvaluateCrossListVO.java
...java/net/wanji/databus/vo/RunningEvaluateCrossListVO.java
+10
-1
BaseCrossDirInfoMapper.xml
...abus/src/main/resources/mapper/BaseCrossDirInfoMapper.xml
+10
-0
BaseCrossTurnInfoMapper.xml
...bus/src/main/resources/mapper/BaseCrossTurnInfoMapper.xml
+16
-0
LaneInfoMapper.xml
wj-databus/src/main/resources/mapper/LaneInfoMapper.xml
+13
-0
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/bo/MetricsDetailBO.java
0 → 100644
View file @
a88921c6
package
net
.
wanji
.
opt
.
bo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.Date
;
/**
* @author Kent HAN
* @date 2023/6/9 13:52
*/
@Data
@ApiModel
(
value
=
"MetricsDetailBO"
,
description
=
"详细指标查询输入参数"
)
public
class
MetricsDetailBO
{
@ApiModelProperty
(
value
=
"路口ID"
,
required
=
true
)
private
String
crossId
;
@ApiModelProperty
(
value
=
"进口方向:1北;2东北;3东;4东南;5南;6西南;7西;8西北"
)
private
Integer
dir
;
@ApiModelProperty
(
value
=
"转向:u掉头;l左转;s直行;r右转"
)
private
String
turn
;
@ApiModelProperty
(
name
=
"车道序号,从左车道开始编号11、12、13..."
)
private
Integer
laneSort
;
@ApiModelProperty
(
value
=
"日期,格式 M/d,如 7/17"
,
required
=
true
)
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"M/d"
,
timezone
=
"GMT+8"
)
private
Date
date
;
@ApiModelProperty
(
value
=
"对比时间间隔(分钟)"
,
required
=
true
)
private
Integer
minutes
;
}
signal-optimize-service/src/main/java/net/wanji/opt/controller/RunningEvaluateController.java
View file @
a88921c6
...
...
@@ -6,12 +6,12 @@ import io.swagger.annotations.ApiResponse;
import
io.swagger.annotations.ApiResponses
;
import
net.wanji.common.framework.rest.JsonViewObject
;
import
net.wanji.databus.bo.CrossIdAndStartEndDateBO
;
import
net.wanji.databus.bo.CrossIdBO
;
import
net.wanji.databus.vo.RunningEvaluateCrossListVO
;
import
net.wanji.opt.bo.CrossNameBO
;
import
net.wanji.opt.bo.MetricsDetailBO
;
import
net.wanji.opt.service.impl.RunningEvaluateServiceImpl
;
import
net.wanji.opt.vo.RunningEvaluateCrossEvaluateVO
;
import
net.wanji.opt.vo.RunningEvaluateIndexStatusVO
;
import
net.wanji.opt.vo.RunningEvaluateSchemeProblemsVO
;
import
net.wanji.opt.vo.*
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -108,4 +108,28 @@ public class RunningEvaluateController {
return
JsonViewObject
.
newInstance
().
success
(
res
);
}
@ApiOperation
(
value
=
"详细指标查询-范围下拉列表"
,
notes
=
"详细指标查询-范围下拉列表"
,
response
=
JsonViewObject
.
class
,
produces
=
MediaType
.
APPLICATION_JSON
,
consumes
=
MediaType
.
APPLICATION_JSON
)
@PostMapping
(
value
=
"/scopeTree"
,
produces
=
MediaType
.
APPLICATION_JSON
,
consumes
=
MediaType
.
APPLICATION_JSON
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
RunningEvaluateScopeTreeVO
.
class
),
})
public
JsonViewObject
scopeTree
(
@RequestBody
CrossIdBO
bo
)
{
RunningEvaluateScopeTreeVO
res
=
runningEvaluateService
.
scopeTree
(
bo
);
return
JsonViewObject
.
newInstance
().
success
(
res
);
}
@ApiOperation
(
value
=
"详细指标查询"
,
notes
=
"详细指标查询"
,
response
=
JsonViewObject
.
class
,
produces
=
MediaType
.
APPLICATION_JSON
,
consumes
=
MediaType
.
APPLICATION_JSON
)
@PostMapping
(
value
=
"/metricsDetail"
,
produces
=
MediaType
.
APPLICATION_JSON
,
consumes
=
MediaType
.
APPLICATION_JSON
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
RunningEvaluateMetricsDetailVO
.
class
),
})
public
JsonViewObject
schemeProblems
(
@RequestBody
MetricsDetailBO
bo
)
{
List
<
RunningEvaluateMetricsDetailVO
>
res
=
runningEvaluateService
.
metricsDetail
(
bo
);
return
JsonViewObject
.
newInstance
().
success
(
res
);
}
}
\ No newline at end of file
signal-optimize-service/src/main/java/net/wanji/opt/service/RunningEvaluateService.java
View file @
a88921c6
package
net
.
wanji
.
opt
.
service
;
import
net.wanji.databus.bo.CrossIdAndStartEndDateBO
;
import
net.wanji.databus.bo.CrossIdBO
;
import
net.wanji.databus.vo.RunningEvaluateCrossListVO
;
import
net.wanji.opt.bo.CrossNameBO
;
import
net.wanji.opt.vo.RunningEvaluateIndexStatusVO
;
import
net.wanji.opt.vo.RunningEvaluateCrossEvaluateVO
;
import
net.wanji.opt.vo.RunningEvaluateSchemeProblemsVO
;
import
net.wanji.opt.bo.MetricsDetailBO
;
import
net.wanji.opt.vo.*
;
import
java.util.List
;
...
...
@@ -21,4 +21,8 @@ public interface RunningEvaluateService {
List
<
RunningEvaluateIndexStatusVO
>
spilloverStatus
(
CrossIdAndStartEndDateBO
bo
);
List
<
RunningEvaluateSchemeProblemsVO
>
schemeProblems
(
CrossIdAndStartEndDateBO
bo
);
List
<
RunningEvaluateMetricsDetailVO
>
metricsDetail
(
MetricsDetailBO
bo
);
RunningEvaluateScopeTreeVO
scopeTree
(
CrossIdBO
bo
);
}
signal-optimize-service/src/main/java/net/wanji/opt/service/impl/RunningEvaluateServiceImpl.java
View file @
a88921c6
package
net
.
wanji
.
opt
.
service
.
impl
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
net.wanji.common.enums.CrossStatusEnum
;
import
net.wanji.common.enums.TurnConvertEnum
;
import
net.wanji.common.utils.tool.CrossUtil
;
import
net.wanji.common.utils.tool.TimeArrayUtil
;
import
net.wanji.databus.bo.CrossIdAndStartEndDateBO
;
import
net.wanji.databus.bo.CrossIdBO
;
import
net.wanji.databus.dao.entity.BaseCrossDirInfoPO
;
import
net.wanji.databus.dao.entity.BaseCrossSchemePO
;
import
net.wanji.databus.dao.entity.CrossSectionPO
;
import
net.wanji.databus.dao.mapper.BaseCrossSchemeMapper
;
import
net.wanji.databus.dao.mapper.BaseCrossSectionMapper
;
import
net.wanji.databus.dao.mapper.CrossDataHistMapper
;
import
net.wanji.databus.dao.mapper.CrossDataRealtimeMapper
;
import
net.wanji.databus.po.CrossDataHistPO
;
import
net.wanji.databus.po.CrossDataRealtimePO
;
import
net.wanji.databus.dao.mapper.*
;
import
net.wanji.databus.po.*
;
import
net.wanji.databus.vo.RunningEvaluateCrossListVO
;
import
net.wanji.opt.bo.CrossNameBO
;
import
net.wanji.opt.bo.MetricsDetailBO
;
import
net.wanji.opt.service.RunningEvaluateService
;
import
net.wanji.opt.vo.RunningEvaluateCrossEvaluateVO
;
import
net.wanji.opt.vo.RunningEvaluateIndexStatusVO
;
import
net.wanji.opt.vo.RunningEvaluateSchemeProblemsVO
;
import
net.wanji.opt.vo.*
;
import
org.jetbrains.annotations.NotNull
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.stereotype.Service
;
import
java.text.DecimalFormat
;
import
java.text.SimpleDateFormat
;
import
java.time.Instant
;
import
java.time.LocalDate
;
import
java.time.ZoneId
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
import
java.time.Instant
;
/**
* @author Kent HAN
...
...
@@ -44,15 +43,27 @@ public class RunningEvaluateServiceImpl implements RunningEvaluateService {
private
final
CrossDataHistMapper
crossDataHistMapper
;
private
final
BaseCrossSectionMapper
baseCrossSectionMapper
;
private
final
BaseCrossSchemeMapper
baseCrossSchemeMapper
;
private
final
BaseCrossDirInfoMapper
baseCrossDirInfoMapper
;
private
final
BaseCrossTurnInfoMapper
baseCrossTurnInfoMapper
;
private
final
LaneInfoMapper
laneInfoMapper
;
private
final
BaseCrossInfoMapper
baseCrossInfoMapper
;
public
RunningEvaluateServiceImpl
(
CrossDataRealtimeMapper
crossDataRealtimeMapper
,
CrossDataHistMapper
crossDataHistMapper
,
@Qualifier
(
"baseCrossSectionMapper"
)
BaseCrossSectionMapper
baseCrossSectionMapper
,
@Qualifier
(
"baseCrossSchemeMapper"
)
BaseCrossSchemeMapper
baseCrossSchemeMapper
)
{
@Qualifier
(
"baseCrossSchemeMapper"
)
BaseCrossSchemeMapper
baseCrossSchemeMapper
,
@Qualifier
(
"baseCrossDirInfoMapper"
)
BaseCrossDirInfoMapper
baseCrossDirInfoMapper
,
@Qualifier
(
"baseCrossTurnInfoMapper"
)
BaseCrossTurnInfoMapper
baseCrossTurnInfoMapper
,
@Qualifier
(
"laneInfoMapper"
)
LaneInfoMapper
laneInfoMapper
,
@Qualifier
(
"baseCrossInfoMapper"
)
BaseCrossInfoMapper
baseCrossInfoMapper
)
{
this
.
crossDataRealtimeMapper
=
crossDataRealtimeMapper
;
this
.
crossDataHistMapper
=
crossDataHistMapper
;
this
.
baseCrossSectionMapper
=
baseCrossSectionMapper
;
this
.
baseCrossSchemeMapper
=
baseCrossSchemeMapper
;
this
.
baseCrossDirInfoMapper
=
baseCrossDirInfoMapper
;
this
.
baseCrossTurnInfoMapper
=
baseCrossTurnInfoMapper
;
this
.
laneInfoMapper
=
laneInfoMapper
;
this
.
baseCrossInfoMapper
=
baseCrossInfoMapper
;
}
@Override
...
...
@@ -62,6 +73,13 @@ public class RunningEvaluateServiceImpl implements RunningEvaluateService {
for
(
RunningEvaluateCrossListVO
runningEvaluateCrossListVO
:
crossDataRealtimePOList
)
{
Double
sturation
=
runningEvaluateCrossListVO
.
getSturation
();
runningEvaluateCrossListVO
.
setServiceLevel
(
CrossUtil
.
getServiceLevel
(
sturation
));
// 路口经纬度
String
crossId
=
runningEvaluateCrossListVO
.
getCrossId
();
BaseCrossInfoPO
baseCrossInfoPO
=
baseCrossInfoMapper
.
selectById
(
crossId
);
String
location
=
baseCrossInfoPO
.
getLocation
();
double
[]
lonLat
=
CrossUtil
.
getLonLat
(
location
);
runningEvaluateCrossListVO
.
setLongitude
(
lonLat
[
0
]);
runningEvaluateCrossListVO
.
setLatitude
(
lonLat
[
1
]);
}
// 按服务水平降序排序
List
<
RunningEvaluateCrossListVO
>
res
=
crossDataRealtimePOList
.
stream
()
...
...
@@ -181,6 +199,71 @@ public class RunningEvaluateServiceImpl implements RunningEvaluateService {
return
res
;
}
@Override
public
List
<
RunningEvaluateMetricsDetailVO
>
metricsDetail
(
MetricsDetailBO
bo
)
{
return
null
;
}
@Override
public
RunningEvaluateScopeTreeVO
scopeTree
(
CrossIdBO
bo
)
{
String
crossId
=
bo
.
getCrossId
();
RunningEvaluateScopeTreeVO
runningEvaluateScopeTreeVO
=
new
RunningEvaluateScopeTreeVO
();
runningEvaluateScopeTreeVO
.
setCrossId
(
crossId
);
List
<
RunningEvaluateScopeTreeVO
.
DirVO
>
dirVOList
=
buildDirVOList
(
crossId
);
runningEvaluateScopeTreeVO
.
setChild
(
dirVOList
);
return
runningEvaluateScopeTreeVO
;
}
private
List
<
RunningEvaluateScopeTreeVO
.
DirVO
>
buildDirVOList
(
String
crossId
)
{
List
<
RunningEvaluateScopeTreeVO
.
DirVO
>
res
=
new
ArrayList
<>();
Integer
type
=
1
;
// 进口
List
<
BaseCrossDirInfoPO
>
baseCrossDirInfoPOList
=
baseCrossDirInfoMapper
.
selectByCrossIdAndInOutType
(
crossId
,
type
);
for
(
BaseCrossDirInfoPO
baseCrossDirInfoPO
:
baseCrossDirInfoPOList
)
{
RunningEvaluateScopeTreeVO
.
DirVO
dirVO
=
new
RunningEvaluateScopeTreeVO
.
DirVO
();
Integer
dir
=
baseCrossDirInfoPO
.
getDirType
();
dirVO
.
setDir
(
dir
);
List
<
RunningEvaluateScopeTreeVO
.
TurnVO
>
turnVOList
=
buildTurnVOList
(
crossId
,
dir
);
dirVO
.
setChild
(
turnVOList
);
res
.
add
(
dirVO
);
}
return
res
;
}
private
List
<
RunningEvaluateScopeTreeVO
.
TurnVO
>
buildTurnVOList
(
String
crossId
,
Integer
dir
)
{
List
<
RunningEvaluateScopeTreeVO
.
TurnVO
>
res
=
new
ArrayList
<>();
List
<
CrossTurnInfoPO
>
crossTurnInfoPOList
=
baseCrossTurnInfoMapper
.
selectByCrossIdAndDir
(
crossId
,
dir
);
for
(
CrossTurnInfoPO
crossTurnInfoPO
:
crossTurnInfoPOList
)
{
RunningEvaluateScopeTreeVO
.
TurnVO
turnVO
=
new
RunningEvaluateScopeTreeVO
.
TurnVO
();
String
turnType
=
crossTurnInfoPO
.
getTurnType
();
turnVO
.
setTurn
(
turnType
);
List
<
RunningEvaluateScopeTreeVO
.
LaneVO
>
laneVOList
=
buildLaneVOList
(
crossId
,
dir
,
turnType
);
turnVO
.
setChild
(
laneVOList
);
res
.
add
(
turnVO
);
}
return
res
;
}
private
List
<
RunningEvaluateScopeTreeVO
.
LaneVO
>
buildLaneVOList
(
String
crossId
,
Integer
dir
,
String
turnType
)
{
List
<
RunningEvaluateScopeTreeVO
.
LaneVO
>
res
=
new
ArrayList
<>();
List
<
Integer
>
keyList
=
TurnConvertEnum
.
getKeyListBySingleCode
(
turnType
);
Integer
type
=
2
;
// 进口
if
(
ObjectUtil
.
isNotEmpty
(
keyList
))
{
List
<
LaneInfoPO
>
laneInfoPOList
=
laneInfoMapper
.
selectByTurnType
(
crossId
,
type
,
dir
,
keyList
);
for
(
LaneInfoPO
laneInfoPO
:
laneInfoPOList
)
{
RunningEvaluateScopeTreeVO
.
LaneVO
laneVO
=
new
RunningEvaluateScopeTreeVO
.
LaneVO
();
Integer
sort
=
laneInfoPO
.
getSort
();
laneVO
.
setLaneSort
(
sort
);
res
.
add
(
laneVO
);
}
}
return
res
;
}
private
List
<
RunningEvaluateSchemeProblemsVO
.
DateAndScheme
>
buildDateAndSchemeList
(
List
<
CrossDataHistPO
>
uniqueList
,
String
crossId
)
{
List
<
RunningEvaluateSchemeProblemsVO
.
DateAndScheme
>
res
=
new
ArrayList
<>();
...
...
signal-optimize-service/src/main/java/net/wanji/opt/vo/RunningEvaluateMetricsDetailVO.java
0 → 100644
View file @
a88921c6
package
net
.
wanji
.
opt
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @author Kent HAN
* @date 2023/2/9 8:38
*/
@Data
@NoArgsConstructor
@ApiModel
(
value
=
"RunningEvaluateMetricsDetailVO"
,
description
=
"评价指标查询返回值"
)
public
class
RunningEvaluateMetricsDetailVO
{
}
signal-optimize-service/src/main/java/net/wanji/opt/vo/RunningEvaluateScopeTreeVO.java
0 → 100644
View file @
a88921c6
package
net
.
wanji
.
opt
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.List
;
/**
* @author Kent HAN
* @date 2023/2/9 8:38
*/
@Data
@NoArgsConstructor
@ApiModel
(
value
=
"RunningEvaluateScopeTreeVO"
,
description
=
"详细指标查询-范围下拉列表"
)
public
class
RunningEvaluateScopeTreeVO
{
@ApiModelProperty
(
value
=
"路口ID"
)
private
String
crossId
;
@ApiModelProperty
(
value
=
"方向列表"
)
private
List
<
DirVO
>
child
;
@NoArgsConstructor
@Data
public
static
class
DirVO
{
@ApiModelProperty
(
value
=
"方向:1北;2东北;3东;4东南;5南;6西南;7西;8西北"
)
private
Integer
dir
;
@ApiModelProperty
(
value
=
"转向列表"
)
private
List
<
TurnVO
>
child
;
}
@NoArgsConstructor
@Data
public
static
class
TurnVO
{
@ApiModelProperty
(
value
=
"转向:u掉头;l左转;s直行;r右转"
)
private
String
turn
;
@ApiModelProperty
(
value
=
"车道列表"
)
private
List
<
LaneVO
>
child
;
}
@NoArgsConstructor
@Data
public
static
class
LaneVO
{
@ApiModelProperty
(
name
=
"车道序号,从左车道开始编号11、12、13..."
)
private
Integer
laneSort
;
}
}
wj-common/src/main/java/net/wanji/common/enums/TurnConvertEnum.java
View file @
a88921c6
package
net
.
wanji
.
common
.
enums
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* @author hfx
* @date 2023/1/28 18:03
...
...
@@ -71,11 +74,21 @@ public enum TurnConvertEnum {
public
static
String
getDescByCode
(
String
code
){
for
(
TurnConvertEnum
e
:
TurnConvertEnum
.
values
())
{
if
(
e
.
code
.
equal
s
(
code
)){
if
(
e
.
code
.
contain
s
(
code
)){
return
e
.
desc
;
}
}
return
null
;
}
public
static
List
<
Integer
>
getKeyListBySingleCode
(
String
singleCode
){
List
<
Integer
>
res
=
new
ArrayList
<>();
for
(
TurnConvertEnum
e
:
TurnConvertEnum
.
values
())
{
if
(
e
.
code
.
contains
(
singleCode
)){
res
.
add
(
e
.
key
);
}
}
return
res
;
}
}
wj-databus/src/main/java/net/wanji/databus/dao/mapper/BaseCrossDirInfoMapper.java
View file @
a88921c6
...
...
@@ -18,4 +18,6 @@ public interface BaseCrossDirInfoMapper {
BaseCrossDirInfoPO
selectByCrossIdAndDirType
(
String
crossId
,
Integer
key
);
List
<
BaseCrossDirInfoPO
>
selectByCrossId
(
String
crossId
);
List
<
BaseCrossDirInfoPO
>
selectByCrossIdAndInOutType
(
String
crossId
,
Integer
type
);
}
wj-databus/src/main/java/net/wanji/databus/dao/mapper/BaseCrossTurnInfoMapper.java
0 → 100644
View file @
a88921c6
package
net
.
wanji
.
databus
.
dao
.
mapper
;
import
net.wanji.databus.po.CrossTurnInfoPO
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
@Repository
public
interface
BaseCrossTurnInfoMapper
{
List
<
CrossTurnInfoPO
>
selectByCrossIdAndDir
(
String
crossId
,
Integer
dir
);
}
wj-databus/src/main/java/net/wanji/databus/dao/mapper/LaneInfoMapper.java
View file @
a88921c6
...
...
@@ -35,4 +35,6 @@ public interface LaneInfoMapper {
String
selectPreId
(
String
crossId
,
Integer
dir
);
List
<
LaneInfoPO
>
listLaneInfo
();
List
<
LaneInfoPO
>
selectByTurnType
(
String
crossId
,
Integer
type
,
Integer
dir
,
List
<
Integer
>
keyList
);
}
signal-optimize-service/src/main/java/net/wanji/opt/po/base
/CrossTurnInfoPO.java
→
wj-databus/src/main/java/net/wanji/databus/po
/CrossTurnInfoPO.java
View file @
a88921c6
package
net
.
wanji
.
opt
.
po
.
base
;
package
net
.
wanji
.
databus
.
po
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.Date
;
/**
* @author hfx
* @date 2023/1/12 13:37
...
...
@@ -11,19 +13,26 @@ import lombok.Data;
@Data
public
class
CrossTurnInfoPO
{
@ApiModelProperty
(
name
=
"转向ID"
,
notes
=
""
)
private
String
turnId
;
/** 转向ID(路口ID_驶入方向_转向类型) */
@ApiModelProperty
(
name
=
"转向ID(路口ID_驶入方向_转向类型)"
,
notes
=
""
)
private
String
id
;
/** 转向类型:u掉头;l左转;s直行;r右转; */
@ApiModelProperty
(
name
=
"转向类型:u掉头;l左转;s直行;r右转;"
,
notes
=
""
)
private
Integer
turnType
;
private
String
turnType
;
/** 驶入方向:1北;2东北;3东;4东南;5南;6西南;7西;8西北 */
@ApiModelProperty
(
name
=
"驶入方向:1北;2东北;3东;4东南;5南;6西南;7西;8西北"
,
notes
=
""
)
private
Integer
inDir
;
private
Integer
inDir
;
/** 驶出方向:1北;2东北;3东;4东南;5南;6西南;7西;8西北 */
@ApiModelProperty
(
name
=
"驶出方向:1北;2东北;3东;4东南;5南;6西南;7西;8西北"
,
notes
=
""
)
private
Integer
outDir
;
private
Integer
outDir
;
/** 路口ID */
@ApiModelProperty
(
name
=
"路口ID"
,
notes
=
""
)
private
String
crossId
;
private
String
crossId
;
/** 创建时间 */
@ApiModelProperty
(
name
=
"创建时间"
,
notes
=
""
)
private
Date
gmtCreate
;
/** 修改时间 */
@ApiModelProperty
(
name
=
"修改时间"
,
notes
=
""
)
private
Date
gmtModified
;
}
wj-databus/src/main/java/net/wanji/databus/vo/RunningEvaluateCrossListVO.java
View file @
a88921c6
...
...
@@ -17,12 +17,21 @@ public class RunningEvaluateCrossListVO {
@ApiModelProperty
(
value
=
"路口ID"
)
private
String
crossId
;
@ApiModelProperty
(
value
=
"路口名称"
)
private
String
crossName
;
@ApiModelProperty
(
name
=
"饱和度"
)
@JsonIgnore
private
Double
sturation
;
@ApiModelProperty
(
value
=
"服务水平"
)
String
serviceLevel
;
private
String
serviceLevel
;
@ApiModelProperty
(
value
=
"路口经度"
)
private
Double
longitude
;
@ApiModelProperty
(
value
=
"路口纬度"
)
private
Double
latitude
;
}
wj-databus/src/main/resources/mapper/BaseCrossDirInfoMapper.xml
View file @
a88921c6
...
...
@@ -2,6 +2,10 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"net.wanji.databus.dao.mapper.BaseCrossDirInfoMapper"
>
<sql
id=
"baseColumnList"
>
id,dir_type,in_out_type,cross_id,length,is_pedestrian,gmt_create,gmt_modified
</sql>
<select
id=
"selectInDirsByCrossId"
resultType=
"java.lang.Integer"
>
SELECT dir_type
FROM t_base_cross_dir_info
...
...
@@ -22,4 +26,10 @@
where cross_id = #{crossId}
</select>
<select
id=
"selectByCrossIdAndInOutType"
resultType=
"net.wanji.databus.dao.entity.BaseCrossDirInfoPO"
>
select
<include
refid=
"baseColumnList"
></include>
from t_base_cross_dir_info
where cross_id = #{crossId} and in_out_type = #{type}
</select>
</mapper>
wj-databus/src/main/resources/mapper/BaseCrossTurnInfoMapper.xml
0 → 100644
View file @
a88921c6
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"net.wanji.databus.dao.mapper.BaseCrossTurnInfoMapper"
>
<sql
id=
"baseColumnList"
>
id,turn_type,in_dir,out_dir,cross_id,gmt_create,gmt_modified
</sql>
<select
id=
"selectByCrossIdAndDir"
resultType=
"net.wanji.databus.po.CrossTurnInfoPO"
>
select
<include
refid=
"baseColumnList"
></include>
from t_base_cross_turn_info
where cross_id = #{crossId} and in_dir = #{dir}
</select>
</mapper>
wj-databus/src/main/resources/mapper/LaneInfoMapper.xml
View file @
a88921c6
...
...
@@ -20,6 +20,10 @@
<result
property=
"gmtModified"
column=
"gmt_modified"
/>
</resultMap>
<sql
id=
"baseColumnList"
>
id,code,sort,type,dir,turn,category,cross_id,rid,length,width,wkt,gmt_create,gmt_modified
</sql>
<insert
id=
"insertBatch"
>
insert into t_base_lane_info(id,code,sort,type,dir,turn,category,cross_id,rid,length,width,wkt)
values
...
...
@@ -104,4 +108,13 @@
</if>
</select>
<select
id=
"selectByTurnType"
resultType=
"net.wanji.databus.po.LaneInfoPO"
>
select
<include
refid=
"baseColumnList"
></include>
from t_base_lane_info
where cross_id = #{crossId} and type = #{type} and dir = #{dir} and turn in
<foreach
collection=
"keyList"
item=
"key"
separator=
","
open=
"("
close=
")"
>
#{key}
</foreach>
</select>
</mapper>
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