|
|
@ -3036,7 +3036,7 @@ end
|
|
|
|
nickname: list[1].to_s.strip, professional_certification: 1, certification: 1, grade: 0,
|
|
|
|
nickname: list[1].to_s.strip, professional_certification: 1, certification: 1, grade: 0,
|
|
|
|
password: "12345678", phone: list[5].blank? ? nil : list[5], mail: nil}
|
|
|
|
password: "12345678", phone: list[5].blank? ? nil : list[5], mail: nil}
|
|
|
|
user = User.create(user_params)
|
|
|
|
user = User.create(user_params)
|
|
|
|
if user.save(validate: false)
|
|
|
|
if user
|
|
|
|
ue = UserExtensions.new(:user_id => user.id, :gender => 0, :school_id => school_id, :location => school.province, :location_city => school.city, :identity => list[3].to_i, :student_id => list[0].to_s.strip, :department_id => department.try(:id))
|
|
|
|
ue = UserExtensions.new(:user_id => user.id, :gender => 0, :school_id => school_id, :location => school.province, :location_city => school.city, :identity => list[3].to_i, :student_id => list[0].to_s.strip, :department_id => department.try(:id))
|
|
|
|
if list[3] && list[3].to_i == 0
|
|
|
|
if list[3] && list[3].to_i == 0
|
|
|
|
ue.technical_title = ["教授", "副教授", "讲师", "助教"].include?(list[4]) ? list[4] : "讲师"
|
|
|
|
ue.technical_title = ["教授", "副教授", "讲师", "助教"].include?(list[4]) ? list[4] : "讲师"
|
|
|
|