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
5af88d05
Commit
5af88d05
authored
Apr 10, 2025
by
duwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
转向接口优化
parent
9e513323
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
TrendController.java
...c/main/java/net/wanji/opt/controller/TrendController.java
+18
-0
LanePeriodTurnVO.java
...vice/src/main/java/net/wanji/opt/vo/LanePeriodTurnVO.java
+8
-0
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/controller/TrendController.java
View file @
5af88d05
...
...
@@ -4,6 +4,7 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiResponse
;
import
io.swagger.annotations.ApiResponses
;
import
net.wanji.common.enums.TurnConvertEnum
;
import
net.wanji.common.framework.rest.JsonViewObject
;
import
net.wanji.databus.bo.CrossIdBO
;
import
net.wanji.databus.vo.GreenwaveListVO
;
...
...
@@ -309,6 +310,23 @@ public class TrendController {
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
AnalysisRidTurnIndicators
.
class
),
})
public
JsonViewObject
lanePeriodTurnData
(
@RequestBody
LanePeriodTurnVO
lanePeriodTurnVO
)
throws
Exception
{
String
turns
=
lanePeriodTurnVO
.
getTurns
();
if
(
turns
!=
null
){
StringBuilder
inDir
=
new
StringBuilder
();
StringBuilder
turnType
=
new
StringBuilder
();
String
[]
turnArr
=
turns
.
split
(
","
);
for
(
int
i
=
0
;
i
<
turnArr
.
length
;
i
++){
String
[]
s
=
turnArr
[
i
].
split
(
"-"
);
if
(
i
<
turnArr
.
length
-
1
)
{
inDir
.
append
(
s
[
0
]).
append
(
","
);
String
t
=
TurnConvertEnum
.
getCodeByKey
(
Integer
.
parseInt
(
s
[
0
]));
turnType
.
append
(
t
).
append
(
","
);
}
}
lanePeriodTurnVO
.
setInDir
(
inDir
.
toString
());
lanePeriodTurnVO
.
setTurnType
(
turnType
.
toString
());
}
List
<
CrossingTurnQueryVO
.
CycleDataElement
>
result
=
trendService
.
lanePeriodTurnData
(
lanePeriodTurnVO
);
return
JsonViewObject
.
newInstance
().
success
(
result
);
}
...
...
signal-optimize-service/src/main/java/net/wanji/opt/vo/LanePeriodTurnVO.java
View file @
5af88d05
...
...
@@ -17,6 +17,14 @@ import java.util.List;
public
class
LanePeriodTurnVO
extends
CommonCrossIdDateTimeVO
{
@ApiModelProperty
(
value
=
"分析粒度【5m:五分钟 10m:10分钟 30m:30分钟 1h:一小时】"
)
private
String
granularity
;
/**
* 方向-转向
* 例:1-1(北-左转)
*/
@ApiModelProperty
(
value
=
"方向-转向"
)
private
String
turns
;
/**
* 用逗号分隔
*/
...
...
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