Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wj-datacenter-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
wj-datacenter-platform
Commits
cf182fbb
Commit
cf182fbb
authored
Jul 18, 2024
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[update] 交通大脑-统计数据优化车道编号
parent
d2bb982a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
1 deletion
+23
-1
LaneStatisticsReceive2LaneDataMapVersion2.java
...statistics/LaneStatisticsReceive2LaneDataMapVersion2.java
+23
-1
No files found.
wj-realtime-computing/src/main/java/com/wanji/indicators/task/citybrainreceive/lanestatistics/LaneStatisticsReceive2LaneDataMapVersion2.java
View file @
cf182fbb
...
...
@@ -50,8 +50,11 @@ public class LaneStatisticsReceive2LaneDataMapVersion2 implements CoFlatMapFunct
if
(!
CollectionUtils
.
isEmpty
(
dataList
))
{
for
(
LaneStatisticsDetail
detail
:
dataList
)
{
String
laneNo
=
detail
.
getLaneNo
();
String
wjLaneId
=
getWjLaneId
(
crossId
,
dir
,
laneNo
,
foreignDeviceMap
);
CrossLaneDataRealTimePO
po
=
new
CrossLaneDataRealTimePO
();
po
.
setId
(
String
.
join
(
Constant
.
MIDDLE_LINE
,
crossId
,
dir
,
laneNo
));
// todo
po
.
setId
(
wjLaneId
);
//po.setId(String.join(Constant.MIDDLE_LINE, crossId, dir, laneNo));
po
.
setCrossId
(
crossId
);
po
.
setStartTime
(
dateTime
);
String
wArrivalFlow
=
detail
.
getWArrivalFlow
();
...
...
@@ -92,6 +95,25 @@ public class LaneStatisticsReceive2LaneDataMapVersion2 implements CoFlatMapFunct
}
}
private
String
getWjLaneId
(
String
crossId
,
String
dir
,
String
laneNo
,
Map
<
String
,
List
<
ForeignDevicePO
>>
foreignDeviceMap
)
{
if
(!
foreignDeviceMap
.
isEmpty
())
{
List
<
ForeignDevicePO
>
foreignDevicePOS
=
foreignDeviceMap
.
get
(
crossId
);
if
(!
CollectionUtils
.
isEmpty
(
foreignDevicePOS
))
{
for
(
ForeignDevicePO
foreignDevicePO
:
foreignDevicePOS
)
{
Integer
type
=
foreignDevicePO
.
getType
();
String
currentDir
=
String
.
valueOf
(
foreignDevicePO
.
getDir
());
String
laneId
=
foreignDevicePO
.
getLaneId
();
String
sort
=
laneId
.
substring
(
laneId
.
length
()
-
1
);
if
(
Objects
.
equals
(
2
,
type
)
&&
StringUtils
.
equalsIgnoreCase
(
dir
,
currentDir
)
&&
StringUtils
.
equalsIgnoreCase
(
sort
,
laneNo
)
)
{
return
foreignDevicePO
.
getLaneId
();
}
}
}
}
return
""
;
}
@Override
public
void
flatMap2
(
Map
<
String
,
List
<
ForeignDevicePO
>>
value
,
Collector
<
String
>
out
)
throws
Exception
{
foreignDeviceMap
.
putAll
(
value
);
...
...
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