生成PBOM时,bom没有子项的话,仅生成EBOM正式表,不生成PBOM任务2
This commit is contained in:
parent
cb40340257
commit
cdcf08e706
|
|
@ -1022,9 +1022,10 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
// //4、删掉ebom 子级的数据
|
// //4、删掉ebom 子级的数据
|
||||||
// ebomChildService.remove(Wrappers.<BomNewEbomChildEntity>lambdaQuery().in(BomNewEbomChildEntity::getParentRowId,ebomParentIdList));
|
// ebomChildService.remove(Wrappers.<BomNewEbomChildEntity>lambdaQuery().in(BomNewEbomChildEntity::getParentRowId,ebomParentIdList));
|
||||||
// }
|
// }
|
||||||
//3、判断parent下是否有子级,如果没有的话,把parent给删除了 物料****因下级全部是F项,仅保存EBOM,未生成PBOM数据
|
//3、判断parent下是否有子级,排除电控系统和仙桃的,如果没有的话,把parent给删除了 物料****因下级全部是F项,仅保存EBOM,未生成PBOM数据 仙桃)
|
||||||
List<BomNewPbomParentEntity> emptyChildParentList = eBomToPBom.getPBomParentResult().stream()
|
List<BomNewPbomParentEntity> emptyChildParentList = eBomToPBom.getPBomParentResult().stream()
|
||||||
.filter(p -> !p.getMaterialDesc().contains("电控系统") && !eBomToPBom.getPBomChildResult().stream().map(BomNewPbomChildEntity::getParentRowId).collect(Collectors.toList()).contains(p.getRowId()) )
|
.filter(p -> !p.getMaterialDesc().contains("电控系统") && !p.getMaterialDesc().contains("仙桃)")
|
||||||
|
&& !eBomToPBom.getPBomChildResult().stream().map(BomNewPbomChildEntity::getParentRowId).collect(Collectors.toList()).contains(p.getRowId()) )
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
if(!emptyChildParentList.isEmpty()){
|
if(!emptyChildParentList.isEmpty()){
|
||||||
List<BomNewPbomParentEntity> fList = emptyChildParentList.stream().filter(p -> {
|
List<BomNewPbomParentEntity> fList = emptyChildParentList.stream().filter(p -> {
|
||||||
|
|
@ -1216,7 +1217,8 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
eBomToPBom.getPBomChildResult().removeAll(pbomChild);
|
eBomToPBom.getPBomChildResult().removeAll(pbomChild);
|
||||||
//3、判断parent下是否有子级,如果没有的话,把parent给删除了 物料****因下级全部是F项,仅保存EBOM,未生成PBOM数据
|
//3、判断parent下是否有子级,如果没有的话,把parent给删除了 物料****因下级全部是F项,仅保存EBOM,未生成PBOM数据
|
||||||
List<BomNewPbomParentEntity> emptyChildParentList = eBomToPBom.getPBomParentResult().stream()
|
List<BomNewPbomParentEntity> emptyChildParentList = eBomToPBom.getPBomParentResult().stream()
|
||||||
.filter(p -> !p.getMaterialDesc().contains("电控系统") && !eBomToPBom.getPBomChildResult().stream().map(BomNewPbomChildEntity::getParentRowId).collect(Collectors.toList()).contains(p.getRowId()) )
|
.filter(p -> !p.getMaterialDesc().contains("电控系统") && !p.getMaterialDesc().contains("仙桃)")
|
||||||
|
&& !eBomToPBom.getPBomChildResult().stream().map(BomNewPbomChildEntity::getParentRowId).collect(Collectors.toList()).contains(p.getRowId()) )
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
if(!emptyChildParentList.isEmpty()){
|
if(!emptyChildParentList.isEmpty()){
|
||||||
List<BomNewPbomParentEntity> fList = emptyChildParentList.stream().filter(p -> {
|
List<BomNewPbomParentEntity> fList = emptyChildParentList.stream().filter(p -> {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue