...
|
...
|
@@ -4,6 +4,7 @@ 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"
|
...
|
...
|
@@ -97,6 +98,7 @@ func GetTopDepartment(departments []*protocol.Department) *protocol.Department { |
|
|
if len(departments) == 0 {
|
|
|
return &protocol.Department{}
|
|
|
}
|
|
|
log.Debug(common.AssertJson(departments))
|
|
|
var top *protocol.Department
|
|
|
var countTop, countTmp = 0, 0
|
|
|
for i := range departments {
|
...
|
...
|
@@ -126,6 +128,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))
|
|
|
if len(positions) == 0 {
|
|
|
return &protocol.Position{}
|
|
|
}
|
...
|
...
|
|