From f2a49333f6a3793a2897881d7ad8153d847c8754 Mon Sep 17 00:00:00 2001 From: xingze <13153582609@163.com> Date: Mon, 11 Nov 2024 14:47:36 +0800 Subject: [PATCH] =?UTF-8?q?feature:=20=E6=9F=A5=E8=AF=A2=E5=8F=91=E7=A5=A8?= =?UTF-8?q?=E7=94=A8=E9=80=94=E7=8A=B6=E6=80=81=E4=BF=A1=E6=81=AF=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...lephantInvoiceApiV6ByInspurServiceImpl.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/jianshui-invoice/src/main/java/com/jianshui/invoice/service/impl/api/ElephantInvoiceApiV6ByInspurServiceImpl.java b/jianshui-invoice/src/main/java/com/jianshui/invoice/service/impl/api/ElephantInvoiceApiV6ByInspurServiceImpl.java index 361fb4d..61a719b 100644 --- a/jianshui-invoice/src/main/java/com/jianshui/invoice/service/impl/api/ElephantInvoiceApiV6ByInspurServiceImpl.java +++ b/jianshui-invoice/src/main/java/com/jianshui/invoice/service/impl/api/ElephantInvoiceApiV6ByInspurServiceImpl.java @@ -1486,7 +1486,23 @@ public class ElephantInvoiceApiV6ByInspurServiceImpl implements IInvoiceApiServi @Override public HXResponse queryInvoiceUseInfo(JSONObject decryptResult, Companyservice companyservice) { - return null; + decryptResult = JsonKeyCase.JsonKeyCase(decryptResult); + log.info("调用大象V6接口报文key转大写后的报文为{}", decryptResult); + DxhyInterfaceResponse dxhyInterfaceResponse = null; + try { + dxhyInterfaceResponse = ElephantUtils.sendRequestWithoutTokenV6(ElephantConstantsV6.INVOICE_USE_INFO_LOCALHOST, ElephantConstantsV6.INVOICE_USE_INFO_METHOD, JSONUtil.parse(decryptResult), companyservice); + } catch (UnsupportedEncodingException | InvalidKeyException | NoSuchAlgorithmException e) { + log.error("【销项发票】【大象接口】【数电】【红字确认单确认接口】发票请求异常,请求报文{},销方信息{},异常{}", decryptResult, JSONObject.toJSONString(companyservice),e); + return new HXResponse("009999", "系统异常!"); + } + + HXResponse hxResponse = parseResult(dxhyInterfaceResponse); + if (hxResponse.isSuccess() && ObjectUtils.isNotEmpty(hxResponse.getData()) && StringUtils.isNotBlank(hxResponse.getData().toString())){ + + JSONObject jsonObject = JSON.parseObject(hxResponse.getData().toString()); + hxResponse.setData(JsonKeyCase.JsonKeyCase(jsonObject, Constants.INT_1)); + } + return hxResponse; } @Override