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