|
|
|
@ -11,7 +11,7 @@ class Ecs::ImportStudentService < ApplicationService
|
|
|
|
|
def call
|
|
|
|
|
raise Error, '文件不存在' if params[:file].blank? || !params[:file].is_a?(ActionDispatch::Http::UploadedFile)
|
|
|
|
|
|
|
|
|
|
excel = Ecs::ImportStudentExcel.new(params[:file].to_path)
|
|
|
|
|
excel = Ecs::ImportStudentExcel.new(params[:file].path)
|
|
|
|
|
|
|
|
|
|
success_count = 0
|
|
|
|
|
EcYearStudent.bulk_insert(:student_id, :name, :created_at, :updated_at) do |worker|
|
|
|
|
|