From 51a7f0c4a0a0b7878df23dae07fea68b9b57dddf Mon Sep 17 00:00:00 2001 From: jing's Date: Wed, 7 Aug 2024 18:07:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A1=AB=E8=B4=9F=E6=95=B0=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E6=8A=A5=E9=94=99=EF=BC=8C=E6=A0=A1=E9=AA=8C=E8=A7=84=E5=88=99?= =?UTF-8?q?=E8=A6=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bomnew/service/BomNewEbomParentService.java | 15 ++++++++------- .../service/domain/EBom/CheckEBomException.java | 2 +- .../bomnew/service/domain/EBom/EBomEdit.java | 10 ++++------ 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewEbomParentService.java b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewEbomParentService.java index fa807188..4ea43f09 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewEbomParentService.java +++ b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewEbomParentService.java @@ -2181,6 +2181,14 @@ public class BomNewEbomParentService extends ServiceImpl allBom = Convert.convert(new TypeReference>() { + }, eBomEdit.childEntities); + + CheckEBomException checkEBomException = new CheckEBomException(allBom); + checkEBomException.checkContainExcept(checkStatus); + } + if (eBomEdit.getParentEntity() != null) { @@ -2191,13 +2199,6 @@ public class BomNewEbomParentService extends ServiceImpl allBom = Convert.convert(new TypeReference>() { - }, eBomEdit.childEntities); - - CheckEBomException checkEBomException = new CheckEBomException(allBom); - checkEBomException.checkContainExcept(checkStatus); - } if (CollectionUtil.isNotEmpty(eBomEdit.childEntities)) { diff --git a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/EBom/CheckEBomException.java b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/EBom/CheckEBomException.java index 783bc9ca..fd166cfe 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/EBom/CheckEBomException.java +++ b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/EBom/CheckEBomException.java @@ -130,7 +130,7 @@ public class CheckEBomException { && (MaterialGetEnum.MaterialStateEnum.STATE_NO_4.equalsValue(vo.getMaterialState()) || MaterialGetEnum.MaterialStateEnum.STATE_NO_5.equalsValue(vo.getMaterialState()))) { vo.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_2.getValue()); - } else if (StrUtil.isBlank(vo.getMaterialNo()) || Objects.isNull(vo.getNum()) || BigDecimal.ZERO.compareTo(vo.getNum()) >= 0) { + } else if (StrUtil.isBlank(vo.getMaterialNo()) || Objects.isNull(vo.getNum())) { vo.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_4.getValue()); } else if (StrUtil.isNotBlank(vo.getMaterialNo()) && Objects.isNull(vo.getMaterialState())) { vo.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_7.getValue()); diff --git a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/EBom/EBomEdit.java b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/EBom/EBomEdit.java index 65908e87..a1464756 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/EBom/EBomEdit.java +++ b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/EBom/EBomEdit.java @@ -203,11 +203,12 @@ public class EBomEdit { if(StrUtil.isEmpty(child.getOrderNumber())){ child.setOrderNumber("001"); } - if (dto.getOpType() == 2) { + if (dto.getOpType() == EbomEditStatusEnum.HANDLER_FINISHED.getValue()) { child.setExceptionStatus(EBomExceptionStatusEnum.OK.getValue()); // parent.setExceptionStatus(EBomExceptionStatusEnum.OK.getValue()); checkExcept(dto.getParent(), child); } + if (StrUtil.isNotBlank(child.getProjectType())) { child.setProjectType(child.getProjectType().toUpperCase()); } @@ -241,8 +242,7 @@ public class EBomEdit { child.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_4.getValue()); } } else { - if (StrUtil.isBlank(child.getMaterialNo()) || Objects.isNull(child.getNum()) - || BigDecimal.ZERO.compareTo(child.getNum()) >= 0) { + if (StrUtil.isBlank(child.getMaterialNo()) || Objects.isNull(child.getNum())) { child.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_4.getValue()); } else if (StrUtil.isEmpty(child.getProjectType())) { child.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_8.getValue()); @@ -251,9 +251,7 @@ public class EBomEdit { if (StrUtil.equals(ProjectTypeInputTypeEnum.ProjectTypeEnum.TYPE_Q.getValue(), child.getProjectType())) { child.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_9.getValue()); } - // if (StrUtil.equals(ProjectTypeInputTypeEnum.ProjectTypeEnum.TYPE_F.getValue(), child.getProjectType())) { - // child.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_10.getValue()); - // } + } }