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
0479a0d8
Commit
0479a0d8
authored
Mar 05, 2025
by
chenyuxi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:部门调整
parent
f10c2242
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
SysDeptServiceImpl.java
...d/plus/v1/yifu/admin/service/impl/SysDeptServiceImpl.java
+9
-4
SysDeptMapper.xml
...yifu-upms-biz/src/main/resources/mapper/SysDeptMapper.xml
+1
-1
No files found.
yifu-upms/yifu-upms-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/admin/service/impl/SysDeptServiceImpl.java
View file @
0479a0d8
...
...
@@ -352,6 +352,7 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
// 先存当前部门ID
allDepartIdSet
.
add
(
deptVo
.
getDeptId
().
toString
());
String
ancestors
=
deptVo
.
getAncestors
();
if
(
Common
.
isNotNull
(
ancestors
)){
String
[]
ancestorArr
=
ancestors
.
split
(
CommonConstants
.
COMMA_STRING
);
Set
<
String
>
ancestorDeptIdSet
=
Arrays
.
stream
(
ancestorArr
).
collect
(
Collectors
.
toSet
());
if
(
Common
.
isNotNull
(
ancestorDeptIdSet
)){
...
...
@@ -359,6 +360,7 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
}
}
}
}
sysDeptList
=
baseMapper
.
cspDeptListByDeptIdSet
(
dept
,
allDepartIdSet
);
}
...
...
@@ -534,6 +536,9 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
if
(
Common
.
isEmpty
(
findInfo
))
{
return
R
.
failed
(
"部门未找到"
);
}
if
(
findInfo
.
getName
().
equals
(
dept
.
getName
())){
return
R
.
failed
(
"名称未发生变化,未做更新"
);
}
SysDept
nameInfo
=
baseMapper
.
checkDeptNameUnique
(
findInfo
.
getProjectNo
(),
dept
.
getName
(),
findInfo
.
getParentId
());
if
(
Common
.
isNotNull
(
nameInfo
)
&&
nameInfo
.
getDeptId
().
longValue
()
!=
dept
.
getDeptId
().
longValue
())
{
return
R
.
failed
(
"已存在同级同名部门"
);
...
...
yifu-upms/yifu-upms-biz/src/main/resources/mapper/SysDeptMapper.xml
View file @
0479a0d8
...
...
@@ -19,7 +19,7 @@
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.admin.mapper.SysDeptMapper"
>
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysDept"
>
<id
column=
"dept
I
d"
property=
"deptId"
/>
<id
column=
"dept
_i
d"
property=
"deptId"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"parent_id"
property=
"parentId"
/>
<result
column=
"dept_dn"
property=
"deptDn"
/>
...
...
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