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){
$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'
);