From: Aleksey Filippov Date: Sat, 20 Jul 2024 13:35:00 +0000 (+0300) Subject: [ERP-117] Правки по выводу сотрудников в лк X-Git-Tag: 1.4~65^2 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=bd66c0947e2dc20ccbf352fcd5b8329fc73ea38a;p=erp24_rep%2Fyii-erp24%2F.git [ERP-117] Правки по выводу сотрудников в лк --- diff --git a/erp24/services/CabinetService.php b/erp24/services/CabinetService.php index 81c0b123..ccc1a9ce 100755 --- a/erp24/services/CabinetService.php +++ b/erp24/services/CabinetService.php @@ -4143,9 +4143,12 @@ Group BY admin_id foreach ($timetableFactPrepared as $key => $row) { if (!array_key_exists($row['date_shift'], $listDateCount)) { $listDateCount[$row['date_shift']] = 1; - $timetableFact[$key] = $row; - $timetableFact[$key]['date'] = $row['date_shift']; + + } else { + $listDateCount[$row['date_shift']] = $listDateCount[$row['date_shift']] + 1; } + $timetableFact[$key] = $row; + $timetableFact[$key]['date'] = $row['date_shift']; } } diff --git a/erp24/web/index.php b/erp24/web/index.php index 7c88b094..a32daaef 100644 --- a/erp24/web/index.php +++ b/erp24/web/index.php @@ -32,7 +32,7 @@ if ( $post = \yii\helpers\Json::encode($postJson); $post = str_replace('"', '\'', $post); $app->db->createCommand( - 'INSERT INTO page_statistics (admin_id, url, post, created_at) VALUES (\'' . $_SESSION['admin_id'] . '\', \'' + 'INSERT INTO public.page_statistics (admin_id, url, post, created_at) VALUES (\'' . $_SESSION['admin_id'] . '\', \'' . $url . '\', :post, NOW())' )->bindParam(':post', $post, PDO::PARAM_STR)->execute(); }