diff --git a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/pojo/dto/TechnologyPackageParam.java b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/pojo/dto/TechnologyPackageParam.java index 7cd9fc15..cfce765f 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/pojo/dto/TechnologyPackageParam.java +++ b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/pojo/dto/TechnologyPackageParam.java @@ -29,6 +29,14 @@ public class TechnologyPackageParam { @NotNull(message = "项目类别不能为空") private String projectType; + @ApiModelProperty("图号") + private String drawingNo; + + @ApiModelProperty("名称") + private String materialName; + + @ApiModelProperty("描述") + private String materialDesc; @ApiModelProperty("工艺包类型rowId(创建工艺包时用)") private Long technologyPackageTypeRowId; diff --git a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/pojo/vo/BomNewPbomParentVO.java b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/pojo/vo/BomNewPbomParentVO.java index 6e2211ee..ee388330 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/pojo/vo/BomNewPbomParentVO.java +++ b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/pojo/vo/BomNewPbomParentVO.java @@ -274,9 +274,11 @@ public class BomNewPbomParentVO extends BaseMaterialVO implements Serializable { private String levelNo; + // @ApiModelProperty("物料一级分类编码") // private String relCategoryCode; + @ApiModelProperty("子级") List childNodes; 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 efd807a0..e1ae2583 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 @@ -279,7 +279,7 @@ public class BomNewEbomParentService extends ServiceImpl materialNos = parentChild.stream().map(u -> u.getMaterialNo()).collect(Collectors.toList()); + List materialNos = parentChild.stream().filter(u->StrUtil.isNotBlank(u.getMaterialNo())).map(u -> u.getMaterialNo()).collect(Collectors.toList()); if (CollUtil.isNotEmpty(materialNos)) { List list = this.lambdaQuery().in(BomNewEbomParentEntity::getMaterialNo, materialNos) .eq(BomNewEbomParentEntity::getLastVersionIs, 1) @@ -440,6 +440,9 @@ public class BomNewEbomParentService extends ServiceImpl ignoreCheckException) throws ExecutionException, InterruptedException { + CheckEBomException checkEBomException = new CheckEBomException(bomRowId); + checkEBomException.initException(ignoreCheckException); + + //保存异常 + saveException(checkEBomException); + } + private void saveException(CheckEBomException checkEBomException) { List allBomDetail = checkEBomException.getAllBomDetail(); //父级 diff --git a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewOriginalParentService.java b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewOriginalParentService.java index 82226c68..610486e3 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewOriginalParentService.java +++ b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewOriginalParentService.java @@ -140,7 +140,7 @@ public class BomNewOriginalParentService extends ServiceImpl getOriginalBomListPage(OriginalBomQuery query) { - Page result=null; + Page result= new Page<>(); //物料编码搜索或图号搜索 if (CollUtil.isNotEmpty(query.getMaterialNos()) || CollUtil.isNotEmpty(query.getDrawingNos())) { List queryDrawingNos= new ArrayList<>(); diff --git a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewPbomParentService.java b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewPbomParentService.java index a61bd857..21bc63bc 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewPbomParentService.java +++ b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/BomNewPbomParentService.java @@ -9,6 +9,7 @@ import cn.hutool.extra.spring.SpringUtil; import com.alibaba.excel.enums.BooleanEnum; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.google.common.collect.ImmutableList; @@ -385,9 +386,9 @@ public class BomNewPbomParentService extends ServiceImpl materials = materialMainService.lambdaQuery().eq(MaterialMainEntity::getDrawingNo, drawingNo).list(); @@ -408,11 +409,18 @@ public class BomNewPbomParentService extends ServiceImpl mMap = materialService.batchAddMaterial(ImmutableList.of(toM)); +// String materialNo = materialService.addMaterial(drawingNo, materialName, materialDesc, "201201"); + String materialNo=mMap.get(key).getMaterialNo(); return materialMainService.getMaterialBaseInfo(ImmutableList.of(materialNo)).get(0); } @@ -804,7 +812,7 @@ public class BomNewPbomParentService extends ServiceImpl unCheckException) { + //初始化物料信息 + SpringUtil.getBean(MaterialMainService.class).intiMaterialInfo(allBomDetail, EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT); + this.unCheckExcept=unCheckException; + checkException(); + + } + public void initException(String... ignorePropertyList) { SpringUtil.getBean(MaterialMainService.class).intiMaterialInfo(allBomDetail, ignorePropertyList); diff --git a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/EBom/EbomInitProjectType.java b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/EBom/EbomInitProjectType.java index d7ad3a82..21021d1a 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/EBom/EbomInitProjectType.java +++ b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/EBom/EbomInitProjectType.java @@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.StrUtil; import cn.hutool.extra.spring.SpringUtil; import com.google.common.collect.Sets; +import com.nflg.product.bomnew.constant.EBomExceptionStatusEnum; import com.nflg.product.bomnew.constant.ProjectTypeInputTypeEnum; import com.nflg.product.bomnew.mapper.master.BomNewEbomParentMapper; import com.nflg.product.bomnew.pojo.entity.BomNewEbomChildEntity; @@ -112,14 +113,15 @@ public class EbomInitProjectType { } //11 - if (StrUtil.isNotBlank(child.getMaterialCategoryCode()) && (child.getMaterialCategoryCode().startsWith("10") || child.getMaterialCategoryCode().startsWith("40")) && !child.getMaterialCategoryCode().startsWith("1013") && !child.getMaterialCategoryCode().startsWith("100601")); - { - MaterialHistoryProjectTypeVO materialHistoryProjectType = SpringUtil.getBean(BomNewEbomParentMapper.class).getMaterialHistoryProjectType(child.getMaterialNo()); - if (Objects.nonNull(materialHistoryProjectType)) { - child.setProjectType(materialHistoryProjectType.getProjectType()); - child.setProjectTypeInputType(ProjectTypeInputTypeEnum.HISTORY_STATISTICS.getValue()); - } - } +// if (StrUtil.isNotBlank(child.getMaterialCategoryCode()) && (child.getMaterialCategoryCode().startsWith("10") || child.getMaterialCategoryCode().startsWith("40")) && !child.getMaterialCategoryCode().startsWith("1013") && !child.getMaterialCategoryCode().startsWith("100601")); +// { +// MaterialHistoryProjectTypeVO materialHistoryProjectType = SpringUtil.getBean(BomNewEbomParentMapper.class).getMaterialHistoryProjectType(child.getMaterialNo()); +// if (Objects.nonNull(materialHistoryProjectType)) { +// child.setProjectType(materialHistoryProjectType.getProjectType()); +// child.setProjectTypeInputType(ProjectTypeInputTypeEnum.HISTORY_STATISTICS.getValue()); +// child.setExceptionStatus(EBomExceptionStatusEnum.EXCEPT_NO_14.getValue()); +// } +// } } diff --git a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/PBom/ConvertToMBom.java b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/PBom/ConvertToMBom.java index 91092c30..b9de2283 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/PBom/ConvertToMBom.java +++ b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/domain/PBom/ConvertToMBom.java @@ -115,11 +115,15 @@ public class ConvertToMBom { mBomParent.setModifyTime(LocalDateTime.now()); mBomParent.setSourceRowId(parent.getRowId()); mBomParent.setLastVersionIs(1); + mBomParent.setStatus(MBomConstantEnum.MBomStatusEnum.UNPUB_SAP.getValue()); this.mBomParentResult.add(mBomParent); //1010 不做处理 // buildChild(EBomConstant.MAIN_FACTORY_CODE_1010.equals(facCode) ? allChildTreeList_1010 : allChildTreeList_1020, mBomParent.getRowId()); + allChild_1010.forEach(u->{ + u.setRelParentRowId(u.getParentRowId()); + }); buildChild(EBomConstant.MAIN_FACTORY_CODE_1010.equals(facCode) ? allChild_1010 : allChildTreeList_1020, mBomParent.getRowId()); diff --git a/nflg_project_dev/nflg-bom-new/src/main/resources/mapper/master/BomNewPbomParentMapper.xml b/nflg_project_dev/nflg-bom-new/src/main/resources/mapper/master/BomNewPbomParentMapper.xml index 92b2ee65..db324630 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/resources/mapper/master/BomNewPbomParentMapper.xml +++ b/nflg_project_dev/nflg-bom-new/src/main/resources/mapper/master/BomNewPbomParentMapper.xml @@ -99,7 +99,7 @@