Commit 48f7a77f authored by hangjun83's avatar hangjun83

财务开票模块更新

parent 2aa562bb
......@@ -542,6 +542,13 @@ class InvoiceService
}
$sended = !$sended ? [] :$sended;
if(isset($invoiceParams['delay']) && !empty($invoiceParams['delay'])){
if(time() < $invoiceParams['delay']){
SimpleLogs::writeLog("流水号:".$invoiceParams['invoice_number'].'的邮件还未到发送时间', __CLASS__.':'.__FUNCTION__);
return true;
}
}
//获取发票地址
if(isset($invoiceParams['invoice_pdf_url']) && !empty($invoiceParams['invoice_pdf_url'])){
$filename = $invoiceParams['platform_invoice_id'].'_'.$invoiceParams['invoice_number'].'_'.$invoiceParams['invoice_real_date'].'.pdf';
......@@ -551,8 +558,9 @@ class InvoiceService
$invoiceResult = $this->invoiceRecordRepository->getInvoiceRecordByNumber($invoiceParams['invoice_number']);
$invoiceResult = current($invoiceResult);
if(empty($invoiceResult['invoice_pdf_url'])){
$invoiceResult['delay'] = strtotime("+20 minute");
$this->apiService->pushQueue([
'params' => $invoiceParams,
'params' => $invoiceResult,
'consumer' => __CLASS__,
'method' => 'sendInvoiceEmail'
],'invoiceEmailPush');
......
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