|
@@ -248,13 +248,13 @@ func EditRankPeriod(id int64, beginTime int64, endTime int64, name string, compa |
|
@@ -248,13 +248,13 @@ func EditRankPeriod(id int64, beginTime int64, endTime int64, name string, compa |
248
|
}
|
248
|
}
|
249
|
|
249
|
|
250
|
//获取赛季参与人列表
|
250
|
//获取赛季参与人列表
|
251
|
-func GetRankRangeList(companyid int64) []protocol.RankRangeItem {
|
251
|
+func GetRankRangeList(companyid int64, rankTypeId int64) []protocol.RankRangeItem {
|
252
|
var (
|
252
|
var (
|
253
|
err error
|
253
|
err error
|
254
|
rspData = make([]protocol.RankRangeItem, 0)
|
254
|
rspData = make([]protocol.RankRangeItem, 0)
|
255
|
)
|
255
|
)
|
256
|
- datasql := `SELECT a.id ,a.name,a.type,a.status FROM rank_range AS a WHERE company_id=?`
|
|
|
257
|
- err = utils.ExecuteQueryAll(&rspData, datasql, companyid)
|
256
|
+ datasql := `SELECT a.id ,a.name,a.type,a.status FROM rank_range AS a WHERE company_id=? AND rank_type_id=?`
|
|
|
257
|
+ err = utils.ExecuteQueryAll(&rspData, datasql, companyid, rankTypeId)
|
258
|
if err != nil {
|
258
|
if err != nil {
|
259
|
log.Error("获取参与人列表失败:%s", err)
|
259
|
log.Error("获取参与人列表失败:%s", err)
|
260
|
}
|
260
|
}
|
|
@@ -277,6 +277,9 @@ func getRangeDataRelationLsit(rankRangeId int64, rangeType int8) []protocol.Rank |
|
@@ -277,6 +277,9 @@ func getRangeDataRelationLsit(rankRangeId int64, rangeType int8) []protocol.Rank |
277
|
relationIds = append(relationIds, rankRangeData[i].RelationId)
|
277
|
relationIds = append(relationIds, rankRangeData[i].RelationId)
|
278
|
}
|
278
|
}
|
279
|
datalist := make([]protocol.RankRangeRelation, 0)
|
279
|
datalist := make([]protocol.RankRangeRelation, 0)
|
|
|
280
|
+ if len(relationIds) == 0 {
|
|
|
281
|
+ return datalist
|
|
|
282
|
+ }
|
280
|
switch rangeType {
|
283
|
switch rangeType {
|
281
|
case models.RANK_RANGE_TYPE_DEPARTMENT:
|
284
|
case models.RANK_RANGE_TYPE_DEPARTMENT:
|
282
|
//员工
|
285
|
//员工
|