|
|
@@ -107,6 +107,9 @@ public class TreeNodeServiceImpl implements TreeNodeService {
|
|
|
public void insertTreeNodeByFatherNode(int fatherId) throws ServiceException {
|
|
|
SimpleDateFormat format = DateUtil.getSimpleDateFormat();
|
|
|
TreeNodePO father = treeNodeMapper.getTreeNodeById(fatherId);
|
|
|
+ if (father.getDeep()==4){
|
|
|
+ throw new ServiceException("不能继续创建子节点,深度最大为4");
|
|
|
+ }
|
|
|
TreeNodePO son = TreeNodePO.builder()
|
|
|
.parentId(fatherId)
|
|
|
.type(father.getDeep()+1==4?NodeTypeEnum.TASK:NodeTypeEnum.REQUIREMENT)
|