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
b5a033ef
Commit
b5a033ef
authored
Nov 08, 2024
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[add] 策略管理页面接口
parent
fbfc162a
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
122 additions
and
52 deletions
+122
-52
SignalOptimizeApplication.java
...rc/main/java/net/wanji/opt/SignalOptimizeApplication.java
+2
-1
Swagger2.java
...-service/src/main/java/net/wanji/opt/config/Swagger2.java
+3
-1
StrategyControlInfoMapper.java
...a/net/wanji/opt/dao/mapper/StrategyControlInfoMapper.java
+1
-1
StrategyControlController.java
...i/opt/synthesis/controller/StrategyControlController.java
+16
-6
StrategyControlDataEntity.java
...t/wanji/opt/synthesis/pojo/StrategyControlDataEntity.java
+1
-1
StrategyControlDetailList.java
...t/wanji/opt/synthesis/pojo/StrategyControlDetailList.java
+1
-0
StrategyControlService.java
...t/wanji/opt/synthesis/service/StrategyControlService.java
+3
-8
StrategyControlServiceImpl.java
...pt/synthesis/service/impl/StrategyControlServiceImpl.java
+94
-33
StrategyControlInfoMapper.xml
...e/src/main/resources/mapper/StrategyControlInfoMapper.xml
+1
-1
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/SignalOptimizeApplication.java
View file @
b5a033ef
...
...
@@ -10,7 +10,8 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
/**
* @author
*/
@SpringBootApplication
(
scanBasePackages
=
{
"net.wanji.opt"
,
"net.wanji.databus"
,
"net.wanji.common"
})
@SpringBootApplication
(
scanBasePackages
=
{
"net.wanji.opt"
,
"net.wanji.databus"
,
"net.wanji.common"
,
"net.wanji.opt.controller"
,
"net.wanji.opt.synthesis.controller"
})
@MapperScan
(
basePackages
=
{
"net.wanji.opt.dao.mapper"
,
"net.wanji.databus.dao.mapper"
})
@EnableTransactionManagement
@EnableScheduling
...
...
signal-optimize-service/src/main/java/net/wanji/opt/config/Swagger2.java
View file @
b5a033ef
package
net
.
wanji
.
opt
.
config
;
import
com.google.common.base.Predicates
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
springfox.documentation.builders.ApiInfoBuilder
;
...
...
@@ -21,7 +22,8 @@ public class Swagger2 {
.
apiInfo
(
apiInfo
())
.
select
()
//为当前包路径
.
apis
(
RequestHandlerSelectors
.
basePackage
(
"net.wanji.opt.controller"
))
.
apis
(
Predicates
.
or
(
RequestHandlerSelectors
.
basePackage
(
"net.wanji.opt.controller"
),
RequestHandlerSelectors
.
basePackage
(
"net.wanji.opt.synthesis.controller"
)))
.
paths
(
PathSelectors
.
any
())
.
build
();
}
...
...
signal-optimize-service/src/main/java/net/wanji/opt/dao/mapper/StrategyControlInfoMapper.java
View file @
b5a033ef
package
net
.
wanji
.
opt
.
dao
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
net.wanji.opt.
p
o.StrategyControlDataEntity
;
import
net.wanji.opt.
synthesis.poj
o.StrategyControlDataEntity
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
signal-optimize-service/src/main/java/net/wanji/opt/synthesis/controller/StrategyControlController.java
View file @
b5a033ef
...
...
@@ -6,7 +6,7 @@ import io.swagger.annotations.ApiResponse;
import
io.swagger.annotations.ApiResponses
;
import
net.wanji.common.framework.rest.JsonViewObject
;
import
net.wanji.opt.dao.mapper.SynthesisOptimizeLogInfoMapper
;
import
net.wanji.opt.
p
o.StrategyControlDataEntity
;
import
net.wanji.opt.
synthesis.poj
o.StrategyControlDataEntity
;
import
net.wanji.opt.synthesis.pojo.StrategyControlDetailList
;
import
net.wanji.opt.synthesis.pojo.StrategyControlVO
;
import
net.wanji.opt.synthesis.service.StrategyControlService
;
...
...
@@ -55,16 +55,26 @@ public class StrategyControlController {
return
strategyControlService
.
strategyInfoPageList
(
entity
);
}
@ApiOperation
(
value
=
"策略
管理计划列表查询"
,
notes
=
"策略管理计划列表查询
"
,
@ApiOperation
(
value
=
"策略
控制查询列表"
,
notes
=
"策略控制查询列表
"
,
response
=
JsonViewObject
.
class
,
produces
=
MediaType
.
APPLICATION_JSON
,
consumes
=
MediaType
.
APPLICATION_JSON
)
@PostMapping
(
value
=
"/strategyPlanList"
,
produces
=
MediaType
.
APPLICATION_JSON
,
consumes
=
MediaType
.
APPLICATION_JSON
)
@GetMapping
(
value
=
"/crossStrategyInfoList"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
StrategyControlDataEntity
.
class
),
})
public
JsonViewObject
strategyPlanList
(
@RequestParam
String
crossId
)
throws
Exception
{
return
strategyControlService
.
strategyPlanList
(
crossId
);
public
JsonViewObject
crossStrategyInfoList
(
@RequestParam
Integer
type
)
throws
Exception
{
return
strategyControlService
.
crossStrategyInfoList
(
type
);
}
@ApiOperation
(
value
=
"策略管理计划详情查询"
,
notes
=
"策略管理计划详情查询"
,
response
=
JsonViewObject
.
class
,
produces
=
MediaType
.
APPLICATION_JSON
,
consumes
=
MediaType
.
APPLICATION_JSON
)
@GetMapping
(
value
=
"/strategyPlanDetail"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
StrategyControlDetailList
.
class
),
})
public
JsonViewObject
strategyPlanDetail
(
@RequestParam
String
crossId
)
throws
Exception
{
return
strategyControlService
.
strategyPlanDetail
(
crossId
);
}
@ApiOperation
(
value
=
"策略管理计划保存"
,
notes
=
"策略管理计划列表查询"
,
...
...
signal-optimize-service/src/main/java/net/wanji/opt/
p
o/StrategyControlDataEntity.java
→
signal-optimize-service/src/main/java/net/wanji/opt/
synthesis/poj
o/StrategyControlDataEntity.java
View file @
b5a033ef
package
net
.
wanji
.
opt
.
p
o
;
package
net
.
wanji
.
opt
.
synthesis
.
poj
o
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
...
...
signal-optimize-service/src/main/java/net/wanji/opt/synthesis/pojo/StrategyControlDetailList.java
View file @
b5a033ef
...
...
@@ -13,6 +13,7 @@ import java.util.List;
*/
@Data
public
class
StrategyControlDetailList
{
private
String
crossId
;
@NotEmpty
private
List
<
ExecutePlan
>
plans
;
@NotEmpty
...
...
signal-optimize-service/src/main/java/net/wanji/opt/synthesis/service/StrategyControlService.java
View file @
b5a033ef
package
net
.
wanji
.
opt
.
synthesis
.
service
;
import
net.wanji.common.framework.rest.JsonViewObject
;
import
net.wanji.opt.
p
o.StrategyControlDataEntity
;
import
net.wanji.opt.
synthesis.poj
o.StrategyControlDataEntity
;
import
net.wanji.opt.synthesis.pojo.StrategyControlDetailList
;
import
net.wanji.opt.synthesis.pojo.StrategyControlVO
;
...
...
@@ -13,13 +13,8 @@ public interface StrategyControlService {
JsonViewObject
strategyInfoOperation
(
StrategyControlVO
strategyControlVO
)
throws
Exception
;
JsonViewObject
strategyInfoPageList
(
StrategyControlDataEntity
entity
)
throws
Exception
;
JsonViewObject
crossStrategyInfoList
(
Integer
type
)
throws
Exception
;
/**
* 策略管理查询
* @param crossId
* @return
* @throws Exception
*/
JsonViewObject
strategyPlanList
(
String
crossId
)
throws
Exception
;
JsonViewObject
strategyPlanDetail
(
String
crossId
)
throws
Exception
;
JsonViewObject
strategyPlanSave
(
StrategyControlDetailList
list
)
throws
Exception
;
}
signal-optimize-service/src/main/java/net/wanji/opt/synthesis/service/impl/StrategyControlServiceImpl.java
View file @
b5a033ef
This diff is collapsed.
Click to expand it.
signal-optimize-service/src/main/resources/mapper/StrategyControlInfoMapper.xml
View file @
b5a033ef
...
...
@@ -5,7 +5,7 @@
<mapper
namespace=
"net.wanji.opt.dao.mapper.StrategyControlInfoMapper"
>
<insert
id=
"insertBatch"
parameterType=
"net.wanji.opt.
p
o.StrategyControlDataEntity"
>
<insert
id=
"insertBatch"
parameterType=
"net.wanji.opt.
synthesis.poj
o.StrategyControlDataEntity"
>
INSERT INTO t_strategy_control_info (
biz_id,
biz_type,
...
...
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