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
65117180
Commit
65117180
authored
May 23, 2024
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[update] 添加车道id查询接口
parent
03a6d8f4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
0 deletions
+54
-0
TrendController.java
...c/main/java/net/wanji/opt/controller/TrendController.java
+12
-0
TrendService.java
...ice/src/main/java/net/wanji/opt/service/TrendService.java
+2
-0
TrendServiceImpl.java
...ain/java/net/wanji/opt/service/impl/TrendServiceImpl.java
+22
-0
LaneIdAliasNameVO.java
...ice/src/main/java/net/wanji/opt/vo/LaneIdAliasNameVO.java
+18
-0
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/controller/TrendController.java
View file @
65117180
...
...
@@ -326,4 +326,16 @@ public class TrendController {
List
<
HoloEventInfoPO
>
result
=
trendService
.
holoEvenList
(
crossIdDateTimeVO
);
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
);
}
}
\ No newline at end of file
signal-optimize-service/src/main/java/net/wanji/opt/service/TrendService.java
View file @
65117180
...
...
@@ -66,4 +66,6 @@ public interface TrendService {
List
<
AnalysisRidTurnIndicators
>
lanePeriodTurnData
(
LanePeriodTurnVO
lanePeriodTurnVO
)
throws
Exception
;
List
<
HoloEventInfoPO
>
holoEvenList
(
CommonCrossIdDateTimeVO
crossIdDateTimeVO
)
throws
Exception
;
List
<
LaneIdAliasNameVO
>
laneIdList
(
CommonCrossIdVO
commonCrossIdVO
)
throws
Exception
;
}
signal-optimize-service/src/main/java/net/wanji/opt/service/impl/TrendServiceImpl.java
View file @
65117180
...
...
@@ -2016,4 +2016,26 @@ public class TrendServiceImpl implements TrendService {
queryWrapper
.
between
(
HoloEventInfoPO:
:
getDetectTime
,
localDateTime1
,
localDateTime2
);
return
holoEventMapper
.
selectList
(
queryWrapper
);
}
@Override
public
List
<
LaneIdAliasNameVO
>
laneIdList
(
CommonCrossIdVO
commonCrossIdVO
)
throws
Exception
{
ArrayList
<
LaneIdAliasNameVO
>
laneIdAliasNameVOS
=
new
ArrayList
<>();
LambdaQueryWrapper
<
CrossBaseLaneInfoPO
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
CrossBaseLaneInfoPO:
:
getCrossId
,
commonCrossIdVO
.
getCrossId
());
List
<
CrossBaseLaneInfoPO
>
laneInfoPOS
=
crossBaseLaneInfoMapper
.
selectList
(
queryWrapper
);
if
(!
CollectionUtils
.
isEmpty
(
laneInfoPOS
))
{
for
(
CrossBaseLaneInfoPO
po
:
laneInfoPOS
)
{
LaneIdAliasNameVO
laneIdAliasNameVO
=
new
LaneIdAliasNameVO
();
String
laneId
=
po
.
getId
();
Integer
dir
=
po
.
getDir
();
Integer
turn
=
po
.
getTurn
();
String
dirName
=
BaseEnum
.
SignalDirectionEnum
.
getNameByCode
(
dir
);
String
turnName
=
TurnConvertEnum
.
getDescByKey
(
turn
);
laneIdAliasNameVO
.
setLaneId
(
laneId
);
laneIdAliasNameVO
.
setAliasName
(
String
.
join
(
"-"
,
po
.
getCrossId
(),
dirName
,
turnName
,
laneId
.
substring
(
laneId
.
length
()
-
2
)));
laneIdAliasNameVOS
.
add
(
laneIdAliasNameVO
);
}
}
return
laneIdAliasNameVOS
;
}
}
signal-optimize-service/src/main/java/net/wanji/opt/vo/LaneIdAliasNameVO.java
0 → 100644
View file @
65117180
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
;
}
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