Commit 42ad98dd authored by hangjun83's avatar hangjun83

财务开票模块更新

parent e67acac9
......@@ -26,7 +26,7 @@ class BaiwangApiService extends PlatformAbstractService
/**
* 查询企业唯一标识
*/
public function queryQiyeUniqueSign($platform)
public function queryQiyeUniqueSign()
{
try{
if($this->checkPlatformStatus()){
......@@ -47,7 +47,12 @@ class BaiwangApiService extends PlatformAbstractService
{
try{
if($this->checkPlatformStatus()){
$queryParams = $params;
$queryParams = array_merge(
$params,
[
'qyId' => $this->platformInfo['platform_params'][$this->invoicePlatform]['qyid']
]
);
$response = $this->sendPost($this->getPlatformApiUrl().'/cloud/queryOrder',$queryParams);
return $this->response($response);
}
......
......@@ -99,6 +99,9 @@ class InvoiceService
throw new \Exception('购买方发票信息不存在',502);
}
//设置发票平台
$this->apiService->setInvoicePlatform($invoiceParams['invoice_platform']);
//查询是否存在发票记录
$invoiceInfo = null;
switch($invoiceParams['invoice_platform']){
......@@ -240,6 +243,9 @@ class InvoiceService
throw new \Exception('开票平台不在允许范围内',502);
}
//设置发票平台
$this->apiService->setInvoicePlatform($invoiceParams['invoice_platform']);
//查询发票号码对应的数据
$invoiceInfo = $this->invoiceRecordRepository->getInvoiceRecordByRealNumber($invoiceParams['invoice_real_number']);
if(!$invoiceInfo){
......@@ -286,12 +292,12 @@ class InvoiceService
}
public function queryInvoiceInfo()
public function queryInvoiceInfo($invoiceParams)
{
$platformInfo = $this->apiService->getPlatformInfo()['platform_params']['rhawn'];
//设置发票平台
$this->apiService->setInvoicePlatform($invoiceParams['invoice_platform']);
$cancelInvoiceParams = [];
$cancelInvoiceParams['qyId'] = $platformInfo['qyid'];
$cancelInvoiceParams['ddlsh'] = '00000000000002018020001720230222';
//记录请求参数
......@@ -304,6 +310,7 @@ class InvoiceService
public function getQiyeInvoiceInfo()
{
//设置发票平台
$info = $this->apiService->queryQiyeUniqueSign('rhawn');
var_dump($info);
}
......
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