EBOM工作明细中【删除】时,校验状态是否为草稿状态中
This commit is contained in:
parent
8e97f53ffa
commit
ac23d075a5
|
|
@ -451,8 +451,9 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
child.setEditStatus(parent.getEditStatus());
|
child.setEditStatus(parent.getEditStatus());
|
||||||
child.setVirtualPackageIs(parent.getVirtualPackageIs());
|
child.setVirtualPackageIs(parent.getVirtualPackageIs());
|
||||||
child.setSuperMaterialStatus(parent.getSuperMaterialStatus());
|
child.setSuperMaterialStatus(parent.getSuperMaterialStatus());
|
||||||
// 10、40、50、60、70大类以及200201小类这些不需要BOM的物料,版本号显示B00 by 10002327 241012
|
// 10、40、50、60、70大类以及200201小类这些不需要BOM的物料、项目类别为T项,版本号显示B00 by 10002327 241012
|
||||||
if(MaterialshouldBomExistUtil.checkNoNeedBom(child)){
|
if(MaterialshouldBomExistUtil.checkNoNeedBom(child)
|
||||||
|
|| Objects.equals(child.getProjectType(),"T")){
|
||||||
child.setCurrentVersion(OriginalConstant.NO_NEED_BOM);
|
child.setCurrentVersion(OriginalConstant.NO_NEED_BOM);
|
||||||
}else if (MaterialshouldBomExistUtil.checkShouldBomExist(child)) {
|
}else if (MaterialshouldBomExistUtil.checkShouldBomExist(child)) {
|
||||||
child.setCurrentVersion(OriginalConstant.NO_BOM_VERSION);
|
child.setCurrentVersion(OriginalConstant.NO_BOM_VERSION);
|
||||||
|
|
@ -3214,6 +3215,8 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
BomNewEbomParentEntity parent = getById(bomRowId);
|
BomNewEbomParentEntity parent = getById(bomRowId);
|
||||||
VUtils.isTure(Objects.isNull(parent)).throwMessage("bom不存在");
|
VUtils.isTure(Objects.isNull(parent)).throwMessage("bom不存在");
|
||||||
// VUtils.isTure(root.getRootIs() != 1 && root.getUserRootIs() != 1).throwMessage("请选择根节点");
|
// VUtils.isTure(root.getRootIs() != 1 && root.getUserRootIs() != 1).throwMessage("请选择根节点");
|
||||||
|
//校验状态,发布PBOM以后,不能再删除 10002327 241106
|
||||||
|
VUtils.isTure(parent.getStatus() != null && parent.getStatus() >= EBomStatusEnum.PUBLISHED.getValue()).throwMessage("发布PBOM之后,不能再删除~");
|
||||||
|
|
||||||
LogRecordContext.putVariable("bom", parent);
|
LogRecordContext.putVariable("bom", parent);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -494,7 +494,7 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
|
||||||
} else {
|
} else {
|
||||||
child.setCurrentVersion(OriginalConstant.DEFAULT_BOM_VERSION);
|
child.setCurrentVersion(OriginalConstant.DEFAULT_BOM_VERSION);
|
||||||
}
|
}
|
||||||
if (type == 0 && child.getStatus() >= EBomStatusEnum.PUBLISHED.getValue()) {
|
if (type == 0 && child.getStatus() != null && child.getStatus() >= EBomStatusEnum.PUBLISHED.getValue()) {
|
||||||
child.setStatus(PBomStatusEnum.BORROWED_PARTS.getValue());
|
child.setStatus(PBomStatusEnum.BORROWED_PARTS.getValue());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue