Commit b7700504 authored by hangjun83's avatar hangjun83

财务开票模块更新

parent ba8cbddd
......@@ -305,14 +305,11 @@ class InvoiceService
$this->apiService->setInvoicePlatform($invoiceParams['invoice_platform']);
$cancelInvoiceParams = [];
$cancelInvoiceParams['ddlsh'] = '00000000000002018020001720230222';
$cancelInvoiceParams['ddlsh'] = $invoiceParams['invoice_number'];
//记录请求参数
$response = $this->apiService->queryOrder($cancelInvoiceParams);
var_dump($response);
exit;
return $response;
}
public function getQiyeInvoiceInfo()
......@@ -387,8 +384,15 @@ class InvoiceService
public function apiCallBack($params)
{
if(isset($params) && !empty($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;
}
//现将返回的数据进行存储
switch($params['ywlxdm']){
case 'fpkj' :
......@@ -402,7 +406,14 @@ class InvoiceService
'consumer' => __CLASS__,
'method' => 'invoiceApiCallBack'
],'invoiceCallBack');
}
}*/
$values = $this->apiService->getPlatformDataEntries('invoice_callBack_'.$params['ddlsh'].'_applyInvoice','data_values');
$queueParams = ['params' => $params,'type' => 'applyInvoiceCallBack'];
$this->apiService->pushQueue([
'params' => $queueParams,
'consumer' => __CLASS__,
'method' => 'invoiceApiCallBack'
],'invoiceCallBack');
}
public function invoiceApiCallBack($params)
......@@ -432,6 +443,14 @@ class InvoiceService
SimpleLogs::writeLog($callBackParams, __CLASS__.':'.__FUNCTION__.' 无法找到发票流水号:'.$callBackParams['ddlsh'].'的数据', 'error');
return false;
}
//查询发票信息
$invoiceResponse = $this->queryInvoiceInfo([
'invoice_platform' => $invoiceInfo['invoice_platform'],
'invoice_number' => $callBackParams['ddlsh']
]);
var_dump($invoiceResponse);
exit;
//更新对应的发票数据,并反写回相应的平台发票
try{
$updateInvoice = [];
......
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