删除逻辑调整

This commit is contained in:
jing's 2023-12-27 14:49:29 +08:00
parent c7ff541d4d
commit ea8f6f47d4
2 changed files with 3 additions and 5 deletions

View File

@ -392,7 +392,6 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
} }
/** /**
* 初始化bom 异常信息 * 初始化bom 异常信息
* *
@ -1001,7 +1000,7 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
eBomDel.classifyBom(); eBomDel.classifyBom();
if (CollectionUtil.isNotEmpty(eBomDel.getDelEBom())) { if (CollectionUtil.isNotEmpty(eBomDel.getDelEBom())) {
this.getBaseMapper().delBatch(eBomDel.getDelEBom().stream().map(BomNewEbomParentVO::getRowId).collect(Collectors.toList())); this.getBaseMapper().delBatch(eBomDel.getDelEBom().stream().map(BomNewEbomParentVO::getBomRowId).collect(Collectors.toList()));
} }
@ -1012,8 +1011,8 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
} }
if (CollectionUtil.isNotEmpty(eBomDel.getDelEBom())) { if (CollectionUtil.isNotEmpty(eBomDel.getDelEBom())) {
ThreadUtil.execAsync(() -> computeLevelNumAndRootState()); // ThreadUtil.execAsync(() -> computeLevelNumAndRootState());
computeLevelNumAndRootState();
} }
return true; return true;

View File

@ -46,7 +46,6 @@ public class EBomDel {
//工艺岗位角色的时候只能删除自己在EBOM中创建的数据 //工艺岗位角色的时候只能删除自己在EBOM中创建的数据
//设计人员在Ebom中创建的数据 工艺人员可以删除 //设计人员在Ebom中创建的数据 工艺人员可以删除
// 原始bom导入过来的只能 设计人员自己删工艺不能删 // 原始bom导入过来的只能 设计人员自己删工艺不能删
if(roleList.contains(EBomConstant.DESIGNER)){ if(roleList.contains(EBomConstant.DESIGNER)){
delEBom = bomTreeAll.stream().filter(u -> u.getBomRowId() > 0 delEBom = bomTreeAll.stream().filter(u -> u.getBomRowId() > 0
&& u.getCreatedBy().equals(SessionUtil.getUserCode()) && u.getCreatedBy().equals(SessionUtil.getUserCode())