Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
property-management
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
property-management
Commits
cdf6ec50
Commit
cdf6ec50
authored
May 20, 2019
by
zhangdaihao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决oracle下,部门展示不出的问题
parent
1e4bde02
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/util/FindsDepartsChildrenUtil.java
+4
-3
No files found.
jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/util/FindsDepartsChildrenUtil.java
View file @
cdf6ec50
package
org
.
jeecg
.
modules
.
system
.
util
;
package
org
.
jeecg
.
modules
.
system
.
util
;
import
org.jeecg.common.util.oConvertUtils
;
import
org.jeecg.modules.system.entity.SysDepart
;
import
org.jeecg.modules.system.entity.SysDepart
;
import
org.jeecg.modules.system.model.DepartIdModel
;
import
org.jeecg.modules.system.model.DepartIdModel
;
import
org.jeecg.modules.system.model.SysDepartTreeModel
;
import
org.jeecg.modules.system.model.SysDepartTreeModel
;
...
@@ -31,7 +32,7 @@ public class FindsDepartsChildrenUtil {
...
@@ -31,7 +32,7 @@ public class FindsDepartsChildrenUtil {
List
<
SysDepartTreeModel
>
records
=
new
ArrayList
<>();
List
<
SysDepartTreeModel
>
records
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
recordList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
recordList
.
size
();
i
++)
{
SysDepart
depart
=
recordList
.
get
(
i
);
SysDepart
depart
=
recordList
.
get
(
i
);
records
.
add
(
new
SysDepartTreeModel
(
recordList
.
get
(
i
)
));
records
.
add
(
new
SysDepartTreeModel
(
depart
));
}
}
List
<
SysDepartTreeModel
>
tree
=
findChildren
(
records
,
idList
);
List
<
SysDepartTreeModel
>
tree
=
findChildren
(
records
,
idList
);
setEmptyChildrenAsNull
(
tree
);
setEmptyChildrenAsNull
(
tree
);
...
@@ -52,7 +53,7 @@ public class FindsDepartsChildrenUtil {
...
@@ -52,7 +53,7 @@ public class FindsDepartsChildrenUtil {
List
<
SysDepartTreeModel
>
treeList
=
new
ArrayList
<>();
List
<
SysDepartTreeModel
>
treeList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
recordList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
recordList
.
size
();
i
++)
{
SysDepartTreeModel
branch
=
recordList
.
get
(
i
);
SysDepartTreeModel
branch
=
recordList
.
get
(
i
);
if
(
""
.
equals
(
branch
.
getParentId
()))
{
if
(
oConvertUtils
.
isEmpty
(
branch
.
getParentId
()))
{
treeList
.
add
(
branch
);
treeList
.
add
(
branch
);
DepartIdModel
departIdModel
=
new
DepartIdModel
().
convert
(
branch
);
DepartIdModel
departIdModel
=
new
DepartIdModel
().
convert
(
branch
);
idList
.
add
(
departIdModel
);
idList
.
add
(
departIdModel
);
...
@@ -73,7 +74,7 @@ public class FindsDepartsChildrenUtil {
...
@@ -73,7 +74,7 @@ public class FindsDepartsChildrenUtil {
DepartIdModel
idModel
=
idList
.
get
(
i
);
DepartIdModel
idModel
=
idList
.
get
(
i
);
for
(
int
i1
=
0
;
i1
<
recordList
.
size
();
i1
++)
{
for
(
int
i1
=
0
;
i1
<
recordList
.
size
();
i1
++)
{
SysDepartTreeModel
m
=
recordList
.
get
(
i1
);
SysDepartTreeModel
m
=
recordList
.
get
(
i1
);
if
(
m
.
getParentId
().
equals
(
model
.
getId
()))
{
if
(
m
.
getParentId
()
!=
null
&&
m
.
getParentId
()
.
equals
(
model
.
getId
()))
{
model
.
getChildren
().
add
(
m
);
model
.
getChildren
().
add
(
m
);
DepartIdModel
dim
=
new
DepartIdModel
().
convert
(
m
);
DepartIdModel
dim
=
new
DepartIdModel
().
convert
(
m
);
idModel
.
getChildren
().
add
(
dim
);
idModel
.
getChildren
().
add
(
dim
);
...
...
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