更改:读取文件形式

This commit is contained in:
yystopf 2024-08-07 11:23:11 +08:00
parent 6f0afffb3b
commit 97685bf68c
1 changed files with 1 additions and 1 deletions

View File

@ -147,7 +147,7 @@ class Api::Pm::IssuesController < Api::Pm::BaseController
return render_error('请输入正确的项目ID.') if params[:pm_project_id].blank?
return render_error('请输入正确的组织ID.') if params[:organization_id].blank?
types = {requirement: 1, task: 2, bug: 3}
doc = SimpleXlsxReader.parse(params[:file].to_io)
doc = SimpleXlsxReader.open(params[:file].tempfile)
doc.sheets.each do |sheet|
type = types["#{sheet.name}".to_sym]
sheet.rows.each.with_index do |row, index|