|
|
|
@ -58,11 +58,11 @@ namespace :subjects do
|
|
|
|
|
# end
|
|
|
|
|
# end
|
|
|
|
|
# end
|
|
|
|
|
if str.size > 0
|
|
|
|
|
sql = "REPLACE INTO subject_records(#{column_value}) VALUES #{str.uniq.join(",")}"
|
|
|
|
|
puts sql
|
|
|
|
|
ActiveRecord::Base.connection.execute sql
|
|
|
|
|
end
|
|
|
|
|
# if str.size > 0
|
|
|
|
|
# sql = "REPLACE INTO subject_records(#{column_value}) VALUES #{str.uniq.join(",")}"
|
|
|
|
|
# puts sql
|
|
|
|
|
# ActiveRecord::Base.connection.execute sql
|
|
|
|
|
# end
|
|
|
|
|
puts("---------------------data_statistic_end")
|
|
|
|
|
Rails.logger.info("---------------------data_statistic_end")
|
|
|
|
|
end
|
|
|
|
|