add form_to_start & form_to_end to import method

This commit is contained in:
EricTYL 2020-01-20 10:22:42 +08:00
parent 7ba8a128ff
commit 7c36fc514d
1 changed files with 20 additions and 15 deletions

View File

@ -101,38 +101,43 @@ module Admin::JournalPapersHelper
jp.vol_no = val
when 11
jp.issue_no = val
when 12
when 12
jp.form_to_start = val
when 13
jp.form_to_end = val
# index need to +2
when 14
jp.total_pages = val
when 13
when 15
jls = JournalLevel.asc(:created_at).all.to_a
ts = val.to_s.split(",")
ts.each do |t|
jp.journal_level_ids << jls[t.to_i].id if t.to_s.is_i? && t.to_i < jls.count
end
when 14
when 16
jpts = JournalPaperType.asc(:created_at).all.to_a
jp.journal_paper_type = jpts[val.to_i] if val.to_s.is_i? && val.to_i < jpts.count
when 15
when 17
jpas = JournalPaperAuthorType.asc(:created_at).all.to_a
ts = val.to_s.split(",")
ts.each do |t|
jp.journal_paper_author_type_ids << jpas[t.to_i].id if t.to_s.is_i? && t.to_i < jpas.count
end
when 16
jp.number_of_authors = val
when 17
jp.isbn = val
when 18
jp.publication_date = val
jp.number_of_authors = val
when 19
jp.url = val
when 20
jp.keywords = val
jp.isbn = val
when 20
jp.publication_date = val
when 21
jp.abstract = val
when 22
jp.note = val
jp.url = val
when 22
jp.keywords = val
when 23
jp.abstract = val
when 24
jp.note = val
when 25
jp.associated_project_translations = {"en" => val, "zh_tw" => val}
end
end