|
|
|
@ -405,28 +405,18 @@ public class InvoiceAllController { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 获得入口报文适配器
|
|
|
|
|
String requestAdapterKey = serviceManageService.getRequestAdapterKey(SERVICE_KEY, companyservice.getCompanyid()); |
|
|
|
|
IInvoiceAllRequestService incomeRequestService = invoiceAllRequestFactory.getService(requestAdapterKey); |
|
|
|
|
IInvoiceAllRequestService incomeRequestService = new AisinoIncomeRequestAdapterImpl(); |
|
|
|
|
JSONObject requestBody = incomeRequestService.decrypt(request, companyservice); |
|
|
|
|
|
|
|
|
|
// 获得请求实例,并且进行扣费
|
|
|
|
|
String serviceKey = serviceManageService.getCompanyServiceSupplier(SERVICE_KEY, companyservice.getCompanyid()); |
|
|
|
|
IInvoiceAll invoiceAllService = iInvoceiAllServiceFactory.getService(serviceKey); |
|
|
|
|
|
|
|
|
|
// 指定请求实例
|
|
|
|
|
IInvoiceAll invoiceAllService = iInvoceiAllServiceFactory.getService("elephant_invoiceall"); |
|
|
|
|
|
|
|
|
|
AjaxResult result = invoiceAllService.loginVerificated(companyservice, requestBody); |
|
|
|
|
|
|
|
|
|
//返回处理 增加调用次数
|
|
|
|
|
if (result.isSuccess()) { |
|
|
|
|
serviceManageService.companyConsume(SERVICE_KEY, companyservice.getCompanyid()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//返回报文处理器
|
|
|
|
|
String responseAdapterKey = serviceManageService.getResponseAdapterKey(SERVICE_KEY, companyservice.getCompanyid()); |
|
|
|
|
IInvoiceAllResponseService incomeResponseService = invoiceAllResponseFactory.getService(responseAdapterKey); |
|
|
|
|
IInvoiceAllResponseService incomeResponseService = new AisinoIncomeResponseAdapterImpl(); |
|
|
|
|
|
|
|
|
|
return incomeResponseService.response(result, companyservice, ""); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
@ApiOperation("发票查询") |
|
|
|
|
@ApiImplicitParams({ |
|
|
|
@ -832,32 +822,34 @@ public class InvoiceAllController { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("授权活跃状态查询") |
|
|
|
|
@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_all/v1/obtainLoginStatus/{identity}", "/api/invoice_all/v1/obtainLoginStatus","/invoice_all/obtainLoginStatus"}) |
|
|
|
|
public Object obtainLoginStatus(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); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 获得入口报文适配器
|
|
|
|
|
IInvoiceAllRequestService incomeRequestService = new AisinoIncomeRequestAdapterImpl(); |
|
|
|
|
JSONObject requestBody = incomeRequestService.decrypt(request, companyservice); |
|
|
|
|
|
|
|
|
|
// 指定请求实例
|
|
|
|
|
IInvoiceAll invoiceAllService = iInvoceiAllServiceFactory.getService("elephant_invoiceall"); |
|
|
|
|
|
|
|
|
|
AjaxResult result = invoiceAllService.obtainLoginStatus(companyservice, requestBody); |
|
|
|
|
|
|
|
|
|
//返回报文处理器
|
|
|
|
|
IInvoiceAllResponseService incomeResponseService = new AisinoIncomeResponseAdapterImpl(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return incomeResponseService.response(result, companyservice, ""); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|