From f65e0d342fe3bec46fd00eb30b67fe301498e9f7 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Wed, 24 Jun 2026 16:28:52 +0800 Subject: [PATCH] =?UTF-8?q?2026-06-24=20=E9=A1=B9=E7=9B=AE=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E7=9A=84=E3=80=90Excel=E5=AF=BC=E5=85=A5=E3=80=91?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E4=BC=98=E5=8C=96=EF=BC=9B=20=E5=BE=85?= =?UTF-8?q?=E6=8A=A5=E4=BB=B7=E6=B8=85=E5=8D=95=E3=80=90=E6=8A=A5=E4=BB=B7?= =?UTF-8?q?=E3=80=91=E4=BC=98=E5=8C=96=EF=BC=8C=E5=81=9A=E4=BA=86=E9=98=B2?= =?UTF-8?q?=E5=BE=A1=E6=80=A7=E4=BF=9D=E6=8A=A4=EF=BC=8C=E9=81=87=E5=88=B0?= =?UTF-8?q?=E5=BE=AA=E7=8E=AF=E5=BC=95=E7=94=A8=E7=9A=84=E7=BB=93=E6=9E=84?= =?UTF-8?q?=E4=BC=9A=E7=BB=99=E5=87=BA=E6=98=8E=E7=A1=AE=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/PartInformationServiceImpl.java | 39 ++++++++++---- .../impl/QuoteDetailBomTreeServiceImpl.java | 52 ++++++++++++++++++- 2 files changed, 79 insertions(+), 12 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 bf7b76bc..b058fc91 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 @@ -3864,23 +3864,29 @@ public class PartInformationServiceImpl extends ServiceImpl ifsConFactory, Map costCache, Map workCenterCostCache) { + private BomNodeData collectBomData(QuoteDetail detail, + Long parentId, + Integer level, + Supplier ifsConFactory, + Map costCache, + Map workCenterCostCache) { + return collectBomData(detail, parentId, level, ifsConFactory, costCache, workCenterCostCache, new LinkedHashSet<>()); + } + + private BomNodeData collectBomData(QuoteDetail detail, + Long parentId, + Integer level, + Supplier ifsConFactory, + Map costCache, + Map workCenterCostCache, + Set recursionPath) { // 统一先尝试将临时料映射到正式料,保证新建与“切换版本刷新”取数来源一致 PartInformationEntity mappedPart = baseMapper.queryPart(detail.getSite(), detail.getPartNo()); if (Objects.nonNull(mappedPart) && "Y".equals(mappedPart.getStatus())) { @@ -161,6 +176,15 @@ public class QuoteDetailBomTreeServiceImpl extends ServiceImpl nextRecursionPath = new LinkedHashSet<>(recursionPath); + nextRecursionPath.add(currentBomPathKey); bom.setParentId(parentId); bom.setLevel(level); log.info("BOM信息:{}", bom); @@ -205,7 +229,15 @@ public class QuoteDetailBomTreeServiceImpl extends ServiceImpl recursionPath, String currentBomPathKey) { + List fullPath = new ArrayList<>(recursionPath); + fullPath.add(currentBomPathKey); + return String.join(" -> ", fullPath); + } + private void copyCommonFields(QuoteDetail source, QuoteDetail target) { target.setId(source.getId()); target.setQuoteId(source.getQuoteId());