From afdec92cb1f320553c411ec16f6db02459638cee Mon Sep 17 00:00:00 2001 From: Russ Long Date: Sat, 8 Feb 2020 15:36:02 -0500 Subject: [PATCH] Fix donotjudge in score tabulation --- app/Console/Commands/TabulateWinners.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/Console/Commands/TabulateWinners.php b/app/Console/Commands/TabulateWinners.php index 406a00d..5a8725e 100644 --- a/app/Console/Commands/TabulateWinners.php +++ b/app/Console/Commands/TabulateWinners.php @@ -54,6 +54,7 @@ class TabulateWinners extends Command ->whereNotIn('vehicle_scores.vehicle', function($query){ $query->select('vehicle')->from('car_show_winners'); }) + ->where('vehicles.doNotJudge', '=', 0) ->orderBy('totalscore','desc') ->first(); return $mainWinnerQuery->vehicle; @@ -67,6 +68,7 @@ class TabulateWinners extends Command ->whereNotIn('vehicle', function($query){ $query->select('vehicle')->from('car_show_winners'); }) + ->where('vehicles.doNotJudge', '=', 0) ->orderBy('totalscore','desc') ->first(); return $peoplesChoiceWinnerQuery->vehicle; @@ -83,6 +85,7 @@ class TabulateWinners extends Command }) ->where('vehicles.year', '>=', 1900) ->where('vehicles.year', '<=', 1949) + ->where('vehicles.doNotJudge', '=', 0) ->orderBy('totalscore','desc') ->first(); return $oughtsTo49Query->vehicle; @@ -98,6 +101,7 @@ class TabulateWinners extends Command }) ->where('vehicles.year', '>=', 1950) ->where('vehicles.year', '<=', 1959) + ->where('vehicles.doNotJudge', '=', 0) ->orderBy('totalscore','desc') ->first(); return $fiftiesQuery->vehicle; @@ -113,6 +117,7 @@ class TabulateWinners extends Command }) ->where('vehicles.year', '>=', 1960) ->where('vehicles.year', '<=', 1969) + ->where('vehicles.doNotJudge', '=', 0) ->orderBy('totalscore','desc') ->first(); return $sixtiesQuery->vehicle; @@ -127,6 +132,7 @@ class TabulateWinners extends Command }) ->where('vehicles.year', '>=', 1970) ->where('vehicles.year', '<=', 1979) + ->where('vehicles.doNotJudge', '=', 0) ->orderBy('totalscore','desc') ->first(); return $seventiesQuery->vehicle; @@ -142,6 +148,7 @@ class TabulateWinners extends Command }) ->where('vehicles.year', '>=', 1980) ->where('vehicles.year', '<=', 1989) + ->where('vehicles.doNotJudge', '=', 0) ->orderBy('totalscore','desc') ->first(); return $eightiesQuery->vehicle; @@ -157,6 +164,7 @@ class TabulateWinners extends Command }) ->where('vehicles.year', '>=', 1990) ->where('vehicles.year', '<=', 1999) + ->where('vehicles.doNotJudge', '=', 0) ->orderBy('totalscore','desc') ->first(); return $ninetiesQuery->vehicle; @@ -171,6 +179,7 @@ class TabulateWinners extends Command }) ->where('vehicles.year', '>=', 2000) //->where('vehicles.year', '<=', 1959) + ->where('vehicles.doNotJudge', '=', 0) ->orderBy('totalscore','desc') ->first(); return $thousandsQuery->vehicle; @@ -201,6 +210,7 @@ class TabulateWinners extends Command 'bestTruckFirst' => '5', 'corvetteFirst' => '7', 'camaroFirst' => '8', + 'moparFirst' => '16', 'mustangFirst' => '1', 'ratRideFirst' => '4' );