diff --git a/src/main/java/com/spring/modules/part/service/impl/PartInformationServiceImpl.java b/src/main/java/com/spring/modules/part/service/impl/PartInformationServiceImpl.java index e8cfd5ec..016c4439 100644 --- a/src/main/java/com/spring/modules/part/service/impl/PartInformationServiceImpl.java +++ b/src/main/java/com/spring/modules/part/service/impl/PartInformationServiceImpl.java @@ -2752,7 +2752,13 @@ public class PartInformationServiceImpl extends ServiceImpl bomList = partInformationMapper.queryBomAlternativeList(data); - map.put("bomList", bomList); + if ("Manufactured".equals(partInformation.getPartType())) { + List collect = bomList.stream().filter(a -> "Manufacturing".equals(a.getBomType())).collect(Collectors.toList()); + map.put("bomList", collect); + } else if ("Purchased".equals(partInformation.getPartType())){ + List collect = bomList.stream().filter(a -> "Purchase".equals(a.getBomType())).collect(Collectors.toList()); + map.put("bomList", collect); + } } List routingList = partInformationMapper.queryRoutingAlternativeList(data); map.put("routingList", routingList); @@ -2961,7 +2967,7 @@ public class PartInformationServiceImpl extends ServiceImpl bomHeaderList = bomAlternativeList.stream().collect(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(BomDetailEntity::getEngChgLevel).thenComparing(BomDetailEntity::getBomType)))); + TreeSet bomHeaderList = bomAlternativeList.stream().collect(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(BomDetailEntity::getEngChgLevel)))); for (BomDetailVo bomDetailVo : bomHeaderList) { BomHeaderEntity bomHeader = new BomHeaderEntity(); bomHeader.setSite(ifsPart.getSite());