|
|
|
@ -75,7 +75,7 @@ public class QuoteDetailBomServiceImpl extends ServiceImpl<QuoteDetailBomMapper, |
|
|
|
Map<Long, List<QuoteDetailBom>> bomMap = bomList.stream().collect(Collectors.groupingBy(QuoteDetailBom::getTreeId)); |
|
|
|
// 单个计算 |
|
|
|
for (QuoteDetailBomTree tree : trees) { |
|
|
|
if (Objects.equals(tree.getParentId(),0L)){ |
|
|
|
if (Objects.equals(tree.getParentId(),0L) || !"Purchase".equals(tree.getBomType())){ |
|
|
|
continue; |
|
|
|
} |
|
|
|
BigDecimal decimal = nodeTree(trees, bomMap, tree.getId(),detail); |
|
|
|
@ -121,14 +121,11 @@ public class QuoteDetailBomServiceImpl extends ServiceImpl<QuoteDetailBomMapper, |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
for (QuoteDetailBom bom : bomMap.get(treeId)) { |
|
|
|
// if (Objects.isNull(bom.getLevelCost())){ |
|
|
|
// bom.setLevelCost(calculateQuotePrice(bom, detail)); |
|
|
|
// if ("Y".equals(bom.getBomFlag())){ |
|
|
|
// bom.setLevelCost(BigDecimal.ZERO); |
|
|
|
// } |
|
|
|
// } |
|
|
|
price = price.add(bom.getLevelCost()); |
|
|
|
List<QuoteDetailBom> bomList = bomMap.get(treeId); |
|
|
|
if (Objects.nonNull(bomList)){ |
|
|
|
for (QuoteDetailBom bom : bomList) { |
|
|
|
price = price.add(bom.getLevelCost()); |
|
|
|
} |
|
|
|
} |
|
|
|
return price; |
|
|
|
} |
|
|
|
|