Commit b9d6568a authored by hangjun83's avatar hangjun83

财务开票模块更新

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