From 8b62943bfa734934c790a515ea32e3c972031ea1 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Sat, 25 Jan 2025 14:30:47 +0800 Subject: [PATCH] =?UTF-8?q?2025-01-25=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../part/service/impl/PartInformationServiceImpl.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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());