|
|
|
@ -115,15 +115,14 @@ class WelcomeController < ApplicationController
|
|
|
|
|
# 先同步实训
|
|
|
|
|
local_shixun = LocalShixun.where(id: local_stage_shixun.local_shixun_id).first
|
|
|
|
|
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.position = local_stage_shixun.position
|
|
|
|
|
new_stage_shixun.stage_id = new_stage.id
|
|
|
|
|
new_stage_shixun.subject_id = subject.id
|
|
|
|
|
new_stage_shixun.shixun_id = shixun.try(:id)
|
|
|
|
|
new_stage_shixun.save!
|
|
|
|
|
if shixun
|
|
|
|
|
new_stage_shixun = StageShixun.new
|
|
|
|
|
new_stage_shixun.position = local_stage_shixun.position
|
|
|
|
|
new_stage_shixun.stage_id = new_stage.id
|
|
|
|
|
new_stage_shixun.subject_id = subject.id
|
|
|
|
|
new_stage_shixun.shixun_id = shixun.try(:id)
|
|
|
|
|
new_stage_shixun.save!
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|