Merge remote-tracking branch 'origin/DM/异常检查' into test
This commit is contained in:
commit
f5245b9f6b
|
|
@ -3,6 +3,7 @@ package com.nflg.product.bomnew.service.domain.EBom;
|
|||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.google.common.collect.Sets;
|
||||
import com.nflg.product.bomnew.constant.EBomStatusEnum;
|
||||
import com.nflg.product.bomnew.constant.ProjectTypeInputTypeEnum;
|
||||
import com.nflg.product.bomnew.pojo.vo.BomNewEbomParentVO;
|
||||
import lombok.Getter;
|
||||
|
|
@ -42,7 +43,7 @@ public class EbomInitProjectType {
|
|||
public void initProjectType() {
|
||||
|
||||
for (BomNewEbomParentVO child : allChild) {
|
||||
if (StrUtil.isBlank(child.getMaterialCategoryCode())) {
|
||||
if (StrUtil.isBlank(child.getMaterialCategoryCode()) || skipPublishedBom(child)) {
|
||||
continue;
|
||||
}
|
||||
String materialProjectType = child.getProjectType();
|
||||
|
|
@ -126,6 +127,9 @@ public class EbomInitProjectType {
|
|||
List<BomNewEbomParentVO> sameLevelChild = new ArrayList<>();
|
||||
List<BomNewEbomParentVO> sResult = new ArrayList<>();
|
||||
for (BomNewEbomParentVO child : list2009) {
|
||||
if(skipPublishedBom(child)){
|
||||
continue;
|
||||
}
|
||||
sameLevelChild = getChilds(child.getParentRowId());
|
||||
sResult = sameLevelChild.stream().filter(u -> u.getMaterialCategoryCode().startsWith("2005") || u.getMaterialCategoryCode().startsWith("2006")).collect(Collectors.toList());
|
||||
if (CollUtil.isNotEmpty(sResult)) {
|
||||
|
|
@ -142,6 +146,9 @@ public class EbomInitProjectType {
|
|||
List<BomNewEbomParentVO> sResult1004 = new ArrayList<>();
|
||||
List<BomNewEbomParentVO> sResultProjectL = new ArrayList<>();
|
||||
for (BomNewEbomParentVO child : list1004) {
|
||||
if(skipPublishedBom(child)){
|
||||
continue;
|
||||
}
|
||||
//同层物料
|
||||
sameLevelChild1004 = getChilds(child.getParentRowId());
|
||||
//除紧固件外的其他物料
|
||||
|
|
@ -165,6 +172,15 @@ public class EbomInitProjectType {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* 已发布BOM-跳过初始化项目类别
|
||||
* @param vo
|
||||
*/
|
||||
private boolean skipPublishedBom(BomNewEbomParentVO vo){
|
||||
List<BomNewEbomParentVO> voParent = allChild.stream().filter(u -> u.getBomRowId().equals(vo.getParentRowId())).collect(Collectors.toList());
|
||||
return CollUtil.isNotEmpty(voParent) && voParent.get(0).getStatus()>= EBomStatusEnum.PUBLISHED.getValue();
|
||||
|
||||
}
|
||||
/**
|
||||
* 判断项目类型是否一致
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue