Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
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
fangxinjiang
yifu-mvp
Commits
58b7488e
Commit
58b7488e
authored
Jun 20, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
huyc 部门根节点数值修改
parent
07ebe7a2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
SysDeptServiceImpl.java
...d.plus.v1/yifu/admin/service/impl/SysDeptServiceImpl.java
+13
-9
No files found.
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/service/impl/SysDeptServiceImpl.java
View file @
58b7488e
...
...
@@ -205,6 +205,7 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
String
userId
=
""
;
if
(
dn
.
contains
(
"uid"
))
{
userId
=
dn
.
substring
(
4
,
dn
.
indexOf
(
","
,
1
));
dn
=
dn
.
substring
(
dn
.
indexOf
(
","
,
1
)
+
1
);
}
List
<
String
>
list
=
Arrays
.
asList
(
dn
.
split
(
","
)).
stream
().
filter
(
e
->
(
e
.
contains
(
"ou="
)
&&
!
e
.
equals
(
"ou=wanxin"
))).
collect
(
Collectors
.
toList
());
String
deptName
=
list
.
get
(
0
).
replace
(
"ou="
,
""
);
...
...
@@ -227,23 +228,26 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
if
(
null
!=
sysDept
)
{
SysDept
sysDeptCount
=
this
.
getOne
(
Wrappers
.<
SysDept
>
query
().
lambda
().
eq
(
SysDept:
:
getDeptDn
,
dn
));
if
(
null
==
sysDeptCount
)
{
if
(
StringUtils
.
isEmpty
(
userId
))
{
SysDept
insertSysDept
=
new
SysDept
();
insertSysDept
.
setName
(
deptName
);
insertSysDept
.
setParentId
(
sysDept
.
getDeptId
());
insertSysDept
.
setDeptDn
(
dn
);
this
.
save
(
insertSysDept
);
}
}
else
{
if
(
StringUtils
.
isNotBlank
(
userId
))
{
if
(
!
StringUtils
.
isEmpty
(
userId
))
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"userId"
,
userId
);
map
.
put
(
"deptId"
,
sysDeptCount
.
getDeptId
());
updUserList
.
add
(
map
);
}
}
else
{
sysDeptCount
.
setName
(
deptName
);
sysDeptCount
.
setParentId
(
sysDept
.
getDeptId
());
this
.
updateDeptById
(
sysDeptCount
);
}
}
}
}
catch
(
Exception
e
)
{
log
.
info
(
"更新异常:"
+
e
.
getMessage
());
return
R
.
failed
(
"同步信息失败!"
);
...
...
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