From: Vladimir Fomichev Date: Mon, 19 Jan 2026 11:39:28 +0000 (+0300) Subject: Корректировка интервалов X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=9effc5a64c5cb9739306735a7e77f4f922f7b705;p=erp24_rep%2Fyii-erp24%2F.git Корректировка интервалов --- 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 (День)'; } /**