导入数据时多个“|”
This commit is contained in:
parent
927158fbae
commit
f69a12d6e7
|
@ -97,7 +97,7 @@ class StatisticsController < ApplicationController
|
|||
# logger.info("data-list-------------#{data_list}")
|
||||
|
||||
l_index = description.index("|").to_i
|
||||
r_index= description.rindex("|").to_i - 1
|
||||
r_index= description.rindex("|").to_i
|
||||
description = description.sub(description[l_index..r_index], data_list)
|
||||
|
||||
Statistic.create(:description => description, :name => list[0], :status => exp_statistic.status, :user_id => 21502, :main_category_id => exp_statistic.main_category_id, :sub_category_id => exp_statistic.sub_category_id, :file_size => file_size)
|
||||
|
|
Loading…
Reference in New Issue