Ver Fonte

日志添加

ajun há 5 anos atrás
pai
commit
e0833c96d5

+ 3 - 1
app/Http/Controllers/api/thirdPart/weight/WeightBaseController.php

@@ -56,12 +56,14 @@ class WeightBaseController
             /** @var OracleDOCOrderHeader $orderHeader */
             $orderHeader = $this->findOrderHeaderByLogisticNumber($logistic_number);
             if (is_null($orderHeader)) {
+                app('LogService')->log(__METHOD__, $this->name, 'WMSOrderHeaderNotFind (Error)',$logistic_number , null);
                 return $this->getNotFindOrderHeaderMessage($params, $orderPackage);
             }
             try {
                 $order = $this->createOrderByOrderHeader($orderHeader);
                 $orderPackage = $this->createOrderPackage($params, $measuringMachine, $order);
             } catch (\Exception $e) {
+                app('LogService')->log(__METHOD__, $this->name, '写入WAS失败! (Error)',$logistic_number , null);
                 return json_encode(["success" => false, "message" => "写入WAS失败!"], JSON_UNESCAPED_UNICODE);
             }
         }
@@ -72,7 +74,7 @@ class WeightBaseController
         try {
             $this->activityWaveNoProcessing($orderPackage);
         } catch (\Exception $e) {
-            app('LogService')->log(__METHOD__, $this->name, ' weightApi (Error)', json_encode($orderPackage) . '||' . json_encode($e), null);
+            app('LogService')->log(__METHOD__, $this->name, 'weightApi (Error)', json_encode($orderPackage) . '||' . json_encode($e), null);
             return $this->getWeightMessage($orderPackage, $e);
         }
         // 7、称重完成之后操作