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
75126b49
Commit
75126b49
authored
Nov 18, 2024
by
zhouleilei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决时段-1问题
parent
c2c28b7a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
14 deletions
+11
-14
SchemeConfigServiceImpl.java
...anji/web/service/scheme/impl/SchemeConfigServiceImpl.java
+1
-1
StaticInfoServiceImpl.java
...wanji/utc/hisense/service/impl/StaticInfoServiceImpl.java
+10
-13
No files found.
signal-control-service/src/main/java/net/wanji/web/service/scheme/impl/SchemeConfigServiceImpl.java
View file @
75126b49
...
...
@@ -114,7 +114,7 @@ public class SchemeConfigServiceImpl implements SchemeConfigService {
String
crossId
=
crossIdBO
.
getCrossId
();
SaveSchemeConfigDTO
saveSchemeConfigDTO
=
new
SaveSchemeConfigDTO
();
saveSchemeConfigDTO
.
setCrossId
(
crossId
);
// 构造方案列表
// 构造方案列表
phaseSchemeList = {ArrayList@21896} size = 24
List
<
SaveSchemeConfigDTO
.
PhaseScheme
>
phaseSchemeList
=
buildPhaseSchemeList
(
crossId
);
List
<
SaveSchemeConfigDTO
.
PhaseScheme
>
sort
=
phaseSchemeList
.
stream
()
.
sorted
(
Comparator
.
comparing
(
scheme
->
Integer
.
parseInt
(
scheme
.
getSchemeNo
())))
...
...
signal-utc-hisense-service/src/main/java/net/wanji/utc/hisense/service/impl/StaticInfoServiceImpl.java
View file @
75126b49
...
...
@@ -496,7 +496,7 @@ public class StaticInfoServiceImpl implements StaticInfoService {
}
//key
String
lightMapKey
=
dir
+
turn
+
crossLightsPO
.
getType
();
if
(!
lightsMap
.
containsKey
(
lightMapKey
)){
if
(!
lightsMap
.
containsKey
(
lightMapKey
))
{
lightNum
.
getAndIncrement
();
lightsMap
.
put
(
lightMapKey
,
lightNum
.
get
());
crossLightsPO
.
setLightsNo
(
String
.
valueOf
(
lightsMap
.
get
(
lightMapKey
)));
...
...
@@ -578,7 +578,7 @@ public class StaticInfoServiceImpl implements StaticInfoService {
String
crossId
=
planSectionDTO
.
getCrossId
();
//从缓存中拿路口信息
CrossInfoPO
crossInfoPO
=
CrossInfoCache
.
getCrossInfoCache
().
get
(
crossId
);
if
(
Optional
.
ofNullable
(
planSectionDT
O
).
isPresent
())
{
if
(
Optional
.
ofNullable
(
crossInfoP
O
).
isPresent
())
{
String
code
=
crossInfoPO
.
getCode
();
List
<
VNtcipTimeBaseDayplanDTO
>
vNtcipTimeBaseDayplanDTOS
=
vNtcipTimeBaseDayplanMapper
.
listByCrossIdAndDayPlanId
(
code
,
planSectionDTO
.
getPlanNo
());
if
(!
CollectionUtils
.
isEmpty
(
vNtcipTimeBaseDayplanDTOS
))
{
...
...
@@ -586,14 +586,16 @@ public class StaticInfoServiceImpl implements StaticInfoService {
//根据时段表号分组
Map
<
Integer
,
List
<
VNtcipTimeBaseDayplanDTO
>>
collect
=
vNtcipTimeBaseDayplanDTOS
.
stream
().
collect
(
Collectors
.
groupingBy
(
VNtcipTimeBaseDayplanDTO:
:
getNDayPlanNumber
));
List
<
CrossPlanPO
>
crossPlanPOList
=
new
ArrayList
<>();
CrossPlanPO
crossPlan
=
new
CrossPlanPO
();
crossPlan
.
setCrossId
(
crossId
);
//计划号-取的是时段表号
crossPlan
.
setPlanNo
(
String
.
valueOf
(
planSectionDTO
.
getPlanNo
()));
crossPlan
.
setName
(
"海信信号机-时段表号:"
+
String
.
valueOf
(
planSectionDTO
.
getPlanNo
()));
crossPlanPOList
.
add
(
crossPlan
);
Set
<
Integer
>
keySet
=
collect
.
keySet
();
for
(
Integer
i
:
keySet
)
{
CrossPlanPO
crossPlan
=
new
CrossPlanPO
();
crossPlan
.
setCrossId
(
crossId
);
//计划号-取的是时段表号
crossPlan
.
setPlanNo
(
String
.
valueOf
(
i
));
crossPlan
.
setName
(
"海信信号机-时段表号:"
+
i
);
crossPlanPOList
.
add
(
crossPlan
);
PlanSectionVO
planSectionVO
=
new
PlanSectionVO
();
List
<
CrossSectionPO
>
crossSectionPOList
=
new
ArrayList
<>();
//时段数据
...
...
@@ -601,8 +603,6 @@ public class StaticInfoServiceImpl implements StaticInfoService {
for
(
int
i1
=
0
;
i1
<
dayplanDTOS
.
size
();
i1
++)
{
VNtcipTimeBaseDayplanDTO
dayplanDTO
=
dayplanDTOS
.
get
(
i1
);
CrossSectionPO
crossSectionPO
=
new
CrossSectionPO
();
crossSectionPO
.
setCrossId
(
crossId
);
//时段号 - 取的是时段序号
crossSectionPO
.
setSectionNo
(
dayplanDTO
.
getNDayPlanEventNumber
()
+
""
);
...
...
@@ -630,10 +630,7 @@ public class StaticInfoServiceImpl implements StaticInfoService {
crossSectionPO
.
setGmtCreate
(
null
);
//创建时间
crossSectionPO
.
setGmtModified
(
null
);
crossSectionPOList
.
add
(
crossSectionPO
);
}
planSectionVO
.
setCrossPlanPOList
(
crossPlanPOList
);
planSectionVO
.
setCrossSectionPOList
(
crossSectionPOList
);
...
...
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