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
0ae5c468
Commit
0ae5c468
authored
Jun 14, 2022
by
tianbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug6331修改:获取管辖单位树空指针错误
parent
506ef4fa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
+20
-20
UnitInfoController.java
...oot/module/tzs/flc/biz/controller/UnitInfoController.java
+20
-20
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/flc/biz/controller/UnitInfoController.java
View file @
0ae5c468
...
...
@@ -120,7 +120,7 @@ public class UnitInfoController extends BaseController {
Iterator
<
CompanyModel
>
it
=
result
.
iterator
();
while
(
it
.
hasNext
())
{
CompanyModel
temp
=
it
.
next
();
if
(
temp
.
getLevel
().
equals
(
"emergencyCenter"
)
||
temp
.
getLevel
().
equals
(
"company"
))
{
if
(
"emergencyCenter"
.
equals
(
temp
.
getLevel
())
||
"company"
.
equals
(
temp
.
getLevel
()
))
{
it
.
remove
();
}
else
{
this
.
dealCompanyTree
(
temp
);
...
...
@@ -617,35 +617,35 @@ public class UnitInfoController extends BaseController {
private
void
dealCompanyTree
(
CompanyModel
company
)
{
if
(!
company
.
getLevel
().
equals
(
"emergencyCenter"
)
&&
!
company
.
getLevel
().
equals
(
"company"
))
{
if
(!
"emergencyCenter"
.
equals
(
company
.
getLevel
())
&&
!
"company"
.
equals
(
company
.
getLevel
()
))
{
// 判断子节点是否是headquarter
Collection
children
=
company
.
getChildren
();
Iterator
<
Map
>
it
=
children
.
iterator
();
while
(
it
.
hasNext
())
{
Map
temp
=
it
.
next
();
if
(
company
.
getLevel
().
equals
(
"emergencyCenter"
)
||
company
.
getLevel
().
equals
(
"company"
))
{
it
.
remove
();
}
else
{
this
.
dealCompanyTree
(
temp
);
if
(!
ValidationUtil
.
isEmpty
(
children
))
{
Iterator
<
Map
>
it
=
children
.
iterator
();
while
(
it
.
hasNext
())
{
Map
temp
=
it
.
next
();
if
(
"emergencyCenter"
.
equals
(
company
.
getLevel
())
||
"company"
.
equals
(
company
.
getLevel
()))
{
it
.
remove
();
}
else
{
this
.
dealCompanyTree
(
temp
);
}
}
}
}
else
{
return
;
}
}
private
void
dealCompanyTree
(
Map
company
)
{
// 判断子节点是否是headquarter
Collection
children
=
(
Collection
)
company
.
get
(
"children"
);
Iterator
<
Map
>
it
=
children
.
iterator
();
while
(
it
.
hasNext
())
{
Map
temp
=
it
.
next
();
if
(
temp
.
get
(
"level"
).
equals
(
"emergencyCenter"
)
||
temp
.
get
(
"level"
).
equals
(
"company"
))
{
it
.
remove
();
}
else
{
this
.
dealCompanyTree
(
temp
);
if
(!
ValidationUtil
.
isEmpty
(
children
))
{
Iterator
<
Map
>
it
=
children
.
iterator
();
while
(
it
.
hasNext
())
{
Map
temp
=
it
.
next
();
if
(
"emergencyCenter"
.
equals
(
temp
.
get
(
"level"
))
||
"company"
.
equals
(
temp
.
get
(
"level"
)))
{
it
.
remove
();
}
else
{
this
.
dealCompanyTree
(
temp
);
}
}
}
}
}
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