From 3a1f3c704f7689f95c0f748ecad3dc24936923be Mon Sep 17 00:00:00 2001 From: wanghongjun <1445693971@qq.com> Date: Sat, 26 Apr 2025 14:51:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=8A=A0=E5=B7=A5=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E5=90=8E=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/service/invoice/InvoiceIssuanceService.php | 4 ++-- app/service/webService/ChinaTaxes.php | 13 ++++++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/app/service/invoice/InvoiceIssuanceService.php b/app/service/invoice/InvoiceIssuanceService.php index e700c98..9b125ad 100644 --- a/app/service/invoice/InvoiceIssuanceService.php +++ b/app/service/invoice/InvoiceIssuanceService.php @@ -369,14 +369,14 @@ class InvoiceIssuanceService // 查询上传异常数据接口 $queryUploadErrorData = $ChinaTaxes->queryUploadErrorData($sbpch); - if (!isset($queryUploadErrorData['mxGrid']['sbMxsjVOList']['ycms'])) { + if (!isset($queryUploadErrorData['data']['mxGrid']['sbMxsjVOList']['ycms'])) { throw new FuncException('异常信息返回有误'); } // 查询待开具电子缴款 $queryIssuedPaymentVoucher = $ChinaTaxes->queryIssuedPaymentVoucher($bdznsrsbh); // 保存用户异常状态 - $ycms = $queryUploadErrorData['mxGrid']['sbMxsjVOList']['ycms']; // 数据异常描述 + $ycms = $queryUploadErrorData['data']['mxGrid']['sbMxsjVOList']['ycms']; // 数据异常描述 (new InvoiceIssuanceData())->saveField($invoiceIssuance['id'], 'ycms', $ycms); // 开票失败 diff --git a/app/service/webService/ChinaTaxes.php b/app/service/webService/ChinaTaxes.php index b8a5257..7ddddd7 100644 --- a/app/service/webService/ChinaTaxes.php +++ b/app/service/webService/ChinaTaxes.php @@ -319,7 +319,9 @@ class ChinaTaxes $param = $this->getParamData('SSGZ_GZPT_SZQKL_DW_DZSCMXYC_QUERY', $body); - return $this->resultXml($param); + $this->xmlKey = '03'; + + return $this->resultXml($param, 3); } /** @@ -770,8 +772,13 @@ xmlns:ns2="http://www.chinatax.gov.cn/dataspec/">'; $data = $this->xmlDom($result['result']); if (isset($data['code']) && $data['code'] != 200) { - if ($type == 1 && $data['code'] == 302) return $data; - throw new FuncException($data['message']); + if ($data['code'] == 302) { + if ($type == 1) { + return $data; + } + } else { + throw new FuncException($data['message']); + } } else if ($type == 1) { if (isset($data[$key])) { $data['zipBaseData'] = $this->deCompressXml($data[$key]);