|
|
|
@ -415,7 +415,17 @@ public class InvoiceController { |
|
|
|
|
IInvoiceRequestService invoiceRequestService = invoiceRequestFactory.getService(requestAdapterKey); |
|
|
|
|
JSONObject decryptResult = invoiceRequestService.decrypt(request, companyservice, "deprecate"); |
|
|
|
|
|
|
|
|
|
HXResponse result = preHandleDecryptResult(decryptResult, "deprecate", companyservice); |
|
|
|
|
// HXResponse result = preHandleDecryptResult(decryptResult, "deprecate", companyservice);
|
|
|
|
|
// 调用预处理
|
|
|
|
|
if (decryptResult == null) { |
|
|
|
|
throw new JianshuiParamErrorException(ErrorCode.ERROR_PARAMS, companyservice, "invoice"); |
|
|
|
|
} |
|
|
|
|
// 获得请求实例,并且进行扣费
|
|
|
|
|
String serviceKey = serviceManageService.getCompanyServiceSupplier("invoice", companyservice.getCompanyid()); |
|
|
|
|
serviceManageService.companyConsume("invoice", companyservice.getCompanyid()); |
|
|
|
|
IInvoiceApiService invoiceService = invoiceServiceFactory.getService(serviceKey); |
|
|
|
|
decryptResult.put("service_supplier_key", serviceKey); |
|
|
|
|
HXResponse result = invoiceService.deprecateInvoice(decryptResult, companyservice); |
|
|
|
|
|
|
|
|
|
String responseAdapterKey = serviceManageService.getResponseAdapterKey("invoice", companyservice.getCompanyid()); |
|
|
|
|
IInvoiceResponseService invoiceResponseService = invoiceResponseFactory.getService(responseAdapterKey); |
|
|
|
@ -445,7 +455,17 @@ public class InvoiceController { |
|
|
|
|
IInvoiceRequestService invoiceRequestService = invoiceRequestFactory.getService(requestAdapterKey); |
|
|
|
|
JSONObject decryptResult = invoiceRequestService.decrypt(request, companyservice, "deprecate_query"); |
|
|
|
|
|
|
|
|
|
HXResponse result = preHandleDecryptResult(decryptResult, "deprecate_query", companyservice); |
|
|
|
|
// HXResponse result = preHandleDecryptResult(decryptResult, "deprecate_query", companyservice);
|
|
|
|
|
if (decryptResult == null) { |
|
|
|
|
throw new JianshuiParamErrorException(ErrorCode.ERROR_PARAMS, companyservice, "invoice"); |
|
|
|
|
} |
|
|
|
|
DeprecateQueryInvoiceDTO deprecateQueryInvoiceDTO = decryptResult.toJavaObject(DeprecateQueryInvoiceDTO.class); |
|
|
|
|
// 获得请求实例,并且进行扣费
|
|
|
|
|
String serviceKey = serviceManageService.getCompanyServiceSupplier("invoice", companyservice.getCompanyid()); |
|
|
|
|
serviceManageService.companyConsume("invoice", companyservice.getCompanyid()); |
|
|
|
|
IInvoiceApiService invoiceService = invoiceServiceFactory.getService(serviceKey); |
|
|
|
|
HXResponse result = invoiceService.deprecateQueryInvoice(deprecateQueryInvoiceDTO, companyservice); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String responseAdapterKey = serviceManageService.getResponseAdapterKey("invoice", companyservice.getCompanyid()); |
|
|
|
|
IInvoiceResponseService invoiceResponseService = invoiceResponseFactory.getService(responseAdapterKey); |
|
|
|
@ -562,7 +582,21 @@ public class InvoiceController { |
|
|
|
|
IInvoiceRequestService invoiceRequestService = invoiceRequestFactory.getService(requestAdapterKey); |
|
|
|
|
JSONObject decryptResult = invoiceRequestService.decrypt(request, companyservice, "push"); |
|
|
|
|
|
|
|
|
|
HXResponse result = preHandleDecryptResult(decryptResult, "push", companyservice); |
|
|
|
|
// HXResponse result = preHandleDecryptResult(decryptResult, "push", companyservice);
|
|
|
|
|
|
|
|
|
|
// 接口预处理
|
|
|
|
|
BillInfo billInfo = decryptResult.toJavaObject(BillInfo.class); |
|
|
|
|
if (billInfo == null) { |
|
|
|
|
throw new JianshuiParamErrorException(ErrorCode.ERROR_PARAMS, companyservice, "invoice"); |
|
|
|
|
} |
|
|
|
|
billInfo.setSource("2"); |
|
|
|
|
// 获得请求实例,并且进行扣费
|
|
|
|
|
String serviceKey = serviceManageService.getCompanyServiceSupplier("invoice", companyservice.getCompanyid()); |
|
|
|
|
serviceManageService.companyConsume("invoice", companyservice.getCompanyid()); |
|
|
|
|
billInfo.setServiceSupplierKey(serviceKey); |
|
|
|
|
IInvoiceApiService invoiceService = invoiceServiceFactory.getService(serviceKey); |
|
|
|
|
HXResponse result = invoiceService.pushData(billInfo, companyservice); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String responseAdapterKey = serviceManageService.getResponseAdapterKey("invoice", companyservice.getCompanyid()); |
|
|
|
|
IInvoiceResponseService invoiceResponseService = invoiceResponseFactory.getService(responseAdapterKey); |
|
|
|
|