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
e8ac11d3
Commit
e8ac11d3
authored
Feb 02, 2023
by
hanbing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
方案管理-计划数据增加开始时间、结束时间数组
parent
71bdf70e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
5 deletions
+19
-5
RunningPlanDTO.java
...rvice/src/main/java/net/wanji/web/dto/RunningPlanDTO.java
+2
-0
RunningPlanServiceImpl.java
...wanji/web/service/scheme/impl/RunningPlanServiceImpl.java
+17
-5
No files found.
signal-control-service/src/main/java/net/wanji/web/dto/RunningPlanDTO.java
View file @
e8ac11d3
...
...
@@ -39,6 +39,8 @@ public class RunningPlanDTO {
private
String
startTime
;
@ApiModelProperty
(
value
=
"结束时间"
,
required
=
true
)
private
String
endTime
;
@ApiModelProperty
(
value
=
"开始时间、结束时间"
,
required
=
true
)
private
String
[]
startEndTime
;
@ApiModelProperty
(
value
=
"方案名"
,
required
=
true
)
private
String
schemeName
;
}
...
...
signal-control-service/src/main/java/net/wanji/web/service/scheme/impl/RunningPlanServiceImpl.java
View file @
e8ac11d3
...
...
@@ -136,6 +136,17 @@ public class RunningPlanServiceImpl implements RunningPlanService {
private
List
<
RunningPlanDTO
.
DailyPlanListElement
>
buildDailyPlanList
(
String
crossId
)
{
List
<
RunningPlanDTO
.
DailyPlanListElement
>
dailyPlanList
=
new
ArrayList
<>();
dailyPlanList
=
crossPlanMapper
.
selectDailyPlanList
(
crossId
);
for
(
RunningPlanDTO
.
DailyPlanListElement
dailyPlan
:
dailyPlanList
)
{
List
<
RunningPlanDTO
.
TimeListElement
>
timeList
=
dailyPlan
.
getTimeList
();
for
(
RunningPlanDTO
.
TimeListElement
timeListElement
:
timeList
)
{
String
[]
startEndTime
=
new
String
[
2
];
String
startTime
=
timeListElement
.
getStartTime
();
String
endTime
=
timeListElement
.
getEndTime
();
startEndTime
[
0
]
=
startTime
;
startEndTime
[
1
]
=
endTime
;
timeListElement
.
setStartEndTime
(
startEndTime
);
}
}
return
dailyPlanList
;
}
...
...
@@ -217,16 +228,17 @@ public class RunningPlanServiceImpl implements RunningPlanService {
CrossSchemePO
crossSchemePO
=
crossSchemeMapper
.
selectByCrossIdAndSchemeName
(
crossId
,
schemeName
);
Integer
schemeId
=
crossSchemePO
.
getId
();
// 更新时段表
updateCrossSection
(
crossId
,
dailyPlan
,
crossPlanId
,
schemeId
,
time
);
updateCrossSection
(
crossId
,
crossPlanId
,
schemeId
,
time
);
}
}
}
private
void
updateCrossSection
(
String
crossId
,
RunningPlanDTO
.
DailyPlanListElement
dailyPlan
,
Integer
crossPlanId
,
Integer
schemeId
,
RunningPlanDTO
.
TimeListElement
time
)
{
private
void
updateCrossSection
(
String
crossId
,
Integer
crossPlanId
,
Integer
schemeId
,
RunningPlanDTO
.
TimeListElement
time
)
{
CrossSectionPO
crossSectionPO
=
new
CrossSectionPO
();
String
startTime
=
time
.
getStartTime
();
String
endTime
=
time
.
getEndTime
();
String
[]
startEndTime
=
time
.
getStartEndTime
();
String
startTime
=
startEndTime
[
0
];
String
endTime
=
startEndTime
[
1
];
String
s
=
startTime
+
endTime
;
String
sectionNo
=
s
.
replaceAll
(
":"
,
""
);
crossSectionPO
.
setSectionNo
(
sectionNo
);
...
...
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