|
|
|
@ -1531,6 +1531,7 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
public HXResponse queryPrinter(QueryPrinterDTO queryPrinterDTO, Companyservice companyservice) { |
|
|
|
|
|
|
|
|
|
JSONObject query = new JSONObject(); |
|
|
|
|
query.put("NSRSBH", companyservice.getSellertax()); |
|
|
|
|
query.put("DYJMC", queryPrinterDTO.getPrinterName()); |
|
|
|
@ -1599,6 +1600,7 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
public HXResponse batchPrint(PrintDTO printDTO, Companyservice companyservice) { |
|
|
|
|
|
|
|
|
|
JSONObject query = new JSONObject(); |
|
|
|
|
query.put("NSRSBH", companyservice.getSellertax()); // "纳税人识别号",
|
|
|
|
|
query.put("FJH", printDTO.getFjh()); // "分机号",
|
|
|
|
@ -1623,11 +1625,11 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService { |
|
|
|
|
try { |
|
|
|
|
queryResult = ElephantUtils.sendRequestWithoutToken(ElephantConstantsV6.BATCH_PRINT_LOCALHOST, ElephantConstantsV6.BATCH_PRINT, JSONUtil.parse(query), companyservice); |
|
|
|
|
} catch (UnsupportedEncodingException | NoSuchAlgorithmException | InvalidKeyException e) { |
|
|
|
|
log.error("【销项发票】【大象接口】【打印机查询】发票请求异常,请求报文{},销方信息{}", JSONUtil.parse(query).toString(), JSONObject.toJSONString(companyservice)); |
|
|
|
|
log.error("【销项发票】【大象接口】【批量打印V5】发票请求异常,请求报文{},销方信息{}", JSONUtil.parse(query).toString(), JSONObject.toJSONString(companyservice)); |
|
|
|
|
e.printStackTrace(); |
|
|
|
|
throw new JianshuiServiceException("系统异常!"); |
|
|
|
|
} |
|
|
|
|
log.info("【销项发票】【大象发票】打印机查询请求结果{}", queryResult.toString()); |
|
|
|
|
log.info("【销项发票】【大象发票】批量打印V5请求结果{}", queryResult.toString()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 判断外层报文是否成功
|
|
|
|
|