From 925b8839160c25078a0333780749f2cf2c8e62a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E9=B9=8F=E9=A3=9E?= Date: Mon, 17 Jun 2024 16:54:25 +0800 Subject: [PATCH] =?UTF-8?q?optimize(ebom):=20=E5=BC=82=E5=B8=B8=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E7=A7=BB=E9=99=A4=E5=BA=9F=E5=BC=83=E7=9A=84=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/EBom/CheckEBomException.java | 22 ++++++------------- 1 file changed, 7 insertions(+), 15 deletions(-) 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 723c277f..a30cded1 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 @@ -84,41 +84,34 @@ public class CheckEBomException { */ public void initException() { //初始化物料信息 - List materialBaseInfo = SpringUtil.getBean(MaterialMainService.class).intiMaterialInfo(allBomDetail, EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT); - - checkException(materialBaseInfo); + // List materialBaseInfo = SpringUtil.getBean(MaterialMainService.class).intiMaterialInfo(allBomDetail, EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT); + checkException(); } public void initException(List unCheckException) { //初始化物料信息 - List materialBaseInfo = SpringUtil.getBean(MaterialMainService.class).intiMaterialInfo(allBomDetail, EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT); + // List materialBaseInfo = SpringUtil.getBean(MaterialMainService.class).intiMaterialInfo(allBomDetail, EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT); this.unCheckExcept=unCheckException; - checkException(materialBaseInfo); + checkException(); } public void initException(String... ignorePropertyList) { - List materialBaseInfo = SpringUtil.getBean(MaterialMainService.class).intiMaterialInfo(allBomDetail, ignorePropertyList); - checkException(materialBaseInfo); + // List materialBaseInfo = SpringUtil.getBean(MaterialMainService.class).intiMaterialInfo(allBomDetail, ignorePropertyList); + checkException(); } - public void checkException(List materialBaseInfo) { + public void checkException() { for (BomNewEbomParentVO vo : allBomDetail) { - // if(Objects.isNull(vo.getExceptionStatus())) { //忽略不检查的如14 if (CollectionUtil.isNotEmpty(unCheckExcept) && vo.getExceptionStatus() != null && unCheckExcept.contains(vo.getExceptionStatus())) { continue; } - // BaseMaterialVO mainVO = materialBaseInfo.stream() - // .filter(u -> StrUtil.equals(u.getMaterialNo(), vo.getMaterialNo())) - // .findFirst() - // .orElse(null); vo.setExceptionStatus(EBomExceptionStatusEnum.OK.getValue()); - // } if (StrUtil.equals(BomConstant.PROJECT_TYPE_TEMPORARY, vo.getProjectType(), true)) { if (StrUtil.isBlank(vo.getMaterialDesc())) { vo.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_4.getValue()); @@ -137,7 +130,6 @@ public class CheckEBomException { vo.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_8.getValue()); } else if ((!StrUtil.equals("KG", StringUtil.toUpperCase(vo.getMaterialUnit())) && !StrUtil.equals(StringUtil.toUpperCase(vo.getMaterialUnit()), "PC")) - //|| (!Objects.isNull(mainVO) && !StrUtil.equals(vo.getMaterialUnit(), mainVO.getMaterialUnit()))) { && (StrUtil.isBlank(vo.getExceptionTag()) || (!vo.getExceptionTag().contains("16")) && !vo.getExceptionTag().contains("12")) && Objects.equals(vo.getSource(), EBomSourceEnum.FROM_BOM.getValue())) { vo.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_12.getValue());