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
d805f471
Commit
d805f471
authored
May 23, 2024
by
李秀明
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 设备平台-消防系统配置-删除分组SQL空指针报错处理
parent
f2c93380
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
FireFightingSystemGroupServiceImpl.java
...nage/service/impl/FireFightingSystemGroupServiceImpl.java
+5
-2
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireFightingSystemGroupServiceImpl.java
View file @
d805f471
...
@@ -104,10 +104,10 @@ public class FireFightingSystemGroupServiceImpl extends ServiceImpl<FireFighting
...
@@ -104,10 +104,10 @@ public class FireFightingSystemGroupServiceImpl extends ServiceImpl<FireFighting
// 更新数据前先清理解绑的系统与相关关系表的数据
// 更新数据前先清理解绑的系统与相关关系表的数据
if
(
Objects
.
nonNull
(
fireFightingSystemGroupModalDto
.
getId
()))
{
if
(
Objects
.
nonNull
(
fireFightingSystemGroupModalDto
.
getId
()))
{
FireFightingSystemGroupEntity
entity
=
fireFightingSystemGroupMapper
.
selectById
(
fireFightingSystemGroupModalDto
.
getId
());
FireFightingSystemGroupEntity
entity
=
fireFightingSystemGroupMapper
.
selectById
(
fireFightingSystemGroupModalDto
.
getId
());
String
[]
systemIds
=
entity
.
getSystemIds
().
split
(
","
);
List
<
String
>
systemIds
=
Arrays
.
asList
(
entity
.
getSystemIds
().
split
(
","
)
);
systemEquipmentRelationService
.
remove
(
systemEquipmentRelationService
.
remove
(
Wrappers
.<
SystemEquipmentRelationEntity
>
lambdaQuery
()
Wrappers
.<
SystemEquipmentRelationEntity
>
lambdaQuery
()
.
in
(
SystemEquipmentRelationEntity:
:
getSystemId
,
(
Object
)
systemIds
)
.
in
(
SystemEquipmentRelationEntity:
:
getSystemId
,
systemIds
)
);
);
}
}
...
@@ -200,6 +200,9 @@ public class FireFightingSystemGroupServiceImpl extends ServiceImpl<FireFighting
...
@@ -200,6 +200,9 @@ public class FireFightingSystemGroupServiceImpl extends ServiceImpl<FireFighting
.
orderByAsc
(
FireFightingSystemGroupEntity:
:
getSort
,
FireFightingSystemGroupEntity:
:
getCreateDate
)
.
orderByAsc
(
FireFightingSystemGroupEntity:
:
getSort
,
FireFightingSystemGroupEntity:
:
getCreateDate
)
);
);
List
<
Long
>
systemIds
=
groupEntities
.
stream
().
map
(
FireFightingSystemGroupEntity:
:
getSystemIds
).
map
(
s
->
s
.
split
(
","
)).
flatMap
(
Arrays:
:
stream
).
map
(
Long:
:
parseLong
).
collect
(
Collectors
.
toList
());
List
<
Long
>
systemIds
=
groupEntities
.
stream
().
map
(
FireFightingSystemGroupEntity:
:
getSystemIds
).
map
(
s
->
s
.
split
(
","
)).
flatMap
(
Arrays:
:
stream
).
map
(
Long:
:
parseLong
).
collect
(
Collectors
.
toList
());
if
(
systemIds
.
isEmpty
())
{
return
new
JSONArray
();
}
// List to Map -> key: systemId, value: FireFightingSystemEntity
// List to Map -> key: systemId, value: FireFightingSystemEntity
Map
<
Long
,
FireFightingSystemEntity
>
systemMap
=
fireFightingSystemMapper
.
selectList
(
Map
<
Long
,
FireFightingSystemEntity
>
systemMap
=
fireFightingSystemMapper
.
selectList
(
...
...
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