]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
Логи
authorVladimir Fomichev <vladimir.fomichev@erp-flowers.ru>
Thu, 16 Oct 2025 15:21:32 +0000 (18:21 +0300)
committerVladimir Fomichev <vladimir.fomichev@erp-flowers.ru>
Thu, 16 Oct 2025 15:21:32 +0000 (18:21 +0300)
erp24/services/UploadService.php

index 69081175a7a5136f19edee96533097cb2a0bf09f..27315966023bfe416d7822fad94b291a6eef3db2 100644 (file)
@@ -1114,9 +1114,9 @@ class UploadService {
             }
 
             if (!empty($result['checks']) && count($result['checks']) < 1000) {
-
+                LogService::apiErrorLog(json_encode(["error_id" => 121, "error" => __LINE__], JSON_UNESCAPED_UNICODE));
                 foreach ($result["checks"] as $arr) {
-
+                    LogService::apiErrorLog(json_encode(["error_id" => 121, "error" => __LINE__], JSON_UNESCAPED_UNICODE));
                     $check_id = $arr["id"];
                     if ($arr["seller_id"] == '00000000-0000-0000-0000-000000000000') {
                         $arr["seller_id"] = "NULL";
@@ -1140,6 +1140,7 @@ class UploadService {
 //                    SalesProductsUpdate::deleteAll(['check_id' => $arr["id"]]);
 
                     if ($update) {
+                        LogService::apiErrorLog(json_encode(["error_id" => 121, "error" => __LINE__], JSON_UNESCAPED_UNICODE));
                         $sales = Sales::find()->where(['id' => $arr["id"]])->one();
                         if ($sales) {
                             $sales->delete();
@@ -1218,6 +1219,7 @@ class UploadService {
 //                    }
 
                     if ($update) {
+                        LogService::apiErrorLog(json_encode(["error_id" => 121, "error" => __LINE__], JSON_UNESCAPED_UNICODE));
                         $sales2 = new Sales;
                         $sales2->phone = $arr["client_phone"] ?? 0;
                         $sales2->id = $arr["id"];
@@ -1241,6 +1243,7 @@ class UploadService {
                         $sales2->delivery_date = date('Y-m-d', strtotime($arr['delivery_date'] ?? ''));
                         $sales2->pickup = $arr['pickup'] ?? false;
                         $sales2->save();
+                        LogService::apiErrorLog(json_encode(["error_id" => 121, "error" => __LINE__], JSON_UNESCAPED_UNICODE));
                         if ($sales2->getErrors()) {
                             LogService::apiErrorLog(json_encode(["error_id" => 21, "error" => $sales2->getErrors()], JSON_UNESCAPED_UNICODE));
                         }
@@ -1341,6 +1344,7 @@ class UploadService {
                     }
                 }
             } elseif (!empty($result['checks'])) {
+                LogService::apiErrorLog(json_encode(["error_id" => 121, "error" => __LINE__], JSON_UNESCAPED_UNICODE));
                 file_put_contents(self::OUT_DIR . '/error_upload.txt',
                     PHP_EOL . "elseif", FILE_APPEND);
                 $dataArrayValues = self::getSalesDate($result["checks"], $update);
@@ -1567,7 +1571,7 @@ class UploadService {
                 foreach ($result["marketplace_orders"] as $mpOrder) {
                     $updateResult = self::changeMarketplaceOrderStatusFrom1C($mpOrder); //изменение статусов
                     if ($updateResult['status'] == 'error') {
-                        LogService::apiErrorLog(json_encode(["error_id" => 40, "error" => $updateResult['message']], JSON_UNESCAPED_UNICODE));
+                       // LogService::apiErrorLog(json_encode(["error_id" => 40, "error" => $updateResult['message']], JSON_UNESCAPED_UNICODE));
                     }
                 }
             }