wip
This commit is contained in:
1 parent
121a16bd79
commit
43013d3eec
2 files changed
+12
-2
No files matched your search
@@ -16,11 +16,12 @@ trait CopyData
|
||||
return;
|
||||
}
|
||||
|
||||
$copystring = "Part 1\n";
|
||||
$copystring = '';
|
||||
|
||||
foreach ($this->calculationVariables as $k => $part) {
|
||||
foreach ($part as $row) {
|
||||
if ($copystring == '') {
|
||||
$copystring = "Part 1\n";
|
||||
$keys = array_keys($row);
|
||||
$copystring .= implode(';', $keys)."\n";
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ trait PlayerQuery
|
||||
$this->season_selected = $this->getCurrentSeason();
|
||||
}
|
||||
|
||||
Log::debug('season_selected', $this->season_selected);
|
||||
// Log::debug('home_id away_id', [$this->home_id, $this->away_id]);
|
||||
|
||||
$matches_ids = match ($part) {
|
||||
1 => StatistikoEvent::where('league_id', $this->liga_id)
|
||||
@@ -50,8 +50,11 @@ trait PlayerQuery
|
||||
};
|
||||
}
|
||||
|
||||
Log::debug('matches_ids', $matches_ids);
|
||||
|
||||
$res = StatistikoPlayer::with('details')->whereIn('ss_player_id', $player_ids)->whereIn('match_id', $matches_ids)->get();
|
||||
$arr = [];
|
||||
$count = 0;
|
||||
foreach ($res as $val) {
|
||||
|
||||
$ss_player_id = (int) $val->ss_player_id;
|
||||
@@ -60,6 +63,10 @@ trait PlayerQuery
|
||||
$home_id = (int) $val->event->home_id;
|
||||
$away_id = (int) $val->event->away_id;
|
||||
|
||||
if ($ss_player_id == 1200574) {
|
||||
$count++;
|
||||
}
|
||||
|
||||
if (! isset($arr[$ss_player_id])) {
|
||||
self::array_template($arr, $ss_player_id);
|
||||
}
|
||||
@@ -92,6 +99,8 @@ trait PlayerQuery
|
||||
$arr[$ss_player_id]['was_fouled'] += $val->was_fouled;
|
||||
}
|
||||
|
||||
// Log::debug('count 1200574', [$part => $count]);
|
||||
|
||||
foreach ($players as $player) {
|
||||
if (isset($arr[$player->ss_player_id])) {
|
||||
$arr[$player->ss_player_id]['position'] = $player->position;
|
||||
|
||||
Reference in new issue
Block a user