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
jinan
traffic-signal-platform
Commits
c9c0ab66
Commit
c9c0ab66
authored
Apr 15, 2025
by
wangyecheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
策略管理追加干线日计划回显
parent
56c487f0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
10 deletions
+48
-10
StrategyPriorityController.java
...opt/controllerv2/strategy/StrategyPriorityController.java
+8
-5
StrategyPriorityMapper.java
...wanji/opt/dao/mapper/strategy/StrategyPriorityMapper.java
+3
-1
StrategyPriorityService.java
...wanji/opt/servicev2/strategy/StrategyPriorityService.java
+2
-1
StrategyPriorityServiceImpl.java
.../servicev2/strategy/impl/StrategyPriorityServiceImpl.java
+18
-3
StrategyPriorityMapper.xml
...main/resources/mapper/strategy/StrategyPriorityMapper.xml
+17
-0
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/controllerv2/strategy/StrategyPriorityController.java
View file @
c9c0ab66
...
...
@@ -147,7 +147,7 @@ public class StrategyPriorityController {
return
jsonView
;
}
@ApiOperation
(
value
=
"策略管理-策略计划表批量保存"
,
notes
=
"批量保存"
,
produces
=
MediaType
.
APPLICATION_JSON
,
consumes
=
MediaType
.
APPLICATION_JSON
,
hidden
=
false
)
@ApiOperation
(
value
=
"策略管理-策略计划表
路口干线
批量保存"
,
notes
=
"批量保存"
,
produces
=
MediaType
.
APPLICATION_JSON
,
consumes
=
MediaType
.
APPLICATION_JSON
,
hidden
=
false
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"dailyPlanDetails"
,
value
=
"日计划配置数据"
,
required
=
false
,
dataType
=
"String"
),
})
...
...
@@ -164,15 +164,18 @@ public class StrategyPriorityController {
return
jsonView
;
}
@ApiOperation
(
value
=
"策略管理-计划配置数据回显"
,
notes
=
"数据回显"
,
produces
=
MediaType
.
APPLICATION_JSON
,
consumes
=
MediaType
.
APPLICATION_JSON
,
hidden
=
false
)
@ApiOperation
(
value
=
"策略管理-计划配置
路口干线
数据回显"
,
notes
=
"数据回显"
,
produces
=
MediaType
.
APPLICATION_JSON
,
consumes
=
MediaType
.
APPLICATION_JSON
,
hidden
=
false
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"crossId"
,
value
=
"路口id"
,
required
=
true
,
dataType
=
"String"
)
@ApiImplicitParam
(
name
=
"crossId"
,
value
=
"路口id"
,
required
=
false
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"greenId"
,
value
=
"干线id"
,
required
=
false
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"type"
,
value
=
"类型"
,
required
=
true
,
dataType
=
"Integer"
),
})
@GetMapping
(
"/getPlanConfigData"
)
public
JsonViewObject
getPlanConfigData
(
@RequestParam
(
required
=
true
)
String
crossId
){
public
JsonViewObject
getPlanConfigData
(
@RequestParam
(
required
=
false
)
String
crossId
,
@RequestParam
(
required
=
false
)
Integer
greenId
,
@RequestParam
(
required
=
true
)
Integer
type
){
JsonViewObject
jsonView
=
JsonViewObject
.
newInstance
();
try
{
List
<
StrategyPriorityDailyInfo
>
list
=
strategyPriorityService
.
getPlanConfigData
(
crossId
);
List
<
StrategyPriorityDailyInfo
>
list
=
strategyPriorityService
.
getPlanConfigData
(
crossId
,
greenId
,
type
);
jsonView
.
success
(
list
);
}
catch
(
Exception
e
)
{
jsonView
.
fail
(
I18nResourceBundle
.
getConstants
(
"SAVE_FAILED_MSG"
));
...
...
signal-optimize-service/src/main/java/net/wanji/opt/dao/mapper/strategy/StrategyPriorityMapper.java
View file @
c9c0ab66
...
...
@@ -80,7 +80,7 @@ public interface StrategyPriorityMapper extends BaseMapper<StrategyPriorityDaily
void
deletePlanConfig
(
String
crossId
);
List
<
StrategyPriorityDailyInfo
>
getPlanConfigData
(
String
crossId
);
List
<
StrategyPriorityDailyInfo
>
getPlanConfigData
(
@Param
(
"crossId"
)
String
crossId
,
@Param
(
"type"
)
Integer
type
);
List
<
StrategyParameterConfig
>
paramterConfigTable
(
String
crossId
);
...
...
@@ -104,5 +104,7 @@ public interface StrategyPriorityMapper extends BaseMapper<StrategyPriorityDaily
List
<
StrategyPriorityDailyInfo
>
selectGreenPlanTable
(
Integer
greenId
);
void
deleteGreenPlanConfig
(
Integer
greenId
);
List
<
StrategyPriorityDailyInfo
>
getGreenPlanConfigData
(
@Param
(
"greenId"
)
Integer
greenId
,
@Param
(
"type"
)
Integer
type
);
}
signal-optimize-service/src/main/java/net/wanji/opt/servicev2/strategy/StrategyPriorityService.java
View file @
c9c0ab66
...
...
@@ -2,6 +2,7 @@ package net.wanji.opt.servicev2.strategy;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
io.swagger.models.auth.In
;
import
net.wanji.common.framework.rest.JsonViewObject
;
import
net.wanji.opt.entity.strategy.StrategyParameterConfig
;
import
net.wanji.opt.entity.strategy.StrategyPriorityDailyInfo
;
...
...
@@ -39,7 +40,7 @@ public interface StrategyPriorityService extends IService<StrategyPriorityDailyI
void
savePlanConfig
(
List
<
StrategyPriorityGroup
>
dailyPlanDetails
)
throws
JsonProcessingException
;
List
<
StrategyPriorityDailyInfo
>
getPlanConfigData
(
String
crossId
);
List
<
StrategyPriorityDailyInfo
>
getPlanConfigData
(
String
crossId
,
Integer
greenId
,
Integer
type
);
void
saveParamterConfig
(
StrategyPriorityGroup
strategyPriorityGroup
)
throws
JsonProcessingException
;
...
...
signal-optimize-service/src/main/java/net/wanji/opt/servicev2/strategy/impl/StrategyPriorityServiceImpl.java
View file @
c9c0ab66
...
...
@@ -288,11 +288,26 @@ import java.util.stream.Collectors;
throw
e
;
}
}
/*
* 日计划回显接口
* */
@Override
public
List
<
StrategyPriorityDailyInfo
>
getPlanConfigData
(
String
crossId
)
{
public
List
<
StrategyPriorityDailyInfo
>
getPlanConfigData
(
String
crossId
,
Integer
greenId
,
Integer
type
)
{
//type: 1路口 2干线
List
<
StrategyPriorityDailyInfo
>
planList
=
new
ArrayList
<>();
if
(
type
==
1
){
if
(
crossId
.
isEmpty
()){
throw
new
IllegalArgumentException
(
"crossId cannot be null"
);
}
planList
=
strategyPriorityMapper
.
getPlanConfigData
(
crossId
,
type
);
}
else
if
(
type
==
2
){
if
(
greenId
==
null
){
throw
new
IllegalArgumentException
(
"greenId cannot be null"
);
}
planList
=
strategyPriorityMapper
.
getGreenPlanConfigData
(
greenId
,
type
);
}
List
<
StrategyPriorityDailyInfo
>
planList
=
strategyPriorityMapper
.
getPlanConfigData
(
crossId
);
return
planList
;
}
/*
...
...
signal-optimize-service/src/main/resources/mapper/strategy/StrategyPriorityMapper.xml
View file @
c9c0ab66
...
...
@@ -302,6 +302,23 @@
<if
test=
"crossId!=null and crossId!=''"
>
and cross_id = #{crossId}
</if>
<if
test=
"type!=null and type!=''"
>
and type = #{type}
</if>
</select>
<select
id=
"getGreenPlanConfigData"
parameterType=
"map"
resultType=
"net.wanji.opt.entity.strategy.StrategyPriorityDailyInfo"
>
SELECT
id,daily_plan_id,week_execute,daily_plan_details,cross_id
FROM
t_strategy_priority_daily_info
WHERE
1=1
<if
test=
"greenId!=null and greenId!=''"
>
and green_id = #{greenId}
</if>
<if
test=
"type!=null and type!=''"
>
and type = #{type}
</if>
</select>
<select
id=
"paramterConfigTable"
parameterType=
"map"
resultType=
"net.wanji.opt.entity.strategy.StrategyParameterConfig"
>
SELECT
...
...
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