update sync account
This commit is contained in:
parent
a723b22036
commit
5bd0e79625
|
@ -80,7 +80,7 @@ class Admin::ImportDataController < OrbitBackendController
|
|||
# if hash.ntu_seq.present?
|
||||
if hash.user_id.present?
|
||||
# ntu_seq = hash.ntu_seq
|
||||
u_account = hash.user_id
|
||||
u_account = hash.email.split('@')[0]
|
||||
books_xml = Nokogiri::XML( \
|
||||
# open("http://ann.cc.ntu.edu.tw/Achv/xmlBook.asp?Seq=#{ntu_seq}"))
|
||||
open("http://ann.cc.ntu.edu.tw/Achv/xmlData_useMail.asp?item=Book&account=#{u_account}"))
|
||||
|
@ -132,7 +132,7 @@ class Admin::ImportDataController < OrbitBackendController
|
|||
# if hash.ntu_seq.present?
|
||||
if hash.user_id.present?
|
||||
# ntu_seq = hash.ntu_seq
|
||||
u_account = hash.user_id
|
||||
u_account = hash.email.split('@')[0]
|
||||
conference_xml = Nokogiri::XML( \
|
||||
# open("http://ann.cc.ntu.edu.tw/Achv/xmlPaper.asp?Seq=#{ntu_seq}&type=C"))
|
||||
open("http://ann.cc.ntu.edu.tw/Achv/xmlData_useMail.asp?item=paper&account=#{u_account}&type=C"))
|
||||
|
@ -206,7 +206,7 @@ class Admin::ImportDataController < OrbitBackendController
|
|||
# if hash.ntu_seq.present?
|
||||
if hash.user_id.present?
|
||||
# ntu_seq = hash.ntu_seq
|
||||
u_account = hash.user_id
|
||||
u_account = hash.email.split('@')[0]
|
||||
paper_xml = Nokogiri::XML( \
|
||||
#open("http://versatile.management.ntu.edu.tw/publication1/journal/#{ntuseq}.xml"))
|
||||
# open("http://ann.cc.ntu.edu.tw/Achv/xmlPaper.asp?Seq=#{ntu_seq}&type=J"))
|
||||
|
@ -278,7 +278,7 @@ def sync_conference_data
|
|||
# if @user.sid.present?
|
||||
if @user.user_id.present?
|
||||
# ntu_seq = @user.sid
|
||||
u_account = @user.user_id
|
||||
u_account = @user.email.split('@')[0]
|
||||
conference_xml = Nokogiri::XML( \
|
||||
# open("http://ann.cc.ntu.edu.tw/Achv/xmlPaper.asp?Seq=#{ntu_seq}&type=C"))
|
||||
open("http://ann.cc.ntu.edu.tw/Achv/xmlData_useMail.asp?item=paper&account=#{u_account}&type=C"))
|
||||
|
@ -355,7 +355,7 @@ def sync_conference_data
|
|||
# if @user.sid.present?
|
||||
if @user.user_id.present?
|
||||
# ntu_seq = @user.sid
|
||||
u_account = @user.user_id
|
||||
u_account = @user.email.split('@')[0]
|
||||
paper_xml = Nokogiri::XML( \
|
||||
#open("http://versatile.management.ntu.edu.tw/publication1/journal/#{ntuseq}.xml"))
|
||||
# open("http://ann.cc.ntu.edu.tw/Achv/xmlPaper.asp?Seq=#{ntu_seq}&type=J"))
|
||||
|
@ -436,7 +436,7 @@ def sync_book_data
|
|||
# if @user.sid.present?
|
||||
if @user.user_id.present?
|
||||
# ntu_seq = @user.sid
|
||||
u_account = @user.user_id
|
||||
u_account = @user.email.split('@')[0]
|
||||
books_xml = Nokogiri::XML( \
|
||||
# open("http://ann.cc.ntu.edu.tw/Achv/xmlBook.asp?Seq=#{ntu_seq}"))
|
||||
open("http://ann.cc.ntu.edu.tw/Achv/xmlData_useMail.asp?item=Book&account=#{u_account}"))
|
||||
|
@ -486,7 +486,7 @@ end
|
|||
@user.each do |user|
|
||||
if user.user_id.present?
|
||||
next if !user.email.include? "ntu.edu.tw"
|
||||
u_account = user.user_id
|
||||
u_account = user.email.split('@')[0]
|
||||
@conference_xml = nil
|
||||
begin
|
||||
timeout(60) do
|
||||
|
@ -559,7 +559,7 @@ def sync_journal_paper_data_auto
|
|||
@user.each do |user|
|
||||
if user.user_id.present?
|
||||
next if !user.email.include? "ntu.edu.tw"
|
||||
u_account = user.user_id
|
||||
u_account = user.email.split('@')[0]
|
||||
@paper_xml = nil
|
||||
begin
|
||||
timeout(60) do
|
||||
|
@ -638,7 +638,7 @@ def sync_book_data_auto
|
|||
@user.each do |user|
|
||||
if user.user_id.present?
|
||||
next if !user.email.include? "ntu.edu.tw"
|
||||
u_account = user.user_id
|
||||
u_account = user.email.split('@')[0]
|
||||
@books_xml = nil
|
||||
begin
|
||||
timeout(60) do
|
||||
|
|
Loading…
Reference in New Issue