Quellcode durchsuchen

不同快递接口的修改

ajun vor 4 Jahren
Ursprung
Commit
2b710fb608

+ 2 - 0
app/Services/PDDDeliveryService.php

@@ -62,9 +62,11 @@ class PDDDeliveryService implements DeliveryInterface
         if (!$item) return $item;
         $path = '';
         $img = $this->getImage($item['base64'], $path);
+        app(DeliveryService::class)->pushClearCache($path);
         $image = $this->draw($item['delivery'], $PrintTemplate, $img);
         $this->saveImage($image, $path);
         $item['base64'] = $this->readImageBase64($path);
+        app(DeliveryService::class)->pushClearCache($path);
         return $item;
     }
 }

+ 1 - 3
app/Services/SFDeliveryService.php

@@ -2,12 +2,9 @@
 
 namespace App\Services;
 
-use App\OracleDocOrderDeliveryInfo;
-use App\OracleDOCOrderHeader;
 use App\OwnerLogisticPrintTemplate;
 use App\Services\Interfaces\DeliveryInterface;
 use App\Traits\DeliveryProcess;
-use App\Traits\DrawImage;
 use Illuminate\Database\Query\Builder;
 use Illuminate\Support\Str;
 
@@ -57,6 +54,7 @@ class SFDeliveryService implements DeliveryInterface
         $image = $this->draw($item['delivery'],$item,null);
         $path = '';
         $this->saveImage($image,$path);
+        app(DeliveryService::class)->pushClearCache($path);
         return $this->readImageBase64($path);
     }
 

+ 1 - 3
app/Services/SFQHDDeliveryService.php

@@ -3,12 +3,10 @@
 namespace App\Services;
 
 
-use App\OracleDocOrderDeliveryInfo;
 use App\OracleDOCOrderHeader;
 use App\OwnerLogisticPrintTemplate;
 use App\Services\Interfaces\DeliveryInterface;
 use App\Traits\DeliveryProcess;
-use App\Traits\DrawImage;
 use Illuminate\Database\Query\Builder;
 use Illuminate\Support\Str;
 
@@ -22,7 +20,6 @@ class SFQHDDeliveryService implements DeliveryInterface
         $oracleDocOrderHeaders = OracleDOCOrderHeader::query()
             ->whereIn('deliveryNo', $logistic_number)
             ->whereIn('ConsigneeId', ["SFQHD",'SFSYQHD','SFTHQHD'])
-//            ->where('SoStatus', '<>', '90')
             ->get();
 
         return$oracleDocOrderHeaders->map(function ($item) {
@@ -52,6 +49,7 @@ class SFQHDDeliveryService implements DeliveryInterface
         $image = $this->draw($item['delivery'], $item, null);
         $path = '';
         $this->saveImage($image, $path);
+        app(DeliveryService::class)->pushClearCache($path);
         return $this->readImageBase64($path);
     }
 

+ 5 - 2
app/Services/TBDeliveryService.php

@@ -47,9 +47,10 @@ class TBDeliveryService implements DeliveryInterface
         return $this->getDocOrderDeliveryInfo($item);
     }
 
-    function processing($item)
+    function processing(array &$item)
     {
         $item['is_process'] = true;
+
         $PrintTemplate = OwnerLogisticPrintTemplate::query()->with('printTemplate')->where('owner_id', function (Builder $query) use ($item) {
             $query->from('owners')->selectRaw('id')->where("code", $item['owner_code']);
         })->where('logistic_id', function (Builder $query) use ($item) {
@@ -59,9 +60,11 @@ class TBDeliveryService implements DeliveryInterface
         if (!$item) return $item;
         $path = '';
         $img = $this->getImage($item['base64'], $path);
-        $image = $this->draw($item['delivery'], $PrintTemplate, $img);
+        app(DeliveryService::class)->pushClearCache($path);
+        $image = $this->draw($item['delivery'], $PrintTemplate->printTemplate, $img);
         $this->saveImage($image, $path);
         $item['base64'] = $this->readImageBase64($path);
+        app(DeliveryService::class)->pushClearCache($path);
         return $item;
     }