|
|
@@ -140,6 +140,14 @@ public class DepartmentServiceImpl extends SuperService implements DepartmentSer
|
|
|
return ResultContent.buildSuccess();
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public ResultContent<List<ITree>> getCurrentProjectDepartmentTree() {
|
|
|
+ return getDepartmentTree(getCurrentProjectOid());
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 得到结构所有部门信息 (树形结构)
|
|
|
*
|
|
|
@@ -152,7 +160,7 @@ public class DepartmentServiceImpl extends SuperService implements DepartmentSer
|
|
|
return ResultContent.buildFail("oid不能为空");
|
|
|
}
|
|
|
List<Department> list = departmentDao.findByOidOrderBySortAsc(oid);
|
|
|
- List<ITree> models = list.stream().map(this::toModel).collect(Collectors.toList());
|
|
|
+ List<ITree> models = list.stream().map(this::toSimpleModel).collect(Collectors.toList());
|
|
|
List<ITree> iTrees = TreeUtil.buildTree(models, ITree.ROOT_ID);
|
|
|
return ResultContent.buildSuccess(iTrees);
|
|
|
}
|