From 542817f9f1df63206624a91c47e5559ede8eaa0d Mon Sep 17 00:00:00 2001 From: Arsen Mirzaev Tatyano-Muradovich Date: Mon, 19 Jun 2023 08:10:08 +0700 Subject: [PATCH] =?UTF-8?q?=D0=B7=D0=BD=D0=B0=D1=87=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F=20=D0=BF=D0=BE=20=D1=83=D0=BC=D0=BE=D0=BB=D1=87=D0=B0?= =?UTF-8?q?=D0=BD=D0=B8=D1=8E=20=D0=B4=D0=BB=D1=8F=20=D0=B8=D0=BD=D1=81?= =?UTF-8?q?=D1=82=D0=B0=D0=BD=D1=86=D0=B8=D0=B8=20=D0=B4=D0=BE=D0=BA=D1=83?= =?UTF-8?q?=D0=BC=D0=B5=D0=BD=D1=82=D0=B0=20=D0=B2=20=D0=B1=D0=B0=D0=B7?= =?UTF-8?q?=D0=B5=20=D0=B4=D0=B0=D0=BD=D0=BD=D1=8B=D1=85=20=D0=BF=D1=80?= =?UTF-8?q?=D0=B8=20=D0=BF=D0=B5=D1=80=D0=B2=D0=BE=D0=BC=20=D0=B8=D0=BC?= =?UTF-8?q?=D0=BF=D0=BE=D1=80=D1=82=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../parser/system/public/works.php | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/mirzaev/spetsresurs/google_sheets/parser/system/public/works.php b/mirzaev/spetsresurs/google_sheets/parser/system/public/works.php index 66e8b37..42ea123 100644 --- a/mirzaev/spetsresurs/google_sheets/parser/system/public/works.php +++ b/mirzaev/spetsresurs/google_sheets/parser/system/public/works.php @@ -98,7 +98,6 @@ function filterWorker(?string $worker): string return match ($worker) { '', 0, 00, 000, 0000, 00000, 000000, 0000000, 00000000, 000000000, 0000000000 => '', default => (function () use ($worker, $arangodb) { - var_dump($worker); if ( collection::init($arangodb->session, 'workers') && collection::search( @@ -316,18 +315,18 @@ function sync(int $_i, Row &$row, ?array $raw = null): void 'imported_start' => ['number' => $_row['imported_start'] ?? '', 'converted' => $raw[5] ?? ''], 'imported_end' => ['number' => $_row['imported_end'] ?? '', 'converted' => $raw[6] ?? ''], 'imported_hours' => $_row['imported_hours'] ?? '', - 'created_in_sheets' => ['number' => $_row['created_in_sheets'] ?? '', 'converted' => $raw[8] ?? ''], - 'date' => ['number' => $_row['date'] ?? '', 'converted' => $raw[9] ?? ''], - 'market' => $_row['market'] ?? '', - 'type' => $_row['type'] ?? '', - 'address' => $_row['address'] ?? '', - 'worker' => $_row['worker'] ?? '', - 'name' => $_row['name'] ?? '', - 'work' => $_row['work'] ?? '', - 'start' => ['number' => $_row['start'] ?? '', 'converted' => $raw[16] ?? ''], - 'end' => ['number' => $_row['end'] ?? '', 'converted' => $raw[17] ?? ''], - 'hours' => $_row['hours'] ?? '', - 'tax' => $_row['tax'] ?? '', + 'created_in_sheets' => ['number' => $_row['imported_created_in_sheets'] ?? '', 'converted' => $raw[0] ?? ''], + 'date' => ['number' => $_row['imported_date'] ?? '', 'converted' => $raw[1] ?? ''], + 'market' => $_row['imported_market'] ?? '', + 'type' => empty($_row['type']) ? "=ЕСЛИ(СОВПАД(I$_i;\"\");\"\"; IFNA(ВПР(K$_i;part_import_KRSK!\$B\$2:\$E\$15603;2;);\"Нет в базе\"))" : $_row['type'], + 'address' => empty($_row['address']) ? "=ЕСЛИ(СОВПАД(I$_i;\"\");\"\"; IFNA(ВПР(K$_i;part_import_KRSK!\$B\$2:\$E\$15603;4;);\"Нет в базе\"))" : $_row['address'], + 'worker' => $_row['imported_worker'] ?? '', + 'name' => empty($_row['name']) ? "=ЕСЛИ(СОВПАД(\$I$_i;\"\");\"\"; ЕСЛИ( НЕ(СОВПАД(IFNA(ВПР(\$N$_i;part_import_KRSK!\$R$2:\$R$4999;1;);\"\");\$N$_i)); ЕСЛИ((СОВПАД(IFNA(ВПР(\$N$_i;part_import_KRSK!\$I\$2:\$L\$4999;4);\"\");\"\")); IFNA(ВПР(\$N$_i;part_import_KRSK!\$I\$2:\$J\$4999;2;); \"Сотрудник не назначен\"); \"УВОЛЕН (В списке работающих)\"); \"УВОЛЕН (В списке уволенных)\"))" : $_row['name'], + 'work' => $_row['imported_work'] ?? '', + 'start' => ['number' => $_row['imported_start'] ?? '', 'converted' => $raw[5] ?? ''], + 'end' => ['number' => $_row['imported_end'] ?? '', 'converted' => $raw[6] ?? ''], + 'hours' => $_row['imported_hours'] ?? '', + 'tax' => empty($_row['tax']) ? "=ЕСЛИ(СОВПАД(\$I$_i;\"\");\"\"; IFNA(ВПР(\$N$_i;part_import_KRSK!\$I\$2:\$K\$5000;3;); IFNA(ВПР(\$N$_i;part_import_KRSK!\$R\$2:\$T\$5000;3;);\"000000000000\")))" : $_row['tax'], 'confirmed' => $_row['confirmed'] ?? '', 'commentary' => $_row['commentary'] ?? '', 'response' => $_row['response'] ?? '',