Merge remote-tracking branch 'origin/develop' into develop

chromesetting
杨树明 5 years ago
commit 467d3f2810

@ -25,7 +25,16 @@ class HelpsController < ApplicationController
end
def feedback
content = "<p>[#{params[:question_kind]}]</p><p>问题页面网址:#{params[:url]}</p>#{params[:description]}"
if params[:url].blank?
content = "<p>[#{params[:question_kind]}]</p></p>#{params[:description]}"
if params[:attachment_ids]
params[:attachment_ids].each do |attachment_id|
content += "![](/api/attachments/#{attachment_id})↵"
end
end
else
content = "<p>[#{params[:question_kind]}]</p><p>问题页面网址:#{params[:url]}</p>#{params[:description]}"
end
ActiveRecord::Base.transaction do
attr = { sender_id: User.current.id, receiver_id: 1, content: content, send_time: Time.now }

@ -3,7 +3,7 @@ wb = xlsx_package.workbook
wb.styles do |s|
blue_cell = s.add_style :bg_color => "FAEBDC", :sz => 10,:height => 25,:b => true, :border => { :style => :thin, :color =>"000000" },:alignment => {wrap_text: true,:horizontal => :center,:vertical => :center}
wb.add_worksheet(name: "#{@competition.name}证书审批列表") do |sheet|
sheet.add_row %w(序号 排名 奖项 战队ID 战队名称 姓名 职业 学号 学校名称 学院名称 地区 实名认证 职业认证 手机号码 队长 签领/开户行及银行卡号 审批时间 审批人), :height => 25,:style => blue_cell
sheet.add_row %w(序号 排名 奖项 战队ID 战队名称 姓名 性别 职业 学号 学校名称 学院名称 地区 实名认证 职业认证 手机号码 队长 身份证号 签领/开户行及银行卡号 审批时间 审批人), :height => 25,:style => blue_cell
@all_prize_users.each_with_index do |prize_user, index|
user = prize_user.user
@ -14,15 +14,17 @@ wb.styles do |s|
prize_user.competition_team_id,
prize_user.competition_team.name,
user.real_name,
user.gender == 1 ? "女" : "男",
user.identity,
user.student_id,
user.student_id.present? ? (user.student_id.to_s + "\t") : "--",
user.school_name,
user.department_name,
user.location,
user.auth_status,
user.pro_status,
user.phone,
user.phone.present? ? (user.phone.to_s + "\t") : "--",
prize_user.leader? ? "是" : "-",
user.ID_number.present? ? (user.ID_number.to_s + "\t") : "--",
[prize_user.extra&.[]('bank'), prize_user.extra&.[]('second_bank'), prize_user.extra&.[]('card_no')].compact.join('/'),
prize_user.approved_at&.strftime('%Y-%m-%d %H:%M'),
prize_user.approver&.real_name

Loading…
Cancel
Save