|
|
@ -1516,8 +1516,7 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
try { |
|
|
|
try { |
|
|
|
dxhyInterfaceResponse = ElephantUtils.sendRequestWithoutTokenV6(ElephantConstantsV6.INVOICE_USE_INFO_LOCALHOST, ElephantConstantsV6.INVOICE_USE_INFO_METHOD, JSONUtil.parse(decryptResult), companyservice); |
|
|
|
dxhyInterfaceResponse = ElephantUtils.sendRequestWithoutTokenV6(ElephantConstantsV6.INVOICE_USE_INFO_LOCALHOST, ElephantConstantsV6.INVOICE_USE_INFO_METHOD, JSONUtil.parse(decryptResult), companyservice); |
|
|
|
} catch (UnsupportedEncodingException | InvalidKeyException | NoSuchAlgorithmException e) { |
|
|
|
} catch (UnsupportedEncodingException | InvalidKeyException | NoSuchAlgorithmException e) { |
|
|
|
log.error("【销项发票】【大象接口】【数电】【红字确认单确认接口】发票请求异常,请求报文{},销方信息{}", decryptResult, JSONObject.toJSONString(companyservice)); |
|
|
|
log.error("【销项发票】【大象接口】【数电】【红字确认单确认接口】发票请求异常,请求报文{},销方信息{},异常{}", decryptResult, JSONObject.toJSONString(companyservice),e); |
|
|
|
e.printStackTrace(); |
|
|
|
|
|
|
|
return new HXResponse("009999", "系统异常!"); |
|
|
|
return new HXResponse("009999", "系统异常!"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1530,6 +1529,27 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
return hxResponse; |
|
|
|
return hxResponse; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public HXResponse queryTaxpayerGeneralInfo(JSONObject decryptResult, Companyservice companyservice) { |
|
|
|
|
|
|
|
decryptResult = JsonKeyCase.JsonKeyCase(decryptResult); |
|
|
|
|
|
|
|
log.info("调用大象V6接口报文key转大写后的报文为{}", decryptResult); |
|
|
|
|
|
|
|
DxhyInterfaceResponse dxhyInterfaceResponse = null; |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
dxhyInterfaceResponse = ElephantUtils.sendRequestWithoutTokenV6(ElephantConstantsV6.QUERY_TAXPAYER_GENERAL_INFO_LOCALHOST, ElephantConstantsV6.QUERY_TAXPAYER_GENERAL_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); |
|
|
|
|
|
|
|
hxResponse.put("msg", hxResponse.getMessage()); |
|
|
|
|
|
|
|
if (hxResponse.isSuccess() && ObjectUtils.isNotEmpty(hxResponse.getData()) && StringUtils.isNotBlank(hxResponse.getData().toString())){ |
|
|
|
|
|
|
|
JSONObject jsonObject = JSON.parseObject(hxResponse.getData().toString()); |
|
|
|
|
|
|
|
hxResponse.setData(jsonObject); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return hxResponse; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 简税和金财数科 发票类型互换 |
|
|
|
* 简税和金财数科 发票类型互换 |
|
|
|