...
|
...
|
@@ -74,9 +74,7 @@ func GetRankList(header *protocol.RequestHeader, request *protocol.GetRankListRe |
|
|
log.Error(err)
|
|
|
return
|
|
|
}
|
|
|
if !hasDepartmentInRank {
|
|
|
continue
|
|
|
}
|
|
|
if hasDepartmentInRank {
|
|
|
if departmentId > 0 {
|
|
|
if err = models.GetRanksByDepartmentSelf(header.CompanyId, request.RankTypeId, request.RankRangeId, request.RankPeriodId, key, departmentId, &selfRank); err != nil {
|
|
|
log.Error(err)
|
...
|
...
|
@@ -98,6 +96,7 @@ func GetRankList(header *protocol.RequestHeader, request *protocol.GetRankListRe |
|
|
hasDepartmentInRank = false
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
} else if rankRange.Type == protocol.RankRangeTypeAllCompanyUser || rankRange.Type == protocol.RankRangeTypeSpecifyUser {
|
|
|
if rsp.Total, err = models.GetRanksByUser(header.CompanyId, request.RankTypeId, request.RankRangeId, request.RankPeriodId, key, request.PageIndex, request.PageSize, &ranks); err != nil && err != orm.ErrNoRows {
|
|
|
log.Error(err)
|
...
|
...
|
|