From 9effc5a64c5cb9739306735a7e77f4f922f7b705 Mon Sep 17 00:00:00 2001 From: Vladimir Fomichev Date: Mon, 19 Jan 2026 14:39:28 +0300 Subject: [PATCH] =?utf8?q?=D0=9A=D0=BE=D1=80=D1=80=D0=B5=D0=BA=D1=82=D0=B8?= =?utf8?q?=D1=80=D0=BE=D0=B2=D0=BA=D0=B0=20=D0=B8=D0=BD=D1=82=D0=B5=D1=80?= =?utf8?q?=D0=B2=D0=B0=D0=BB=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/commands/MarketplaceController.php | 6 +++--- erp24/services/dto/OrderIssue.php | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/erp24/commands/MarketplaceController.php b/erp24/commands/MarketplaceController.php index 9bfe21b8..fed78608 100644 --- a/erp24/commands/MarketplaceController.php +++ b/erp24/commands/MarketplaceController.php @@ -369,14 +369,14 @@ class MarketplaceController extends Controller * 2. "Успех без чека" - МП="Выполнен", РМК НЕ "Успех" * 3. "Отмена без обработки" - МП="Отменён", РМК НЕ "Отказ" * - * Запуск по расписанию: 08:00 и 20:00 MSK + * Запуск по расписанию: 08:00 и 20:00 MSK (каждые 12 часов) * Команда: php yii marketplace/send-order-control-report * - * @param int $hours Период выборки в часах (по умолчанию 24) + * @param int $hours Период выборки в часах (по умолчанию 12 — соответствует расписанию) * @param bool $onlyNew Отправлять только новые проблемы (по умолчанию true) * @return int Код завершения (0 = успех, 1 = ошибка, 2 = частичный успех) */ - public function actionSendOrderControlReport(int $hours = 24, bool $onlyNew = true): int + public function actionSendOrderControlReport(int $hours = 12, bool $onlyNew = true): int { set_time_limit(300); // 5 минут максимум diff --git a/erp24/services/dto/OrderIssue.php b/erp24/services/dto/OrderIssue.php index 9a732f8c..c938157f 100644 --- a/erp24/services/dto/OrderIssue.php +++ b/erp24/services/dto/OrderIssue.php @@ -143,14 +143,16 @@ class OrderIssue } /** - * Определяет интервал проверки (08:00 или 20:00) + * Определяет интервал проверки (Дневная/Ночная смена) * * @return string */ private function calculateInterval(): string { $hour = (int)date('H'); - return $hour < 12 ? '08:00' : '20:00'; + // 08:00 - утренняя проверка (ночная смена завершилась) + // 20:00 - вечерняя проверка (дневная смена завершилась) + return $hour < 12 ? '08:00 (Ночь)' : '20:00 (День)'; } /** -- 2.39.5