Merge remote-tracking branch 'origin/master-convertToPBom-lhj09014' into test
This commit is contained in:
commit
674909b5e3
|
|
@ -997,19 +997,20 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
|||
if (CollUtil.isNotEmpty(eBomToPBom.getPBomParentResult())) {
|
||||
//1、删掉pbom 父级的数据
|
||||
List<BomNewPbomParentEntity> pbomParent = eBomToPBom.getPBomParentResult().stream().filter(p -> (p.getMaterialDesc().contains("电控系统") && p.getMaterialDesc().contains("直发")) ||
|
||||
p.getMaterialDesc().contains("电控系统") && p.getMaterialDesc().contains("制作")).collect(Collectors.toList());
|
||||
(p.getMaterialDesc().contains("电控系统") && p.getMaterialDesc().contains("制作"))).collect(Collectors.toList());
|
||||
eBomToPBom.getPBomParentResult().removeAll(pbomParent);
|
||||
//2、删掉pbom 子级的数据
|
||||
List<BomNewPbomChildEntity> pbomChild = eBomToPBom.getPBomChildResult().stream()
|
||||
.filter(c -> pbomParent.stream().map(BomNewPbomParentEntity::getRowId).collect(Collectors.toList()).contains(c.getParentRowId()))
|
||||
.collect(Collectors.toList());
|
||||
eBomToPBom.getPBomChildResult().removeAll(pbomChild);
|
||||
//3、删掉ebom 父级的数据
|
||||
List<Long> ebomParentIdList = pbomParent.stream().map(BomNewPbomParentEntity::getSourceRowId).collect(Collectors.toList());
|
||||
this.delBatch(ebomParentIdList);
|
||||
//4、删掉ebom 子级的数据
|
||||
ebomChildService.remove(Wrappers.<BomNewEbomChildEntity>lambdaQuery().in(BomNewEbomChildEntity::getParentRowId,ebomParentIdList));
|
||||
|
||||
if(!pbomParent.isEmpty()){
|
||||
//3、删掉ebom 父级的数据
|
||||
List<Long> ebomParentIdList = pbomParent.stream().map(BomNewPbomParentEntity::getSourceRowId).collect(Collectors.toList());
|
||||
this.delBatch(ebomParentIdList);
|
||||
//4、删掉ebom 子级的数据
|
||||
ebomChildService.remove(Wrappers.<BomNewEbomChildEntity>lambdaQuery().in(BomNewEbomChildEntity::getParentRowId,ebomParentIdList));
|
||||
}
|
||||
}
|
||||
|
||||
if (CollUtil.isNotEmpty(eBomToPBom.getPBomParentResult())) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue