Jelajahi Sumber

二次提交

Zhouzhendong 5 tahun lalu
induk
melakukan
3a57cd79c8

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

@@ -242,7 +242,7 @@ class PackageController extends Controller
                 $package->save();
                 $package->load(['order','paperBox','measuringMachine']);
             }catch (\Exception $e){
-                $response=["msg"=>"保存时发生错误(未下发)!","code"=>500,"data"=>null];
+                $response=["msg"=>"保存时发生错误!".json_encode($e),"code"=>500,"data"=>null];
                 $this->log(__METHOD__,'weightApi(ERROR)'.__FUNCTION__,json_encode($request).'||'.json_encode($response).'||'.json_encode($e),null);
                 return json_encode($response,JSON_UNESCAPED_UNICODE);
             }

+ 7 - 7
app/OrderPackage.php

@@ -84,14 +84,14 @@ class OrderPackage extends Model
     }
     public function fetchAllFromOracle(){
         if(empty($this->oracleInfo))return null;
-        $this->fetchOwnerFromOracle();
-        $this->fetchLogisticFromOracle();
-        $this['recipient'] = $this->oracleInfo['consigneename'];
-        $this['order_code'] = $this->oracleInfo['orderno'];
+/*        $this->fetchOwnerFromOracle();
+        $this->fetchLogisticFromOracle();*/
+/*        $this['recipient'] = $this->oracleInfo['consigneename'];
+        $this['order_code'] = $this->oracleInfo['orderno'];*/
         $this['batch_rule'] = $this->oracleInfo['descr'];
-        $this['recipient_mobile'] = $this->oracleInfo['c_tel2']??$this->oracleInfo['c_tel1'];
+/*        $this['recipient_mobile'] = $this->oracleInfo['c_tel2']??$this->oracleInfo['c_tel1'];
         if(!$this['logistic_number']&&$this->oracleInfo['soreference5'])
-            $this['logistic_number'] = $this->oracleInfo['soreference5'];
+            $this['logistic_number'] = $this->oracleInfo['soreference5'];*/
         $this['batch_number'] = $this->oracleInfo['waveno']??null;
     }
     static public function createPackagesFromBatchCode($batchCode,$weight){
@@ -175,7 +175,7 @@ class OrderPackage extends Model
         if(!$max)$max=$this['length'];
         if(!$centre)$centre=$this['width'];
         if(!$min)$min=$this['height'];
-        if(!$owner_id) $owner_id = $this['owner_id'];
+        if(!$owner_id) $owner_id = $this['order'] ? $this['order']['owner_id'] : null;
         if(!$owner_id) {
             $owner = $this->fetchOwnerFromOracle();
             $owner_id = $owner['id'];