|
@@ -74,9 +74,7 @@ func GetRankList(header *protocol.RequestHeader, request *protocol.GetRankListRe |
|
@@ -74,9 +74,7 @@ func GetRankList(header *protocol.RequestHeader, request *protocol.GetRankListRe |
74
|
log.Error(err)
|
74
|
log.Error(err)
|
75
|
return
|
75
|
return
|
76
|
}
|
76
|
}
|
77
|
- if !hasDepartmentInRank {
|
|
|
78
|
- continue
|
|
|
79
|
- }
|
77
|
+ if hasDepartmentInRank {
|
80
|
if departmentId > 0 {
|
78
|
if departmentId > 0 {
|
81
|
if err = models.GetRanksByDepartmentSelf(header.CompanyId, request.RankTypeId, request.RankRangeId, request.RankPeriodId, key, departmentId, &selfRank); err != nil {
|
79
|
if err = models.GetRanksByDepartmentSelf(header.CompanyId, request.RankTypeId, request.RankRangeId, request.RankPeriodId, key, departmentId, &selfRank); err != nil {
|
82
|
log.Error(err)
|
80
|
log.Error(err)
|
|
@@ -98,6 +96,7 @@ func GetRankList(header *protocol.RequestHeader, request *protocol.GetRankListRe |
|
@@ -98,6 +96,7 @@ func GetRankList(header *protocol.RequestHeader, request *protocol.GetRankListRe |
98
|
hasDepartmentInRank = false
|
96
|
hasDepartmentInRank = false
|
99
|
}
|
97
|
}
|
100
|
}
|
98
|
}
|
|
|
99
|
+ }
|
101
|
} else if rankRange.Type == protocol.RankRangeTypeAllCompanyUser || rankRange.Type == protocol.RankRangeTypeSpecifyUser {
|
100
|
} else if rankRange.Type == protocol.RankRangeTypeAllCompanyUser || rankRange.Type == protocol.RankRangeTypeSpecifyUser {
|
102
|
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 {
|
101
|
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 {
|
103
|
log.Error(err)
|
102
|
log.Error(err)
|