|
|
|
@ -1177,12 +1177,19 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
|
String dataTemp = dataJson.get("DATA") != null ? dataJson.get("DATA").toString() : ""; |
|
|
|
|
|
|
|
|
|
if ("000000".equals(ztdm)) { |
|
|
|
|
cn.hutool.json.JSONObject json = null; |
|
|
|
|
if (StrUtil.isNotEmpty(dataTemp)) { |
|
|
|
|
return new HXResponse(code, "", JSONUtil.parse(dataTemp), true); |
|
|
|
|
json = JSONUtil.parseObj(dataTemp); |
|
|
|
|
} else { |
|
|
|
|
return new HXResponse(code, "", JSONUtil.parse(data), true); |
|
|
|
|
json = JSONUtil.parseObj(data); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 键值转小写
|
|
|
|
|
JSONObject lowerCaseJson = new JSONObject(); |
|
|
|
|
json.forEach((key, value) -> { |
|
|
|
|
String lowerCaseKey = key.toLowerCase(); |
|
|
|
|
lowerCaseJson.put(lowerCaseKey, value); |
|
|
|
|
}); |
|
|
|
|
return new HXResponse(code, "", lowerCaseJson, true); |
|
|
|
|
} else { |
|
|
|
|
return new HXResponse(ztdm, ztxx, "", true); |
|
|
|
|
} |
|
|
|
@ -1194,6 +1201,8 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
|
return new HXResponse(code, "接口请求失败!", "", false); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 申请/上传 红字发票 |
|
|
|
|
* |
|
|
|
@ -1709,6 +1718,7 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
|
tempQuery.put("FPDM", temp.getFpdm()); // "发票代码",
|
|
|
|
|
tempQuery.put("FPQH", temp.getFpqh()); // "发票起号",
|
|
|
|
|
tempQuery.put("FPZH", temp.getFpzh()); // "发票止号"
|
|
|
|
|
tempQuery.put("FJH", printDTO.getFjh()); // "分机号"
|
|
|
|
|
tmepDetails.add(tempQuery); |
|
|
|
|
} |
|
|
|
|
query.put("DYFPXX", tmepDetails); |
|
|
|
@ -1716,7 +1726,7 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
|
|
|
|
|
|
AjaxResult queryResult = null; |
|
|
|
|
try { |
|
|
|
|
queryResult = ElephantUtils.sendRequestWithoutToken(ElephantConstantsV6.BATCH_PRINT_LOCALHOST, ElephantConstantsV6.BATCH_PRINT, JSONUtil.parse(query), companyservice); |
|
|
|
|
queryResult = ElephantUtils.sendRequestWithoutTokenV6New(ElephantConstantsV6.BATCH_PRINT_LOCALHOST, ElephantConstantsV6.BATCH_PRINT, JSONUtil.parse(query), companyservice); |
|
|
|
|
} catch (UnsupportedEncodingException | NoSuchAlgorithmException | InvalidKeyException e) { |
|
|
|
|
log.error("【销项发票】【大象接口】【批量打印V5】发票请求异常,请求报文{},销方信息{}", JSONUtil.parse(query).toString(), JSONObject.toJSONString(companyservice)); |
|
|
|
|
e.printStackTrace(); |
|
|
|
|