Fix donotjudge in score tabulation

This commit is contained in:
Russ Long 2020-02-08 15:36:02 -05:00
parent 089bfab356
commit afdec92cb1

View File

@ -54,6 +54,7 @@ class TabulateWinners extends Command
->whereNotIn('vehicle_scores.vehicle', function($query){ ->whereNotIn('vehicle_scores.vehicle', function($query){
$query->select('vehicle')->from('car_show_winners'); $query->select('vehicle')->from('car_show_winners');
}) })
->where('vehicles.doNotJudge', '=', 0)
->orderBy('totalscore','desc') ->orderBy('totalscore','desc')
->first(); ->first();
return $mainWinnerQuery->vehicle; return $mainWinnerQuery->vehicle;
@ -67,6 +68,7 @@ class TabulateWinners extends Command
->whereNotIn('vehicle', function($query){ ->whereNotIn('vehicle', function($query){
$query->select('vehicle')->from('car_show_winners'); $query->select('vehicle')->from('car_show_winners');
}) })
->where('vehicles.doNotJudge', '=', 0)
->orderBy('totalscore','desc') ->orderBy('totalscore','desc')
->first(); ->first();
return $peoplesChoiceWinnerQuery->vehicle; return $peoplesChoiceWinnerQuery->vehicle;
@ -83,6 +85,7 @@ class TabulateWinners extends Command
}) })
->where('vehicles.year', '>=', 1900) ->where('vehicles.year', '>=', 1900)
->where('vehicles.year', '<=', 1949) ->where('vehicles.year', '<=', 1949)
->where('vehicles.doNotJudge', '=', 0)
->orderBy('totalscore','desc') ->orderBy('totalscore','desc')
->first(); ->first();
return $oughtsTo49Query->vehicle; return $oughtsTo49Query->vehicle;
@ -98,6 +101,7 @@ class TabulateWinners extends Command
}) })
->where('vehicles.year', '>=', 1950) ->where('vehicles.year', '>=', 1950)
->where('vehicles.year', '<=', 1959) ->where('vehicles.year', '<=', 1959)
->where('vehicles.doNotJudge', '=', 0)
->orderBy('totalscore','desc') ->orderBy('totalscore','desc')
->first(); ->first();
return $fiftiesQuery->vehicle; return $fiftiesQuery->vehicle;
@ -113,6 +117,7 @@ class TabulateWinners extends Command
}) })
->where('vehicles.year', '>=', 1960) ->where('vehicles.year', '>=', 1960)
->where('vehicles.year', '<=', 1969) ->where('vehicles.year', '<=', 1969)
->where('vehicles.doNotJudge', '=', 0)
->orderBy('totalscore','desc') ->orderBy('totalscore','desc')
->first(); ->first();
return $sixtiesQuery->vehicle; return $sixtiesQuery->vehicle;
@ -127,6 +132,7 @@ class TabulateWinners extends Command
}) })
->where('vehicles.year', '>=', 1970) ->where('vehicles.year', '>=', 1970)
->where('vehicles.year', '<=', 1979) ->where('vehicles.year', '<=', 1979)
->where('vehicles.doNotJudge', '=', 0)
->orderBy('totalscore','desc') ->orderBy('totalscore','desc')
->first(); ->first();
return $seventiesQuery->vehicle; return $seventiesQuery->vehicle;
@ -142,6 +148,7 @@ class TabulateWinners extends Command
}) })
->where('vehicles.year', '>=', 1980) ->where('vehicles.year', '>=', 1980)
->where('vehicles.year', '<=', 1989) ->where('vehicles.year', '<=', 1989)
->where('vehicles.doNotJudge', '=', 0)
->orderBy('totalscore','desc') ->orderBy('totalscore','desc')
->first(); ->first();
return $eightiesQuery->vehicle; return $eightiesQuery->vehicle;
@ -157,6 +164,7 @@ class TabulateWinners extends Command
}) })
->where('vehicles.year', '>=', 1990) ->where('vehicles.year', '>=', 1990)
->where('vehicles.year', '<=', 1999) ->where('vehicles.year', '<=', 1999)
->where('vehicles.doNotJudge', '=', 0)
->orderBy('totalscore','desc') ->orderBy('totalscore','desc')
->first(); ->first();
return $ninetiesQuery->vehicle; return $ninetiesQuery->vehicle;
@ -171,6 +179,7 @@ class TabulateWinners extends Command
}) })
->where('vehicles.year', '>=', 2000) ->where('vehicles.year', '>=', 2000)
//->where('vehicles.year', '<=', 1959) //->where('vehicles.year', '<=', 1959)
->where('vehicles.doNotJudge', '=', 0)
->orderBy('totalscore','desc') ->orderBy('totalscore','desc')
->first(); ->first();
return $thousandsQuery->vehicle; return $thousandsQuery->vehicle;
@ -201,6 +210,7 @@ class TabulateWinners extends Command
'bestTruckFirst' => '5', 'bestTruckFirst' => '5',
'corvetteFirst' => '7', 'corvetteFirst' => '7',
'camaroFirst' => '8', 'camaroFirst' => '8',
'moparFirst' => '16',
'mustangFirst' => '1', 'mustangFirst' => '1',
'ratRideFirst' => '4' 'ratRideFirst' => '4'
); );