Merge branch 'szzh' into develop

This commit is contained in:
sw 2015-09-06 15:02:16 +08:00
commit c71bfe73fb
1 changed files with 2 additions and 2 deletions

View File

@ -423,7 +423,7 @@ module UserScoreHelper
#更新分数 #更新分数
def update_score(option_number) def update_score(option_number)
option_number.total_score = collaboration(option_number) + influence(option_number) + skill(option_number) + active(option_number) option_number.total_score = collaboration(option_number) + influence(option_number) + skill(option_number) + project_active(option_number)
if option_number.total_score < 0 if option_number.total_score < 0
option_number.total_score = 0 option_number.total_score = 0
end end
@ -444,7 +444,7 @@ module UserScoreHelper
option_number.praise_by_one * 4 + option_number.praise_by_two * 6 + option_number.praise_by_three * 8 - option_number.tread * 2 - option_number.tread_by_one * 2 - option_number.tread_by_two * 4 - option_number.tread_by_three * 6 option_number.praise_by_one * 4 + option_number.praise_by_two * 6 + option_number.praise_by_three * 8 - option_number.tread * 2 - option_number.tread_by_one * 2 - option_number.tread_by_two * 4 - option_number.tread_by_three * 6
end end
#项目贡献得分 #项目贡献得分
def active(option_number) def project_active(option_number)
option_number.changeset * 4 + option_number.document * 4 + option_number.attachment * 4 + option_number.issue_done_ratio * 2 + option_number.post_issue * 4 option_number.changeset * 4 + option_number.document * 4 + option_number.attachment * 4 + option_number.issue_done_ratio * 2 + option_number.post_issue * 4
end end