【工艺路线】获取PBOM列表

This commit is contained in:
10001392 2024-12-13 14:40:32 +08:00
parent 7a9dd2c4c9
commit 428b63558a
1 changed files with 9 additions and 0 deletions

View File

@ -318,6 +318,15 @@ public class ProcessRouteTaskService extends ServiceImpl<ProcessRouteTaskMapper,
for (BomNewPBomVO vo: nodeList) {
vo.setBomVersion(rootParent.getCurrentVersion());
}
// rowId + 层级如果重复则取一次就好
ListIterator<BomNewPBomVO> iterator = nodeList.listIterator();
while (iterator.hasNext()) {
BomNewPBomVO bomNewPBomVO = iterator.next();
List<BomNewPBomVO> list = nodeList.stream().filter(item -> item.getRowId().equals(bomNewPBomVO.getRowId()) && item.getLevelNum().equals(bomNewPBomVO.getLevelNum())).collect(Collectors.toList());
if (CollUtil.isNotEmpty(list) && list.size() > 1) {
iterator.remove();
}
}
nodesList.addAll(nodeList);
if (CollUtil.isNotEmpty(nodesList)) {
Set<Long> parentRowIds = nodesList.stream().map(BomNewPBomVO::getParentRowId).collect(Collectors.toSet());