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());