whereIn('deliveryNo', $logistic_number) ->whereIn('ConsigneeId', ["SFQHD",'SFSYQHD','SFTHQHD']) ->get(); return$oracleDocOrderHeaders->map(function ($item) { return [ // TODO 需要动态获取面单获取的组件 TYPE 'type' => 'SFQHD', 'task_id' => Str::uuid(), 'data' => '', 'component_type' => 'SFQHD', 'owner_code' => $item->customerid ?? '', 'logistic_code' => $item->userdefine1 ?? '', 'logistic_number' => $item['deliveryno'], 'delivery' => $this->getDelivery($item), 'base64' => $this->getBase64($item), 'printerName' => '', ]; })->toArray(); } public function getBase64($item) { $item = OwnerLogisticPrintTemplate::query()->with('printTemplate')->where('owner_id', function (Builder $query) use ($item) { $query->from("owners")->selectRaw('id')->where("code", $item['customerid']); })->where('logistic_id', function (Builder $query) use ($item) { $query->from("logistic")->selectRaw('id')->where("code", $item['userdefine1']); })->first(); $image = $this->draw($item['delivery'], $item, null); $path = ''; $this->saveImage($image, $path); app(DeliveryService::class)->pushClearCache($path); return $this->readImageBase64($path); } function getDelivery($item): array { return $this->getDocOrderInfo($item); } function processing(&$params) { } function construct($param) { } }