Commit b9d6568a authored by hangjun83's avatar hangjun83

财务开票模块更新

parent 3a3b50ea
......@@ -383,36 +383,40 @@ class InvoiceService
public function apiCallBack($params)
{
if(isset($params) && !empty($params)){
$queueParams = [];
//查询流水号是否有效
$invoiceInfo = $this->invoiceRecordRepository->getInvoiceRecordByNumber($params['ddlsh']);
if(!$invoiceInfo){
//SimpleLogs::writeLog($params, __CLASS__.':'.__FUNCTION__.' 无法找到发票流水号:'.$params['ddlsh'].'的数据', 'error');
return false;
}
try{
if(isset($params) && !empty($params)){
$queueParams = [];
//查询流水号是否有效
$invoiceInfo = $this->invoiceRecordRepository->getInvoiceRecordByNumber($params['ddlsh']);
if(!$invoiceInfo){
//SimpleLogs::writeLog($params, __CLASS__.':'.__FUNCTION__.' 无法找到发票流水号:'.$params['ddlsh'].'的数据', 'error');
return false;
}
//现将返回的数据进行存储
switch($params['ywlxdm']){
case 'fpkj' :
$this->apiService->storePlatformDataEntries('invoice_callBack_'.$params['ddlsh'].'_applyInvoice',$params);
$queueParams = ['params' => $params,'type' => 'applyInvoiceCallBack'];
break;
//现将返回的数据进行存储
switch($params['ywlxdm']){
case 'fpkj' :
$this->apiService->storePlatformDataEntries('invoice_callBack_'.$params['ddlsh'].'_applyInvoice',$params);
$queueParams = ['params' => $params,'type' => 'applyInvoiceCallBack'];
break;
}
//塞入队列
$this->apiService->pushQueue([
'params' => $queueParams,
'consumer' => __CLASS__,
'method' => 'invoiceApiCallBack'
],'invoiceCallBack');
}
//塞入队列
/*$values = $this->apiService->getPlatformDataEntries('invoice_callBack_IRB220230301KOOA9_applyInvoice','data_values');
$queueParams = ['params' => $values,'type' => 'applyInvoiceCallBack'];
$this->apiService->pushQueue([
'params' => $queueParams,
'consumer' => __CLASS__,
'method' => 'invoiceApiCallBack'
],'invoiceCallBack');
],'invoiceCallBack');*/
}catch(\Throwable $exception){
SimpleLogs::writeLog($exception->getMessage(), __CLASS__.':'.__FUNCTION__, 'error');
}
/*$values = $this->apiService->getPlatformDataEntries('invoice_callBack_IRB220230301KOOA9_applyInvoice','data_values');
$queueParams = ['params' => $values,'type' => 'applyInvoiceCallBack'];
$this->apiService->pushQueue([
'params' => $queueParams,
'consumer' => __CLASS__,
'method' => 'invoiceApiCallBack'
],'invoiceCallBack');*/
}
public function invoiceApiCallBack($params)
......
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