|
|
|
@ -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 |
|
|
|
|