@ -1105,12 +1105,12 @@ end
school_ids = School . where ( " schools.name like '% #{ params [ :school ] } %' " ) . pluck ( :id )
school_ids = school_ids . size == 0 ? " (-1) " : " ( " + school_ids . join ( " , " ) + " ) "
location = params [ :location ] && params [ :location ] != " 0 " ? params [ :location ] : " "
@team_members = @team_members . where( " user_extensions.school_id in #{ school_ids } and schools.province like '% #{ location } %' " )
@team_members = @team_members . includes( user : { user_extensions : :school } ) . where( " user_extensions.school_id in #{ school_ids } and schools.province like '% #{ location } %' " )
end
@page = params [ :page ] || 1
@team_members = @team_members . reorder ( " team_members.created_at #{ @order } " )
all_members = @team_members
@team_members = paginateHelper ( @team_members . includes ( competition_team : [ :user , teachers : :user ] , user : { user_extensions : :school } ) , 50 )
@team_members = paginateHelper ( @team_members . preload ( competition_team : [ :user , teachers : :user ] , user : { user_extensions : :school } ) , 50 )
respond_to do | format |
format . js
format . html
@ -3425,7 +3425,7 @@ end
users = users . where ( schools : { province : params [ :province ] } )
end
users = users . select ( 'distinct users.*' ) . order ( " last_login_on desc " )
users = users . select ( 'distinct users.*' )
@page = ( params [ 'page' ] || 1 ) . to_i
@users_count = users . count
@ -3433,16 +3433,17 @@ end
@is_remote = true
@users_pages = Paginator . new @users_count , @limit , params [ 'page' ] || 1
@offset || = @users_pages . offset
@users = paginateHelper users . preload( :real_name_authentication_apply , :professional_authentication_apply ,
@users = paginateHelper users . order( " last_login_on desc " ) . preload( :real_name_authentication_apply , :professional_authentication_apply ,
user_extensions : [ :department , :school ] ) , @limit
respond_to do | format |
format . js
format . xls {
# @export_shixun_task = @export_shixun_task.all
@xls_users = users . reorder( " created_on desc " ) . limit( 3000 ) #导出excel用户
@xls_users = users . limit( 3000 ) #导出excel用户
@xls_users = @xls_users . includes ( :real_name_authentication_apply , :professional_authentication_apply ,
user_extensions : [ :department , :school ] )
filename = " 用户列表.xls "
send_data ( user_list_xls ( @xls_users ) , :type = > 'application/octet-stream' , :filename = > filename_for_content_disposition ( filename ) )
}