作者 yangfu

部门统计修改

@@ -42,7 +42,7 @@ func Departments(header *protocol.RequestHeader, request *protocol.DepartmentsRe @@ -42,7 +42,7 @@ func Departments(header *protocol.RequestHeader, request *protocol.DepartmentsRe
42 walkDepartment(tmpDepartment, item) 42 walkDepartment(tmpDepartment, item)
43 } 43 }
44 rsp.Departments = tmpDepartment.Departments 44 rsp.Departments = tmpDepartment.Departments
45 - rsp.Departments = rsp.GetRootDepartment() 45 + //rsp.Departments = rsp.GetRootDepartment()
46 for i := range rsp.Departments { 46 for i := range rsp.Departments {
47 rsp.Departments[i].Departments = make([]*protocol.Department, 0) 47 rsp.Departments[i].Departments = make([]*protocol.Department, 0)
48 } 48 }
@@ -84,7 +84,7 @@ func Statistics(header *protocol.RequestHeader, request *protocol.DepartmentStat @@ -84,7 +84,7 @@ func Statistics(header *protocol.RequestHeader, request *protocol.DepartmentStat
84 log.Error(err) 84 log.Error(err)
85 return 85 return
86 } 86 }
87 - departments := departmentsResponse.GetRootDepartment() 87 + departments := departmentsResponse.Departments
88 iterateDepartments := func(call func(d *protocol.Department) *protocol.DepartmentStatistics) { 88 iterateDepartments := func(call func(d *protocol.Department) *protocol.DepartmentStatistics) {
89 for i := range departments { 89 for i := range departments {
90 department := departments[i] 90 department := departments[i]