项目成员列表按得分排序

This commit is contained in:
z9hang 2014-08-21 15:22:29 +08:00
parent 9ae553bace
commit 644cfe6c21
1 changed files with 1 additions and 1 deletions

View File

@ -697,7 +697,7 @@ class ProjectsController < ApplicationController
else # @project.project_type == Project::ProjectType_project
roles = Role.find_all_givable
@subPage_title = l :label_member_list
@members = @project.member_principals.includes(:roles, :principal).joins("LEFT JOIN #{OptionNumber.table_name} ON #{OptionNumber.table_name}.user_id = #{Member.table_name}.user_id and #{OptionNumber.table_name}.score_type = 2").order("#{OptionNumber.table_name}.total_score DESC").all
@members = @project.member_principals.includes(:roles, :principal).joins("LEFT JOIN #{OptionNumber.table_name} ON #{OptionNumber.table_name}.user_id = #{Member.table_name}.user_id and #{OptionNumber.table_name}.score_type = 2 AND #{Member.table_name}.project_id = #{OptionNumber.table_name}.project_id").order("#{OptionNumber.table_name}.total_score DESC").all
#@members = sort_project_members(@project, @members)
@applied_members = appied_project_members(@project, @members)
end