From dfaf9c402b153fa5d03ceb58271a035b81b050e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A7=E7=B1=B3?= <470431449@qq.com> Date: Fri, 13 Sep 2024 17:12:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=ACpbom-=E6=8A=A5=E9=94=99=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nflg/product/bomnew/service/domain/EBom/EBomToPbomBase.java | 2 +- .../service/domain/EBom/topbomnew/FormalEBomToPbomBase.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/EBom/EBomToPbomBase.java b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/EBom/EBomToPbomBase.java index 37ab1b07..c4f91661 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/EBom/EBomToPbomBase.java +++ b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/EBom/EBomToPbomBase.java @@ -189,7 +189,7 @@ public abstract class EBomToPbomBase { //if (oldParent.getCreatedBy().equals(parentVo.getCreatedBy())) { if (ConvertToPBomModelEnum.OVERRIDE.equalsValue(convertMode.getValue())) { //当bom创建人为本人 或 版本大于当前版本则覆盖 - if (oldParent.getCreatedBy().equals(parentVo.getCreatedBy()) || VersionUtil.compare(parentVo.getCurrentVersion(),oldParent.getCurrentVersion())>0){ + if (oldParent.getCreatedBy().equals(parentVo.getCreatedBy()) || parentVo.getCurrentVersion()==null || VersionUtil.compare(parentVo.getCurrentVersion(),oldParent.getCurrentVersion())>0){ SpringUtil.getBean(BomNewPbomChildService.class).getBaseMapper().deleteByMap(ImmutableMap.of("parent_row_id", oldParent.getRowId())); // this.delParentRowIds.add(oldParent.getRowId()); oldParent.setSourceRowId(parentVo.getBomRowId()); diff --git a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/EBom/topbomnew/FormalEBomToPbomBase.java b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/EBom/topbomnew/FormalEBomToPbomBase.java index 0aca98cf..93698942 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/EBom/topbomnew/FormalEBomToPbomBase.java +++ b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/EBom/topbomnew/FormalEBomToPbomBase.java @@ -193,7 +193,7 @@ public abstract class FormalEBomToPbomBase { else if (Objects.nonNull(oldParent) && oldParent.getStatus() < EBomStatusEnum.PUBLISHED.getValue()) { //if (oldParent.getCreatedBy().equals(parentVo.getCreatedBy())) { if (ConvertToPBomModelEnum.OVERRIDE.equalsValue(convertMode.getValue())) { - if (oldParent.getCreatedBy().equals(parentVo.getCreatedBy()) || VersionUtil.compare(parentVo.getCurrentVersion(),oldParent.getCurrentVersion())>0) { + if (oldParent.getCreatedBy().equals(parentVo.getCreatedBy()) || parentVo.getCurrentVersion()==null || VersionUtil.compare(parentVo.getCurrentVersion(),oldParent.getCurrentVersion())>0) { SpringUtil.getBean(BomNewPbomChildService.class).getBaseMapper().deleteByMap(ImmutableMap.of("parent_row_id", oldParent.getRowId())); oldParent.setSourceRowId(parentVo.getBomRowId()); oldParent.setCreatedTime(LocalDateTime.now());