|
|
|
@ -2845,6 +2845,7 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
|
HXResponse hxResponse = queryInvoice(queryBillInfoDTO, companyservice); |
|
|
|
|
|
|
|
|
|
if (StringUtils.equals("0000", hxResponse.getCode())) { |
|
|
|
|
addHzxxToRespon(hxResponse, allApiLog); |
|
|
|
|
return hxResponse; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -2855,7 +2856,7 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
|
Invoice invoice = invoiceMapper.selectOne(queryWrapper); |
|
|
|
|
|
|
|
|
|
response.put("data", invoice); |
|
|
|
|
|
|
|
|
|
addHzxxToRespon(response, allApiLog); |
|
|
|
|
return response; |
|
|
|
|
|
|
|
|
|
} else if (WebServiceConstant.ADD_RED_INVOICE_QRD.equals(finalServiceId)) { |
|
|
|
@ -2877,6 +2878,7 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
|
|
|
|
|
|
HXResponse hxResponse = parseResult(dxhyInterfaceResponse); |
|
|
|
|
hxResponse = parseDxhyRes(hxResponse, companyservice); |
|
|
|
|
addHzxxToRespon(hxResponse, allApiLog); |
|
|
|
|
return hxResponse; |
|
|
|
|
|
|
|
|
|
} else if (WebServiceConstant.CXHZFPXXQRD.equals(finalServiceId)) { |
|
|
|
@ -2936,6 +2938,23 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void addHzxxToRespon(HXResponse hxResponse, InvoiceAllApiLog allApiLog) { |
|
|
|
|
try { |
|
|
|
|
if (StringUtils.isNotBlank(allApiLog.getResultMsg()) && ObjectUtils.isNotEmpty(hxResponse.getData())) { |
|
|
|
|
log.info("表中记录结果信息为:{}",allApiLog.getResultMsg()); |
|
|
|
|
JSONObject data = JSON.parseObject(JSON.toJSONString(hxResponse.getData())); |
|
|
|
|
JSONObject result = JSON.parseObject(allApiLog.getResultMsg()); |
|
|
|
|
for (String key : result.keySet()) { |
|
|
|
|
data.put(key, result.get(key)); |
|
|
|
|
} |
|
|
|
|
log.info("添加后数据后data:{}",data); |
|
|
|
|
hxResponse.put("data",data); |
|
|
|
|
} |
|
|
|
|
}catch (Exception e){ |
|
|
|
|
log.error("【销项发票】查询红字单和发票添加红字信息异常",e); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 转换大象返回报文为简税报文 |
|
|
|
|
*/ |
|
|
|
|