Commit 1ce582c5 authored by hangjun83's avatar hangjun83

财务开票模块更新

parent 2efde4a7
...@@ -78,6 +78,9 @@ class InvoiceJobCommand extends Command ...@@ -78,6 +78,9 @@ class InvoiceJobCommand extends Command
case 'resetApplyInvoice' : case 'resetApplyInvoice' :
$service->resetApplyInvoice($params); $service->resetApplyInvoice($params);
break; break;
case 'manualDownLoadInvoicePdf' :
$service->manualDownLoadInvoicePdf($params);
break;
case 'apiCallBack' : case 'apiCallBack' :
$service->apiCallBack([ $service->apiCallBack([
'invoice_platform' => 'rhawn', 'invoice_platform' => 'rhawn',
......
...@@ -690,4 +690,25 @@ class InvoiceService ...@@ -690,4 +690,25 @@ class InvoiceService
} }
} }
public function manualDownLoadInvoicePdf($params)
{
$downloadUrl = base64_decode($params);
if(!$downloadUrl){
throw new \Exception('不是有效的下载地址');
}
$downloadUrl = urldecode($downloadUrl);
$uriList = explode('/',$downloadUrl);
$filename = '';
foreach($uriList as $uri){
if(strstr($uri,'.pdf')){
$nameList = explode('_',str_replace(strstr($uri,'.pdf'),'',$uri));
$filename = $nameList[1].'.pdf';
}
}
$path = config('filesystems.default.root').'public/finance/invoice/manual/';
$this->saveInvoicePdf($path.$filename, $downloadUrl);
}
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment