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
20931a82
Commit
20931a82
authored
Feb 22, 2022
by
maoying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除装备数据同步高斯库
parent
a786db39
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
8 deletions
+18
-8
EquipmentSpecificSerivceImpl.java
...quipmanage/service/impl/EquipmentSpecificSerivceImpl.java
+18
-8
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentSpecificSerivceImpl.java
View file @
20931a82
...
...
@@ -931,14 +931,7 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
int
res
=
this
.
baseMapper
.
deleteById
(
id
);
if
(
res
>
0
&&
syncSwitch
)
{
//数据同步
syncDataService
.
syncDeletedEquipmentSpecific
(
Arrays
.
asList
(
id
));
List
<
EquipmentIndexVO
>
indexBySpecificIdIn
=
equipmentSpecificIndexSerivce
.
getEquipIndexBySpecificIdIn
(
Arrays
.
asList
(
String
.
valueOf
(
id
)));
if
(!
indexBySpecificIdIn
.
isEmpty
())
{
List
<
Long
>
fireEquipmentInfoCollect
=
indexBySpecificIdIn
.
stream
().
filter
(
vo
->
0
==
vo
.
getIsIot
()).
map
(
EquipmentIndexVO:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
fireEquipMeasurementCollect
=
indexBySpecificIdIn
.
stream
().
filter
(
vo
->
1
==
vo
.
getIsIot
()).
map
(
EquipmentIndexVO:
:
getId
).
collect
(
Collectors
.
toList
());
syncDataService
.
syncDeletedEquipmentSpecificInfo
(
fireEquipmentInfoCollect
);
syncDataService
.
syncDeletedFireEquipMeasurement
(
fireEquipMeasurementCollect
);
}
delEquipmentSpecificSyncData
(
id
);
}
//判断装备表剩余数量,无剩余删除模板
QueryWrapper
<
EquipmentSpecific
>
wrapper
=
new
QueryWrapper
<>();
...
...
@@ -989,6 +982,18 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
}
}
public
void
delEquipmentSpecificSyncData
(
Long
id
){
//数据同步
syncDataService
.
syncDeletedEquipmentSpecific
(
Arrays
.
asList
(
id
));
List
<
EquipmentIndexVO
>
indexBySpecificIdIn
=
equipmentSpecificIndexSerivce
.
getEquipIndexBySpecificIdIn
(
Arrays
.
asList
(
String
.
valueOf
(
id
)));
if
(!
indexBySpecificIdIn
.
isEmpty
())
{
List
<
Long
>
fireEquipmentInfoCollect
=
indexBySpecificIdIn
.
stream
().
filter
(
vo
->
0
==
vo
.
getIsIot
()).
map
(
EquipmentIndexVO:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
fireEquipMeasurementCollect
=
indexBySpecificIdIn
.
stream
().
filter
(
vo
->
1
==
vo
.
getIsIot
()).
map
(
EquipmentIndexVO:
:
getId
).
collect
(
Collectors
.
toList
());
syncDataService
.
syncDeletedEquipmentSpecificInfo
(
fireEquipmentInfoCollect
);
syncDataService
.
syncDeletedFireEquipMeasurement
(
fireEquipMeasurementCollect
);
}
}
@Override
public
Object
getOneCard
(
Long
id
,
String
type
)
{
if
(
BitmapEnum
.
video
.
getKey
().
equals
(
type
))
{
...
...
@@ -1519,6 +1524,11 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
// 已入库
this
.
baseMapper
.
deleteEquipDataByStockDetailId
(
stockDetail
.
getId
(),
specificId
);
}
if
(
syncSwitch
)
{
//数据同步
delEquipmentSpecificSyncData
(
specificId
);
}
return
Boolean
.
TRUE
;
}
...
...
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