Commit 42ad98dd authored by hangjun83's avatar hangjun83

财务开票模块更新

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