88# ebom工作明细张科001账号删除3100005886报错

This commit is contained in:
jing's 2024-03-30 17:44:23 +08:00
parent 483029dc39
commit 22c09cf185
1 changed files with 11 additions and 5 deletions

View File

@ -1491,18 +1491,24 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
List<Long> childList= eBomDel.getDelEBom().stream().filter(u -> (ObjectUtil.isNull(u.getBomRowId()) || u.getBomRowId().longValue()==0l))
.map(BomNewEbomParentVO::getRowId).collect(Collectors.toList());
this.getBaseMapper().delBatch(parentList);
if(CollUtil.isNotEmpty(parentList)) {
this.getBaseMapper().delBatch(parentList);
}
// QueryWrapper<BomNewEbomParentEntity> parentWrapper=new QueryWrapper<>();
// parentWrapper.lambda().in(BomNewEbomParentEntity::getRowId,parentList);
//
QueryWrapper<BomNewEbomChildEntity> childWrapper=new QueryWrapper<>();
childWrapper.lambda().in(BomNewEbomChildEntity::getRowId,childList);
if(CollUtil.isNotEmpty(childList)) {
QueryWrapper<BomNewEbomChildEntity> childWrapper = new QueryWrapper<>();
childWrapper.lambda().in(BomNewEbomChildEntity::getRowId, childList);
//
// this.remove(parentWrapper);
SpringUtil.getBean(BomNewEbomChildService.class).remove(childWrapper);
SpringUtil.getBean(BomNewEbomChildService.class).remove(childWrapper);
}
}else{
VUtils.isTure(true).throwMessage("未找到待你删除的数据");
VUtils.isTure(true).throwMessage("该bom下没有你删除的数据");
}