...
|
...
|
@@ -370,10 +370,32 @@ func GetRankRangeInfo(id int64) protocol.ResponseRankRangeInfo { |
|
|
relationIds = append(relationIds, rankRangeData[i].RelationId)
|
|
|
}
|
|
|
switch rankRange.Type {
|
|
|
case models.RANK_RANGE_TYPE_DEPARTMENT, models.RANK_RANGE_TYPE_DEPARTMENTALL:
|
|
|
case models.RANK_RANGE_TYPE_DEPARTMENT:
|
|
|
//员工
|
|
|
case models.RANK_RANGE_TYPE_EMPLAYEE, models.RANK_RANGE_TYPE_EMPLAYEEALL:
|
|
|
users, err := models.GetUserCompanyByIds(relationIds)
|
|
|
if err != nil {
|
|
|
log.Error("获取员工数据失败")
|
|
|
}
|
|
|
for i := range users {
|
|
|
m := protocol.RankRangeRelation{
|
|
|
Id: users[i].Id,
|
|
|
Name: users[i].NickName,
|
|
|
}
|
|
|
rspdata.Relation = append(rspdata.Relation, m)
|
|
|
}
|
|
|
case models.RANK_RANGE_TYPE_EMPLAYEE:
|
|
|
//部门
|
|
|
departments, err := models.GetDepartmentByIds(relationIds)
|
|
|
if err != nil {
|
|
|
log.Error("获取部门数据失败")
|
|
|
}
|
|
|
for i := range departments {
|
|
|
m := protocol.RankRangeRelation{
|
|
|
Id: departments[i].Id,
|
|
|
Name: departments[i].Name,
|
|
|
}
|
|
|
rspdata.Relation = append(rspdata.Relation, m)
|
|
|
}
|
|
|
}
|
|
|
return rspdata
|
|
|
|
...
|
...
|
|