fix(ebom): 修复根节点的判断问题

This commit is contained in:
曹鹏飞 2024-06-05 16:31:38 +08:00
parent 048ac55706
commit dfbcad0649
1 changed files with 1 additions and 1 deletions

View File

@ -2576,7 +2576,7 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
public Boolean deleteBomV2(Long bomRowId) {
BomNewEbomParentEntity root = getById(bomRowId);
VUtils.isTure(Objects.isNull(root)).throwMessage("bom不存在");
VUtils.isTure(root.getRootIs() != 1 && root.getUserRootIs() != 0).throwMessage("请选择根节点");
VUtils.isTure(root.getRootIs() != 1 && root.getUserRootIs() != 1).throwMessage("请选择根节点");
VUtils.isTure(!StrUtil.equals(root.getCreatedBy(), SessionUtil.getUserCode())).throwMessage("不能删除他人的数据");
delete(root);