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
e5e16eac
Commit
e5e16eac
authored
Jan 16, 2025
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[add] 策略库优化
parent
36891dbf
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
53 additions
and
14 deletions
+53
-14
StrategyControlController.java
...i/opt/synthesis/controller/StrategyControlController.java
+6
-5
StrategyFactoryEntity.java
...a/net/wanji/opt/synthesis/pojo/StrategyFactoryEntity.java
+1
-1
StrategyFactoryQueryVO.java
...t/wanji/opt/synthesis/pojo/vo/StrategyFactoryQueryVO.java
+25
-0
StrategyControlService.java
...t/wanji/opt/synthesis/service/StrategyControlService.java
+3
-1
StrategyControlServiceImpl.java
...pt/synthesis/service/impl/StrategyControlServiceImpl.java
+18
-7
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/synthesis/controller/StrategyControlController.java
View file @
e5e16eac
...
@@ -7,6 +7,7 @@ import net.wanji.opt.synthesis.pojo.StrategyControlDataEntity;
...
@@ -7,6 +7,7 @@ import net.wanji.opt.synthesis.pojo.StrategyControlDataEntity;
import
net.wanji.opt.synthesis.pojo.StrategyControlDetailList
;
import
net.wanji.opt.synthesis.pojo.StrategyControlDetailList
;
import
net.wanji.opt.synthesis.pojo.StrategyFactoryEntity
;
import
net.wanji.opt.synthesis.pojo.StrategyFactoryEntity
;
import
net.wanji.opt.synthesis.pojo.vo.StrategyControlVO
;
import
net.wanji.opt.synthesis.pojo.vo.StrategyControlVO
;
import
net.wanji.opt.synthesis.pojo.vo.StrategyFactoryQueryVO
;
import
net.wanji.opt.synthesis.service.StrategyControlService
;
import
net.wanji.opt.synthesis.service.StrategyControlService
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
...
@@ -137,15 +138,15 @@ public class StrategyControlController {
...
@@ -137,15 +138,15 @@ public class StrategyControlController {
return
strategyControlService
.
strategyPlanSave
(
list
);
return
strategyControlService
.
strategyPlanSave
(
list
);
}
}
@ApiOperation
(
value
=
"策略库
查询列表"
,
notes
=
"策略库
查询列表"
,
@ApiOperation
(
value
=
"策略库
分页查询列表"
,
notes
=
"策略库分页
查询列表"
,
response
=
JsonViewObject
.
class
,
response
=
JsonViewObject
.
class
,
produces
=
MediaType
.
APPLICATION_JSON
,
consumes
=
MediaType
.
APPLICATION_JSON
)
produces
=
MediaType
.
APPLICATION_JSON
,
consumes
=
MediaType
.
APPLICATION_JSON
)
@
Ge
tMapping
(
value
=
"/strategyFactoryList"
)
@
Pos
tMapping
(
value
=
"/strategyFactoryList"
)
@ApiResponses
({
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
StrategyFactoryEntity
.
class
),
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
StrategyFactoryEntity
.
class
),
})
})
public
JsonViewObject
strategyFactoryList
()
throws
Exception
{
public
JsonViewObject
strategyFactoryList
(
@RequestBody
StrategyFactoryQueryVO
vo
)
throws
Exception
{
return
strategyControlService
.
strategyFactoryList
();
return
strategyControlService
.
strategyFactoryList
(
vo
);
}
}
@ApiOperation
(
value
=
"策略管理计划保存"
,
notes
=
"策略管理计划列表查询"
,
@ApiOperation
(
value
=
"策略管理计划保存"
,
notes
=
"策略管理计划列表查询"
,
...
@@ -161,7 +162,7 @@ public class StrategyControlController {
...
@@ -161,7 +162,7 @@ public class StrategyControlController {
}
}
@ApiOperation
(
value
=
"策略管理计划
保存"
,
notes
=
"策略管理计划列表查询
"
,
@ApiOperation
(
value
=
"策略管理计划
删除"
,
notes
=
"策略管理计划删除
"
,
response
=
JsonViewObject
.
class
,
response
=
JsonViewObject
.
class
,
produces
=
MediaType
.
APPLICATION_JSON
,
consumes
=
MediaType
.
APPLICATION_JSON
)
produces
=
MediaType
.
APPLICATION_JSON
,
consumes
=
MediaType
.
APPLICATION_JSON
)
@GetMapping
(
value
=
"/strategyFactoryDel"
)
@GetMapping
(
value
=
"/strategyFactoryDel"
)
...
...
signal-optimize-service/src/main/java/net/wanji/opt/synthesis/pojo/StrategyFactoryEntity.java
View file @
e5e16eac
...
@@ -31,7 +31,7 @@ public class StrategyFactoryEntity {
...
@@ -31,7 +31,7 @@ public class StrategyFactoryEntity {
@ApiModelProperty
(
"算法厂商"
)
@ApiModelProperty
(
"算法厂商"
)
@TableField
(
"company"
)
@TableField
(
"company"
)
private
String
company
;
private
String
company
;
@ApiModelProperty
(
"
备注
"
)
@ApiModelProperty
(
"
策略详情
"
)
@TableField
(
"mark"
)
@TableField
(
"mark"
)
private
String
mark
;
private
String
mark
;
}
}
signal-optimize-service/src/main/java/net/wanji/opt/synthesis/pojo/vo/StrategyFactoryQueryVO.java
0 → 100644
View file @
e5e16eac
package
net
.
wanji
.
opt
.
synthesis
.
pojo
.
vo
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @author duanruiming
* @date 2025/01/16 16:52
*/
@Data
public
class
StrategyFactoryQueryVO
{
@ApiModelProperty
(
"场景"
)
private
Integer
scene
;
@ApiModelProperty
(
"策略"
)
private
String
strategyName
;
@ApiModelProperty
(
"策略编号"
)
private
String
strategyNo
;
@ApiModelProperty
(
"算法厂商"
)
private
String
company
;
@ApiModelProperty
(
"当前页"
)
private
int
currentPage
;
@ApiModelProperty
(
"每页数量"
)
private
int
pageSize
;
}
signal-optimize-service/src/main/java/net/wanji/opt/synthesis/service/StrategyControlService.java
View file @
e5e16eac
...
@@ -5,6 +5,8 @@ import net.wanji.opt.synthesis.pojo.StrategyControlDataEntity;
...
@@ -5,6 +5,8 @@ import net.wanji.opt.synthesis.pojo.StrategyControlDataEntity;
import
net.wanji.opt.synthesis.pojo.StrategyControlDetailList
;
import
net.wanji.opt.synthesis.pojo.StrategyControlDetailList
;
import
net.wanji.opt.synthesis.pojo.vo.StrategyControlVO
;
import
net.wanji.opt.synthesis.pojo.vo.StrategyControlVO
;
import
net.wanji.opt.synthesis.pojo.StrategyFactoryEntity
;
import
net.wanji.opt.synthesis.pojo.StrategyFactoryEntity
;
import
net.wanji.opt.synthesis.pojo.vo.StrategyFactoryQueryVO
;
import
org.apache.ibatis.annotations.Param
;
/**
/**
* @author duanruiming
* @author duanruiming
...
@@ -22,7 +24,7 @@ public interface StrategyControlService {
...
@@ -22,7 +24,7 @@ public interface StrategyControlService {
JsonViewObject
strategyPlanDetail
(
String
crossId
)
throws
Exception
;
JsonViewObject
strategyPlanDetail
(
String
crossId
)
throws
Exception
;
JsonViewObject
strategyPush
(
StrategyControlDetailList
list
)
throws
Exception
;
JsonViewObject
strategyPush
(
StrategyControlDetailList
list
)
throws
Exception
;
JsonViewObject
strategyPlanSave
(
StrategyControlDetailList
list
)
throws
Exception
;
JsonViewObject
strategyPlanSave
(
StrategyControlDetailList
list
)
throws
Exception
;
JsonViewObject
strategyFactoryList
()
throws
Exception
;
JsonViewObject
strategyFactoryList
(
StrategyFactoryQueryVO
vo
)
throws
Exception
;
JsonViewObject
strategyFactorySave
(
StrategyFactoryEntity
entity
)
throws
Exception
;
JsonViewObject
strategyFactorySave
(
StrategyFactoryEntity
entity
)
throws
Exception
;
JsonViewObject
strategyFactoryDel
(
Integer
id
)
throws
Exception
;
JsonViewObject
strategyFactoryDel
(
Integer
id
)
throws
Exception
;
}
}
signal-optimize-service/src/main/java/net/wanji/opt/synthesis/service/impl/StrategyControlServiceImpl.java
View file @
e5e16eac
...
@@ -25,10 +25,7 @@ import net.wanji.opt.po.StrategyGreenOptHistEntity;
...
@@ -25,10 +25,7 @@ import net.wanji.opt.po.StrategyGreenOptHistEntity;
import
net.wanji.opt.po.trend.HoloEventInfoPO
;
import
net.wanji.opt.po.trend.HoloEventInfoPO
;
import
net.wanji.opt.synthesis.enums.StrategyCrossAlgoEnum
;
import
net.wanji.opt.synthesis.enums.StrategyCrossAlgoEnum
;
import
net.wanji.opt.synthesis.pojo.*
;
import
net.wanji.opt.synthesis.pojo.*
;
import
net.wanji.opt.synthesis.pojo.vo.StrategyControlDataVO
;
import
net.wanji.opt.synthesis.pojo.vo.*
;
import
net.wanji.opt.synthesis.pojo.vo.StrategyControlHistVO
;
import
net.wanji.opt.synthesis.pojo.vo.StrategyControlVO
;
import
net.wanji.opt.synthesis.pojo.vo.StrategyOptTimesVO
;
import
net.wanji.opt.synthesis.service.PushStrategyControlService
;
import
net.wanji.opt.synthesis.service.PushStrategyControlService
;
import
net.wanji.opt.synthesis.service.StrategyControlService
;
import
net.wanji.opt.synthesis.service.StrategyControlService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -870,10 +867,24 @@ public class StrategyControlServiceImpl implements StrategyControlService {
...
@@ -870,10 +867,24 @@ public class StrategyControlServiceImpl implements StrategyControlService {
}
}
@Override
@Override
public
JsonViewObject
strategyFactoryList
()
throws
Exception
{
public
JsonViewObject
strategyFactoryList
(
StrategyFactoryQueryVO
vo
)
throws
Exception
{
List
<
StrategyFactoryEntity
>
strategyFactoryEntities
=
strategyFactoryMapper
.
selectList
(
null
);
Page
<
StrategyFactoryEntity
>
page
=
new
Page
<>(
vo
.
getCurrentPage
(),
vo
.
getPageSize
());
LambdaQueryWrapper
<
StrategyFactoryEntity
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
if
(
Objects
.
nonNull
(
vo
.
getScene
()))
{
queryWrapper
.
eq
(
StrategyFactoryEntity:
:
getScene
,
vo
.
getScene
());
}
if
(
StringUtils
.
isNotBlank
(
vo
.
getStrategyName
()))
{
queryWrapper
.
eq
(
StrategyFactoryEntity:
:
getStrategyName
,
vo
.
getStrategyName
());
}
if
(
StringUtils
.
isNotBlank
(
vo
.
getStrategyNo
()))
{
queryWrapper
.
eq
(
StrategyFactoryEntity:
:
getStrategyNo
,
vo
.
getStrategyNo
());
}
if
(
StringUtils
.
isNotBlank
(
vo
.
getCompany
()))
{
queryWrapper
.
eq
(
StrategyFactoryEntity:
:
getCompany
,
vo
.
getCompany
());
}
Page
<
StrategyFactoryEntity
>
strategyFactoryEntityPage
=
strategyFactoryMapper
.
selectPage
(
page
,
queryWrapper
);
JsonViewObject
jsonViewObject
=
JsonViewObject
.
newInstance
();
JsonViewObject
jsonViewObject
=
JsonViewObject
.
newInstance
();
jsonViewObject
.
success
(
strategyFactoryEntit
ies
);
jsonViewObject
.
success
(
strategyFactoryEntit
yPage
);
return
jsonViewObject
;
return
jsonViewObject
;
}
}
...
...
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