作者 yangfu

部门统计修改

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