添加null判断
This commit is contained in:
parent
046a0b4854
commit
7e60d7a606
|
|
@ -126,12 +126,14 @@ public class PlmBomToOriginalConvert extends BaseConvert {
|
||||||
} else { //非草稿状态
|
} else { //非草稿状态
|
||||||
//判断Ebom 的状态 eBom草稿:
|
//判断Ebom 的状态 eBom草稿:
|
||||||
BomNewEbomParentEntity ebom = getEbom(parent.getChartNo());
|
BomNewEbomParentEntity ebom = getEbom(parent.getChartNo());
|
||||||
if (ebom.getStatus()<EBomStatusEnum.PUBLISHED.getValue()) {
|
if(ebom==null){
|
||||||
|
importErrorResult.add(new ImportOriginalBomVO(parent.getChartNo(),"未找到ebom数据") );
|
||||||
|
}
|
||||||
|
else if (ebom.getStatus()<EBomStatusEnum.PUBLISHED.getValue()) {
|
||||||
//相同用户
|
//相同用户
|
||||||
if (ebom.getCreatedBy() == parent.getCreatedBy()) {
|
if (Objects.equals(ebom.getCreatedBy(), parent.getCreatedBy())) {
|
||||||
importErrorResult.add(new ImportOriginalBomVO(parent.getChartNo(),"此数据已创建BOM,请删除BOM重新导入") );
|
importErrorResult.add(new ImportOriginalBomVO(parent.getChartNo(),"此数据已创建BOM,请删除BOM重新导入") );
|
||||||
// VUtils.isTure(true).throwMessage("图号:"+parent.getChartNo()+"此数据已创建BOM,请删除BOM重新导入");
|
// VUtils.isTure(true).throwMessage("图号:"+parent.getChartNo()+"此数据已创建BOM,请删除BOM重新导入");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
UserInfoVO userInfo =SpringUtil.getBean(UserInfoService.class).getUserInfoByUserCode(ebom.getCreatedBy());
|
UserInfoVO userInfo =SpringUtil.getBean(UserInfoService.class).getUserInfoByUserCode(ebom.getCreatedBy());
|
||||||
importErrorResult.add(new ImportOriginalBomVO( parent.getChartNo(),"此数据已被"+userInfo.getRealName()+"("+userInfo.getUserCode()+")创建,请联系TA处理"));
|
importErrorResult.add(new ImportOriginalBomVO( parent.getChartNo(),"此数据已被"+userInfo.getRealName()+"("+userInfo.getUserCode()+")创建,请联系TA处理"));
|
||||||
|
|
@ -147,7 +149,6 @@ public class PlmBomToOriginalConvert extends BaseConvert {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else //无子级
|
else //无子级
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue