作者 yangfu

部门长修改

@@ -4,7 +4,6 @@ import ( @@ -4,7 +4,6 @@ import (
4 "bytes" 4 "bytes"
5 "fmt" 5 "fmt"
6 "github.com/astaxie/beego/orm" 6 "github.com/astaxie/beego/orm"
7 - "gitlab.fjmaimaimai.com/mmm-go/gocomm/common"  
8 "gitlab.fjmaimaimai.com/mmm-go/gocomm/pkg/log" 7 "gitlab.fjmaimaimai.com/mmm-go/gocomm/pkg/log"
9 "opp/internal/utils" 8 "opp/internal/utils"
10 "opp/models" 9 "opp/models"
@@ -98,7 +97,7 @@ func GetTopDepartment(departments []*protocol.Department) *protocol.Department { @@ -98,7 +97,7 @@ func GetTopDepartment(departments []*protocol.Department) *protocol.Department {
98 if len(departments) == 0 { 97 if len(departments) == 0 {
99 return &protocol.Department{} 98 return &protocol.Department{}
100 } 99 }
101 - log.Debug("部门:", common.AssertJson(departments)) 100 + //log.Debug("部门:", common.AssertJson(departments))
102 var top *protocol.Department 101 var top *protocol.Department
103 var countTop, countTmp = 0, 0 102 var countTop, countTmp = 0, 0
104 for i := range departments { 103 for i := range departments {
@@ -128,7 +127,7 @@ func GetTopDepartment(departments []*protocol.Department) *protocol.Department { @@ -128,7 +127,7 @@ func GetTopDepartment(departments []*protocol.Department) *protocol.Department {
128 func GetTopPosition(positions []*protocol.Position) *protocol.Position { 127 func GetTopPosition(positions []*protocol.Position) *protocol.Position {
129 var top *protocol.Position 128 var top *protocol.Position
130 var countTop, countTmp = 0, 0 129 var countTop, countTmp = 0, 0
131 - log.Debug("职位:", common.AssertJson(positions)) 130 + //log.Debug("职位:", common.AssertJson(positions))
132 if len(positions) == 0 { 131 if len(positions) == 0 {
133 return &protocol.Position{} 132 return &protocol.Position{}
134 } 133 }
@@ -1165,10 +1165,9 @@ func getDepartmentors(header *protocol.RequestHeader, relatedDeparmentId int64) @@ -1165,10 +1165,9 @@ func getDepartmentors(header *protocol.RequestHeader, relatedDeparmentId int64)
1165 log.Error("部门长无效:", tmpIds, e) 1165 log.Error("部门长无效:", tmpIds, e)
1166 } 1166 }
1167 } 1167 }
1168 - //if len(tmpIds) > 0 {  
1169 - // ids = append(ids, tmpIds...)  
1170 - // break  
1171 - //} 1168 + if len(ids) > 0 {
  1169 + break
  1170 + }
1172 } else { 1171 } else {
1173 log.Error(e) 1172 log.Error(e)
1174 } 1173 }