|
|
@ -3425,7 +3425,7 @@ end
|
|
|
|
users = users.where(schools: { province: params[:province] })
|
|
|
|
users = users.where(schools: { province: params[:province] })
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
users = users.select('distinct users.*').order("last_login_on desc")
|
|
|
|
users = users.select('distinct users.*')
|
|
|
|
|
|
|
|
|
|
|
|
@page = (params['page'] || 1).to_i
|
|
|
|
@page = (params['page'] || 1).to_i
|
|
|
|
@users_count = users.count
|
|
|
|
@users_count = users.count
|
|
|
@ -3433,16 +3433,19 @@ end
|
|
|
|
@is_remote = true
|
|
|
|
@is_remote = true
|
|
|
|
@users_pages = Paginator.new @users_count, @limit, params['page'] || 1
|
|
|
|
@users_pages = Paginator.new @users_count, @limit, params['page'] || 1
|
|
|
|
@offset ||= @users_pages.offset
|
|
|
|
@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
|
|
|
|
user_extensions: [:department, :school]), @limit
|
|
|
|
|
|
|
|
|
|
|
|
respond_to do |format|
|
|
|
|
respond_to do |format|
|
|
|
|
format.js
|
|
|
|
format.js
|
|
|
|
format.xls{
|
|
|
|
format.xls{
|
|
|
|
# @export_shixun_task = @export_shixun_task.all
|
|
|
|
# @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,
|
|
|
|
@xls_users = @xls_users.includes(:real_name_authentication_apply, :professional_authentication_apply,
|
|
|
|
user_extensions: [:department, :school])
|
|
|
|
user_extensions: [:department, :school])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
logger.info("##########xls_count#{@xls_users.count }")
|
|
|
|
|
|
|
|
logger.info("##########users#{users.count }")
|
|
|
|
filename = "用户列表.xls"
|
|
|
|
filename = "用户列表.xls"
|
|
|
|
send_data(user_list_xls(@xls_users), :type => 'application/octet-stream', :filename => filename_for_content_disposition(filename))
|
|
|
|
send_data(user_list_xls(@xls_users), :type => 'application/octet-stream', :filename => filename_for_content_disposition(filename))
|
|
|
|
}
|
|
|
|
}
|
|
|
|