|
@@ -0,0 +1,44 @@
|
|
|
|
+package nc.itf.th;
|
|
|
|
+
|
|
|
|
+import java.io.File;
|
|
|
|
+import java.io.IOException;
|
|
|
|
+import java.io.UnsupportedEncodingException;
|
|
|
|
+import java.util.ArrayList;
|
|
|
|
+
|
|
|
|
+import org.apache.commons.httpclient.HttpException;
|
|
|
|
+
|
|
|
|
+import nc.vo.pub.BusinessException;
|
|
|
|
+import nc.vo.th.ocr.OCRInvoiceVO;
|
|
|
|
+import net.sf.json.JSONString;
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * OCR接口
|
|
|
|
+ * @author Administrator
|
|
|
|
+ *
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+public interface IThOcrService {
|
|
|
|
+ /**
|
|
|
|
+ *
|
|
|
|
+ * 获取token
|
|
|
|
+ */
|
|
|
|
+ public String getToken(String appId,Long cid,String secret,String userid) throws HttpException, IOException , BusinessException;
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 上传发票
|
|
|
|
+ */
|
|
|
|
+ public String uploadInvoice(String url,String token,File file) throws Exception;
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * OCR识别
|
|
|
|
+ */
|
|
|
|
+ public String ocrIdentification(String pathUrl, String token,String data);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * OCR识别数据保存数据库
|
|
|
|
+ */
|
|
|
|
+ public void insertOCRdataInfo(ArrayList<OCRInvoiceVO> vos) throws BusinessException;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+}
|