查询快捷冲红结果接口

beta
kk 2 years ago
parent ad1595560f
commit 7b5857c108
  1. 38
      jianshui-admin/src/main/java/com/jianshui/api/controller/http/invoice/v1/InvoiceController.java
  2. 4
      jianshui-invoice/src/main/java/com/jianshui/invoice/constant/elephant/ElephantConstantsV6.java
  3. 3
      jianshui-invoice/src/main/java/com/jianshui/invoice/service/IInvoiceApiService.java
  4. 5
      jianshui-invoice/src/main/java/com/jianshui/invoice/service/impl/api/AisinoConsoleInvoiceApiServiceImpl.java
  5. 5
      jianshui-invoice/src/main/java/com/jianshui/invoice/service/impl/api/AisinoConsoleInvoiceApiZhongQiServiceImpl.java
  6. 5
      jianshui-invoice/src/main/java/com/jianshui/invoice/service/impl/api/ElephantInvoiceApiServiceImpl.java
  7. 18
      jianshui-invoice/src/main/java/com/jianshui/invoice/service/impl/api/ElephantInvoiceApiV6ServiceImpl.java
  8. 5
      jianshui-invoice/src/main/java/com/jianshui/invoice/service/impl/api/JcskInvoiceApiServiceImpl.java

@ -1993,4 +1993,42 @@ public class InvoiceController {
}
/**
* 2.29.查询快捷冲红结果接口数电专用接口
*/
@ApiImplicitParams({
@ApiImplicitParam(name = "identity", value = "身份认证", dataType = "java.lang.Void", example = "1130", required = true),
@ApiImplicitParam(name = "order", value = "请求体", dataType = "java.lang.Void", required = true)})
@PostMapping({"/api/invoice/v1/QueryFastRedInvoiceResult/{identity}", "/api/invoice/v1/QueryFastRedInvoiceResult","/invoice/QueryFastRedInvoiceResult"})
public Object QueryFastRedInvoiceResult(HttpServletRequest request, String identity) throws Exception {
if (StringUtils.isEmpty(identity)) {
return AjaxResult.error(ErrorCode.EMPTY_IDENTITY);
}
Companyservice companyservice = iCompanyserviceService.selectCompanyserviceByIdentity(identity);
if (companyservice == null) {
return AjaxResult.error(ErrorCode.COMPANY_NOT_FOUND);
}
// 获得入口报文适配器
String requestAdapterKey = serviceManageService.getRequestAdapterKey("invoice", companyservice.getCompanyid());
IInvoiceRequestService invoiceRequestService = invoiceRequestFactory.getService(requestAdapterKey);
JSONObject decryptResult = invoiceRequestService.decrypt(request, companyservice, "");
// 获得请求实例,并且进行扣费
String serviceKey = serviceManageService.getCompanyServiceSupplier("invoice", companyservice.getCompanyid());
serviceManageService.companyConsume("invoice", companyservice.getCompanyid());
IInvoiceApiService invoiceService = invoiceServiceFactory.getService(serviceKey);
HXResponse result = invoiceService.QueryFastRedInvoiceResult(decryptResult, companyservice);
String responseAdapterKey = serviceManageService.getResponseAdapterKey("invoice", companyservice.getCompanyid());
IInvoiceResponseService invoiceResponseService = invoiceResponseFactory.getService(responseAdapterKey);
return invoiceResponseService.response(result, companyservice, "");
}
}

@ -74,6 +74,10 @@ public class ElephantConstantsV6 {
public static String ORDER_TO_FAST_RED_INVOICE_LOCALHOST = "/invoice/api/v6/OrderToFastRedInvoice";
public static String ORDER_TO_FAST_RED_INVOICE_METHOD = "OrderToFastRedInvoice";
// 查询快捷冲红结果接口(数电专用接口)
public static String QUERY_FAST_RED_INVOICE_RESULT_LOCALHOST = "/invoice/api/v6/QueryFastRedInvoiceResult";
public static String QUERY_FAST_RED_INVOICE_RESULT_METHOD = "QueryFastRedInvoiceResult";
// 数电-红字确认单明细查询
public static String QUERY_RED_CONFIRMATION_ITEM_LIST_LOCALHOST = "/invoice/api/v6/QueryRedConfirmationItemList";
public static String QUERY_RED_CONFIRMATION_ITEM_LIST_METHOD = "QueryRedConfirmationItemList";

@ -357,4 +357,7 @@ public interface IInvoiceApiService {
/** 订单快捷冲红接口(数电专用接口) */
HXResponse fastRedInvoice(JSONObject decryptResult, Companyservice companyservice);
/** 查询快捷冲红结果接口(数电专用接口) */
HXResponse QueryFastRedInvoiceResult(JSONObject decryptResult, Companyservice companyservice);
}

@ -1056,6 +1056,11 @@ public class AisinoConsoleInvoiceApiServiceImpl implements IInvoiceApiService {
return null;
}
@Override
public HXResponse QueryFastRedInvoiceResult(JSONObject decryptResult, Companyservice companyservice) {
return null;
}
@Override
public AjaxResult syncStockInfo(Companyservice companyservice) {

@ -542,6 +542,11 @@ public class AisinoConsoleInvoiceApiZhongQiServiceImpl implements IInvoiceApiSer
return null;
}
@Override
public HXResponse QueryFastRedInvoiceResult(JSONObject decryptResult, Companyservice companyservice) {
return null;
}
/**
* 发票打印

@ -879,6 +879,11 @@ public class ElephantInvoiceApiServiceImpl implements IInvoiceApiService {
return null;
}
@Override
public HXResponse QueryFastRedInvoiceResult(JSONObject decryptResult, Companyservice companyservice) {
return null;
}
/**
* 申请/上传 红字发票

@ -1027,6 +1027,24 @@ public class ElephantInvoiceApiV6ServiceImpl implements IInvoiceApiService {
return parseResult(dxhyInterfaceResponse);
}
/* 查询快捷冲红结果接口(数电专用接口)*/
@Override
public HXResponse QueryFastRedInvoiceResult(JSONObject decryptResult, Companyservice companyservice) {
decryptResult = JsonKeyCase.JsonKeyCase(decryptResult);
log.info("调用大象V6接口报文key转大写后的报文为{}",decryptResult);
DxhyInterfaceResponse dxhyInterfaceResponse = null;
try {
dxhyInterfaceResponse = ElephantUtils.sendRequestWithoutTokenV6(ElephantConstantsV6.QUERY_FAST_RED_INVOICE_RESULT_LOCALHOST,
ElephantConstantsV6.QUERY_FAST_RED_INVOICE_RESULT_METHOD, JSONUtil.parse(decryptResult), companyservice);
} catch (UnsupportedEncodingException | InvalidKeyException | NoSuchAlgorithmException e) {
log.error("【销项发票】【大象接口】【数电】【查询快捷冲红结果接口】发票请求异常,请求报文{},销方信息{}", decryptResult, JSONObject.toJSONString(companyservice));
e.printStackTrace();
return new HXResponse("009999", "系统异常!");
}
return parseResult(dxhyInterfaceResponse);
}
/**
* 红字确认单列表查询数电专用
*/

@ -1664,6 +1664,11 @@ public class JcskInvoiceApiServiceImpl implements IInvoiceApiService {
return null;
}
@Override
public HXResponse QueryFastRedInvoiceResult(JSONObject decryptResult, Companyservice companyservice) {
return null;
}
/**
* 简税和金财数科 发票类型互换
*

Loading…
Cancel
Save