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
369eece7
Commit
369eece7
authored
Sep 28, 2021
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug 3026 【web】日常管理>机场单位,删除有级联数据的部门时,应无法直接删除
parent
cbd3eb56
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
FireTeamServiceImpl.java
...boot/module/jcs/biz/service/impl/FireTeamServiceImpl.java
+9
-2
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/FireTeamServiceImpl.java
View file @
369eece7
...
@@ -10,6 +10,7 @@ import java.util.stream.Collectors;
...
@@ -10,6 +10,7 @@ import java.util.stream.Collectors;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -262,8 +263,14 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
...
@@ -262,8 +263,14 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
*/
*/
public
void
deleteById
(
Long
parent
)
throws
Exception
{
public
void
deleteById
(
Long
parent
)
throws
Exception
{
// 查询是否有下属队伍
// 查询是否有下属队伍
List
<
FireTeamDto
>
fireTeamList
=
queryForList
(
null
,
false
,
parent
);
// List<FireTeamDto> fireTeamList = queryForList(null, false, parent);
if
(!
ValidationUtil
.
isEmpty
(
fireTeamList
)
&&
fireTeamList
.
size
()
>
0
)
{
/*3026 【web】日常管理>机场单位,删除有级联数据的部门时,应无法直接删除 chenzhao 2021-09-28 start*/
LambdaQueryWrapper
<
FireTeam
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
FireTeam:
:
getParent
,
parent
);
wrapper
.
eq
(
BaseEntity:
:
getIsDelete
,
0
);
List
<
FireTeam
>
fireTeams
=
baseMapper
.
selectList
(
wrapper
);
/*3026 【web】日常管理>机场单位,删除有级联数据的部门时,应无法直接删除 chenzhao 2021-09-28 end*/
if
(!
ValidationUtil
.
isEmpty
(
fireTeams
)
&&
fireTeams
.
size
()
>
0
)
{
// 有下属队伍不能删除
// 有下属队伍不能删除
throw
new
BaseException
(
"该队伍下有下级队伍,不能删除"
,
null
,
"该队伍下有下级队伍,不能删除"
);
throw
new
BaseException
(
"该队伍下有下级队伍,不能删除"
,
null
,
"该队伍下有下级队伍,不能删除"
);
}
}
...
...
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