作者 yangfu

部门长修改

... ... @@ -4,7 +4,6 @@ import (
"bytes"
"fmt"
"github.com/astaxie/beego/orm"
"gitlab.fjmaimaimai.com/mmm-go/gocomm/common"
"gitlab.fjmaimaimai.com/mmm-go/gocomm/pkg/log"
"opp/internal/utils"
"opp/models"
... ... @@ -98,7 +97,7 @@ func GetTopDepartment(departments []*protocol.Department) *protocol.Department {
if len(departments) == 0 {
return &protocol.Department{}
}
log.Debug("部门:", common.AssertJson(departments))
//log.Debug("部门:", common.AssertJson(departments))
var top *protocol.Department
var countTop, countTmp = 0, 0
for i := range departments {
... ... @@ -128,7 +127,7 @@ func GetTopDepartment(departments []*protocol.Department) *protocol.Department {
func GetTopPosition(positions []*protocol.Position) *protocol.Position {
var top *protocol.Position
var countTop, countTmp = 0, 0
log.Debug("职位:", common.AssertJson(positions))
//log.Debug("职位:", common.AssertJson(positions))
if len(positions) == 0 {
return &protocol.Position{}
}
... ...
... ... @@ -1165,10 +1165,9 @@ func getDepartmentors(header *protocol.RequestHeader, relatedDeparmentId int64)
log.Error("部门长无效:", tmpIds, e)
}
}
//if len(tmpIds) > 0 {
// ids = append(ids, tmpIds...)
// break
//}
if len(ids) > 0 {
break
}
} else {
log.Error(e)
}
... ...