| 123456789101112131415161718192021222324252627282930313233343536373839 |
- package com.muzhi.lemeng.controller;
- import com.alibaba.fastjson.JSONObject;
- import com.muzhi.lemeng.common.R;
- import com.muzhi.lemeng.service.InvoiceService;
- import com.tencentcloudapi.common.exception.TencentCloudSDKException;
- import io.swagger.annotations.Api;
- import io.swagger.annotations.ApiOperation;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.*;
- @Api(description = "钉钉")
- @RestController
- @RequestMapping("/invoiceService")
- @CrossOrigin//解决跨域问题
- public class InvoiceController {
- @Autowired
- private InvoiceService invoiceService;
- /**通用票据识别(高级)提取发票信息*/
- @ApiOperation(value = "通用票据识别(高级)提取发票信息")
- @PostMapping("getInvoiceOcr")
- public R getInvoiceOCR(@RequestBody JSONObject obj) throws TencentCloudSDKException{
- R getInvoiceOcr = invoiceService.getInvoiceOCR(obj);
- return getInvoiceOcr;
- }
- /**增值税发票核验(新版)获取发票验真结果*/
- @ApiOperation(value = "增值税发票核验(新版)获取发票验真结果")
- @PostMapping("doInvoiceVerification")
- public JSONObject doInvoiceVerification(@RequestBody JSONObject obj) throws TencentCloudSDKException {
- JSONObject doInvoiceVerification = invoiceService.doInvoiceVerification(obj);
- return doInvoiceVerification;
- }
- }
|