Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
项目统一框架
amos-boot-biz
Commits
f41d4d75
Commit
f41d4d75
authored
Feb 11, 2022
by
chenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交对于建筑树的帅选
parent
2c4512be
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
FireStationServiceImpl.java
...odule/common/biz/service/impl/FireStationServiceImpl.java
+3
-1
KeySiteServiceImpl.java
...ot/module/common/biz/service/impl/KeySiteServiceImpl.java
+7
-5
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/FireStationServiceImpl.java
View file @
f41d4d75
...
...
@@ -4,6 +4,7 @@ import java.util.ArrayList;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.biz.common.constants.BizConstant
;
...
...
@@ -225,7 +226,8 @@ public class FireStationServiceImpl extends BaseService<FireStationDto, FireStat
if
(
buildingMapList
==
null
||
buildingMapList
.
size
()<
1
)
{
return
null
;
}
return
parseTree
((
List
<
Map
<
String
,
Object
>>)
buildingMapList
.
get
(
0
).
get
(
"children"
),
FireStationCountMap
);
List
<
Map
<
String
,
Object
>>
childrens
=
((
List
<
Map
<
String
,
Object
>>)
buildingMapList
.
get
(
0
).
get
(
"children"
)).
stream
().
filter
(
i
->
i
.
get
(
"bizOrgCode"
).
toString
().
contains
(
bizOrgCode
)).
collect
(
Collectors
.
toList
());
return
parseTree
(
childrens
,
FireStationCountMap
);
}
@SuppressWarnings
(
"unchecked"
)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/KeySiteServiceImpl.java
View file @
f41d4d75
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
service
.
impl
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
...
...
@@ -416,12 +417,13 @@ public class KeySiteServiceImpl extends BaseService<KeySiteDto, KeySite, KeySite
if
(
buildingMapList
==
null
||
buildingMapList
.
size
()
<
1
)
{
return
null
;
}
Map
<
String
,
Object
>
reMap
=
parseTree
((
List
<
Map
<
String
,
Object
>>)
buildingMapList
.
get
(
0
).
get
(
"children"
),
List
<
Map
<
String
,
Object
>>
childrens
=
((
List
<
Map
<
String
,
Object
>>)
buildingMapList
.
get
(
0
).
get
(
"children"
)).
stream
().
filter
(
i
->
i
.
get
(
"bizOrgCode"
).
toString
().
contains
(
bizOrgCode
)).
collect
(
Collectors
.
toList
());
Map
<
String
,
Object
>
reMap
=
parseTree
(
childrens
,
keySiteCountMap
,
allCount
);
Map
<
String
,
Object
>
fristMap
=
buildingMapList
.
get
(
0
);
fristMap
.
put
(
"id"
,
0
);
fristMap
.
put
(
"name"
,
fristMap
.
get
(
"instanceName"
)
+
" ("
+
reMap
.
get
(
"allCount"
)
+
")"
);
fristMap
.
put
(
"children"
,
frist
Map
.
get
(
"children"
));
fristMap
.
put
(
"children"
,
re
Map
.
get
(
"children"
));
buildingMapList
.
clear
();
buildingMapList
.
add
(
fristMap
);
return
buildingMapList
;
...
...
@@ -437,12 +439,12 @@ public class KeySiteServiceImpl extends BaseService<KeySiteDto, KeySite, KeySite
if
(
keySiteCountMap
.
containsKey
(
child
.
get
(
"id"
).
toString
()))
{
allCount
=
allCount
+
keySiteCountMap
.
get
(
child
.
get
(
"id"
).
toString
()).
intValue
();
child
.
put
(
"name"
,
child
.
get
(
"name"
)
+
"
("
+
keySiteCountMap
.
get
(
child
.
get
(
"id"
).
toString
())
+
")"
);
child
.
get
(
"name"
)
+
"("
+
keySiteCountMap
.
get
(
child
.
get
(
"id"
).
toString
())
+
")"
);
}
else
{
child
.
put
(
"name"
,
child
.
get
(
"name"
)
+
"
("
+
0
+
")"
);
child
.
put
(
"name"
,
child
.
get
(
"name"
)
+
"("
+
0
+
")"
);
}
}
else
{
child
.
put
(
"name"
,
child
.
get
(
"name"
)
+
"
("
+
0
+
")"
);
child
.
put
(
"name"
,
child
.
get
(
"name"
)
+
"("
+
0
+
")"
);
}
if
(!
ValidationUtil
.
isEmpty
(
child
.
get
(
"children"
)))
{
parseTree
((
List
<
Map
<
String
,
Object
>>)
child
.
get
(
"children"
),
keySiteCountMap
,
allCount
);
...
...
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