dev_local
cxt 5 years ago
parent 159c96a720
commit b7fcd7d991

@ -69,7 +69,7 @@ class WelcomeController < ApplicationController
new_stage_shixun = LocalStageShixun.new new_stage_shixun = LocalStageShixun.new
new_stage_shixun.attributes = stage_shixun.attributes.dup.except("id") new_stage_shixun.attributes = stage_shixun.attributes.dup.except("id")
new_stage_shixun.local_subject_id = local_subject.id new_stage_shixun.local_subject_id = local_subject.id
new_stage_shixun.local_subject_id = new_stage.id new_stage_shixun.local_stage_id = new_stage.id
new_stage_shixun.save! new_stage_shixun.save!
end end
end end
@ -115,7 +115,9 @@ class WelcomeController < ApplicationController
local_stage_shixuns.each do |local_stage_shixun| local_stage_shixuns.each do |local_stage_shixun|
# 先同步实训 # 先同步实训
local_shixun = LocalShixun.where(id: local_stage_shixun.local_shixun_id).first local_shixun = LocalShixun.where(id: local_stage_shixun.local_shixun_id).first
shixun = _local_to_shixun local_shixun if local_shixun.present? shixun = _local_to_shixun(local_shixun) if local_shixun.present?
puts("#############local_shixun_id#{local_shixun.id}")
puts("#############shixun_id#{shixun.id}")
new_stage_shixun = StageShixun.new new_stage_shixun = StageShixun.new
new_stage_shixun.position = local_stage_shixun.position new_stage_shixun.position = local_stage_shixun.position

Loading…
Cancel
Save