| | |
| | | ProductBom bom,ProductModel rootModel, |
| | | Map<String, Long> processMap, |
| | | List<BomImportErrorDto> errorList ) { |
| | | // 1. 获取children中子项产品编号为空的数据 |
| | | List<BomImportDto> parentChildren = children |
| | | .stream() |
| | | .filter(child -> StringUtils.isEmpty(child.getChildCode())) |
| | | .collect(Collectors.toList()); |
| | | if(CollectionUtils.isEmpty(parentChildren)){ |
| | | return; |
| | | } |
| | | BomImportDto parentId = parentChildren.get(0); // 父级数据 |
| | | ProductStructure rootNode = new ProductStructure(); |
| | | rootNode.setBomId(bom.getId()); |
| | | rootNode.setParentId(null); // 顶层没有父节点 |