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
bf8a679a
Commit
bf8a679a
authored
Feb 15, 2025
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[add] 增加策略恢复接口
parent
2366e1f4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
1 deletion
+41
-1
StrategyControlController.java
...i/opt/synthesis/controller/StrategyControlController.java
+12
-0
StrategyControlService.java
...t/wanji/opt/synthesis/service/StrategyControlService.java
+2
-0
StrategyControlServiceImpl.java
...pt/synthesis/service/impl/StrategyControlServiceImpl.java
+24
-0
StrategyLockSendVO.java
...ce/src/main/java/net/wanji/opt/vo/StrategyLockSendVO.java
+3
-1
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/synthesis/controller/StrategyControlController.java
View file @
bf8a679a
...
...
@@ -166,6 +166,18 @@ public class StrategyControlController {
return
strategyControlService
.
strategyLockSend
(
strategyLockSendVO
);
}
@ApiOperation
(
value
=
"策略管理-路口详情-策略恢复"
,
notes
=
"策略管理-路口详情-策略恢复"
,
response
=
JsonViewObject
.
class
,
produces
=
MediaType
.
APPLICATION_JSON
,
consumes
=
MediaType
.
APPLICATION_JSON
)
@PostMapping
(
value
=
"/strategyLockRecoverSend"
,
produces
=
MediaType
.
APPLICATION_JSON
,
consumes
=
MediaType
.
APPLICATION_JSON
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
StrategyNameCrossVO
.
class
),
})
public
JsonViewObject
strategyLockRecoverSend
(
@RequestBody
StrategyLockSendVO
strategyLockSendVO
)
throws
Exception
{
return
strategyControlService
.
strategyLockRecoverSend
(
strategyLockSendVO
);
}
@ApiOperation
(
value
=
"策略管理-路口详情-优化策略查询"
,
notes
=
"策略管理-路口详情-优化策略查询"
,
response
=
JsonViewObject
.
class
,
produces
=
MediaType
.
APPLICATION_JSON
,
consumes
=
MediaType
.
APPLICATION_JSON
)
...
...
signal-optimize-service/src/main/java/net/wanji/opt/synthesis/service/StrategyControlService.java
View file @
bf8a679a
...
...
@@ -42,4 +42,6 @@ public interface StrategyControlService {
JsonViewObject
strategyNameCrossInfo
(
String
crossId
)
throws
Exception
;
JsonViewObject
strategyLockSend
(
StrategyLockSendVO
strategyLockSendVO
)
throws
Exception
;
JsonViewObject
strategyLockRecoverSend
(
StrategyLockSendVO
strategyLockSendVO
)
throws
Exception
;
}
signal-optimize-service/src/main/java/net/wanji/opt/synthesis/service/impl/StrategyControlServiceImpl.java
View file @
bf8a679a
...
...
@@ -1226,8 +1226,32 @@ public class StrategyControlServiceImpl implements StrategyControlService {
@Override
public
JsonViewObject
strategyLockSend
(
StrategyLockSendVO
strategyLockSendVO
)
throws
Exception
{
ObjectMapper
mapper
=
JacksonUtils
.
getInstance
();
JsonViewObject
jsonViewObject
=
JsonViewObject
.
newInstance
();
String
crossId
=
strategyLockSendVO
.
getCrossId
();
LambdaQueryWrapper
<
StrategyDailyPlanInfoEntity
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
StrategyDailyPlanInfoEntity:
:
getCrossId
,
crossId
);
List
<
StrategyDailyPlanInfoEntity
>
dailyPlanInfos
=
strategyDailyPlanInfoMapper
.
selectList
(
queryWrapper
);
if
(!
CollectionUtils
.
isEmpty
(
dailyPlanInfos
))
{
for
(
StrategyDailyPlanInfoEntity
dailyPlanInfo
:
dailyPlanInfos
)
{
String
dailyPlanStr
=
dailyPlanInfo
.
getDailyPlanDetails
();
StrategyControlDetailList
.
DailyPlan
.
DailyPlanDetail
dailyPlanDetail
=
new
StrategyControlDetailList
.
DailyPlan
.
DailyPlanDetail
();
List
<
StrategyControlDetailList
.
DailyPlan
.
DailyPlanDetail
>
dailyPlanDetails
=
mapper
.
readValue
(
dailyPlanStr
,
new
TypeReference
<
List
<
StrategyControlDetailList
.
DailyPlan
.
DailyPlanDetail
>>()
{});
if
(!
CollectionUtils
.
isEmpty
(
dailyPlanDetails
))
{
for
(
StrategyControlDetailList
.
DailyPlan
.
DailyPlanDetail
item
:
dailyPlanDetails
)
{
String
strategyNo
=
item
.
getStrategyNo
();
}
}
}
}
log
.
error
(
"收到请求参数:{}"
,
strategyLockSendVO
);
return
jsonViewObject
.
success
(
"策略锁定成功"
);
}
@Override
public
JsonViewObject
strategyLockRecoverSend
(
StrategyLockSendVO
strategyLockSendVO
)
throws
Exception
{
JsonViewObject
jsonViewObject
=
JsonViewObject
.
newInstance
();
log
.
error
(
"收到请求参数:{}"
,
strategyLockSendVO
);
return
jsonViewObject
.
success
(
"策略恢复成功"
);
}
}
signal-optimize-service/src/main/java/net/wanji/opt/vo/StrategyLockSendVO.java
View file @
bf8a679a
...
...
@@ -14,6 +14,8 @@ import lombok.Data;
public
class
StrategyLockSendVO
{
@ApiModelProperty
(
name
=
"路口ID"
,
notes
=
""
)
private
String
crossId
;
@ApiModelProperty
(
name
=
"
路口ID
"
,
notes
=
""
)
@ApiModelProperty
(
name
=
"
锁定时间
"
,
notes
=
""
)
private
Double
lockTime
;
@ApiModelProperty
(
name
=
"策略编号"
,
notes
=
""
)
private
String
strategyNo
;
}
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