...
|
...
|
@@ -120,6 +120,7 @@ func (tree *Tree) AllSubDepartment(node TreeNode) []TreeNode { |
|
|
var stack []*Tree
|
|
|
stack = append(stack, treeNode)
|
|
|
var res []TreeNode
|
|
|
rootId := treeNode.Node.(*Org).OrgId
|
|
|
for {
|
|
|
if len(stack) == 0 {
|
|
|
break
|
...
|
...
|
@@ -127,7 +128,7 @@ func (tree *Tree) AllSubDepartment(node TreeNode) []TreeNode { |
|
|
pop := stack[0]
|
|
|
stack = stack[1:]
|
|
|
/***特殊处理***/
|
|
|
if org, ok := pop.Node.(*Org); ok && fmt.Sprintf("%v", org.OrgId) != treeNode.Node.ID() {
|
|
|
if org, ok := pop.Node.(*Org); ok && org.OrgId != int64(rootId) {
|
|
|
if org.IsOrg == IsOrgFlag {
|
|
|
continue
|
|
|
}
|
...
|
...
|
|