|
|
|
@ -344,6 +344,47 @@ public class InvoiceAllController { |
|
|
|
|
return incomeResponseService.response(result, companyservice, ""); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@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/qrcodeResult/{identity}", "/api/invoice_all/v1/qrcodeResult"}) |
|
|
|
|
public Object qrcodeResult(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(SERVICE_KEY, companyservice.getCompanyid()); |
|
|
|
|
IInvoiceAllRequestService incomeRequestService = invoiceAllRequestFactory.getService(requestAdapterKey); |
|
|
|
|
JSONObject requestBody = incomeRequestService.decrypt(request, companyservice); |
|
|
|
|
|
|
|
|
|
// 获得请求实例,并且进行扣费
|
|
|
|
|
String serviceKey = serviceManageService.getCompanyServiceSupplier(SERVICE_KEY, companyservice.getCompanyid()); |
|
|
|
|
IInvoiceAll invoiceAllService = iInvoceiAllServiceFactory.getService(serviceKey); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AjaxResult result = invoiceAllService.qrcodeResult(companyservice, requestBody); |
|
|
|
|
|
|
|
|
|
//返回处理 增加调用次数
|
|
|
|
|
if (result.isSuccess()) { |
|
|
|
|
serviceManageService.companyConsume(SERVICE_KEY, companyservice.getCompanyid()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//返回报文处理器
|
|
|
|
|
String responseAdapterKey = serviceManageService.getResponseAdapterKey(SERVICE_KEY, companyservice.getCompanyid()); |
|
|
|
|
IInvoiceAllResponseService incomeResponseService = invoiceAllResponseFactory.getService(responseAdapterKey); |
|
|
|
|
|
|
|
|
|
return incomeResponseService.response(result, companyservice, ""); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("发票查询") |
|
|
|
|
@ApiImplicitParams({ |
|
|
|
|
@ApiImplicitParam(name = "identity", value = "身份认证", dataType = "java.lang.Void", example = "1130", required = true), |
|
|
|
|