From 08322e989bc39b175c061934e666fb32ce002e99 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Mon, 19 Aug 2019 09:05:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=B3=E8=B5=9B=E5=92=8C=E6=80=BB=E6=8E=92?= =?UTF-8?q?=E8=A1=8C=E6=A6=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/competitions_controller.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/competitions_controller.rb b/app/controllers/competitions_controller.rb index 57ff871c..cd3a9ef6 100644 --- a/app/controllers/competitions_controller.rb +++ b/app/controllers/competitions_controller.rb @@ -327,9 +327,9 @@ class CompetitionsController < ApplicationController elsif @type == "决赛" # '92b7vt8x','a7fxenvc','wt2xfzny','xa4m9cng','tng6heyf','am5o73er','9fla2zry','fzp3iu4w','qlsy6xb4' # 预赛的实训id 第一阶段:1289,1373,1256 第二阶段:1488, 1453, 1487 第三阶段:1470, 1473, 1408 - shixun1_id = Shixun.where(:identifier => ['92b7vt8x','a7fxenvc','wt2xfzny']).pluck(:id) - shixun2_id = Shixun.where(:identifier => ['xa4m9cng','tng6heyf','am5o73er']).pluck(:id) - shixun3_id = Shixun.where(:identifier => ['9fla2zry','fzp3iu4w','qlsy6xb4']).pluck(:id) + shixun1_id = Shixun.where(:identifier => ['ftlc4x38']).pluck(:id) + shixun2_id = Shixun.where(:identifier => ['y9npgih2','ucqt7fw3','2p7ouzwk']).pluck(:id) + shixun3_id = Shixun.where(:identifier => ['fj49r7xv','gf2cvxfh','cmoxhtbs']).pluck(:id) end if @competition.competition_scores.where(:competition_stage_id => @stage.id).count == 0 @@ -385,7 +385,7 @@ class CompetitionsController < ApplicationController f_score = team.competition_scores.where(:competition_stage_id => final_stage.try(:id)).first # 预赛记录 p_score = team.competition_scores.where(:competition_stage_id => pre_stage.try(:id)).first - team[:s_score] = (f_score.try(:score).to_f * 0.85 + p_score.try(:score).to_f * 0.15).try(:round, 2) + team[:s_score] = (f_score.try(:score).to_f * 0.80 + p_score.try(:score).to_f * 0.20).try(:round, 2) team[:s_spend_time] = f_score.try(:cost_time).to_i + p_score.try(:cost_time).to_i end end