Browse Source

更改:读取文件形式

pull/347/head
yystopf 1 year ago
parent
commit
97685bf68c
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app/controllers/api/pm/issues_controller.rb

+ 1
- 1
app/controllers/api/pm/issues_controller.rb 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|


Loading…
Cancel
Save