|
@@ -6,6 +6,8 @@ import com.dgtly.ApiApplication;
|
|
import com.dgtly.system.domain.CustomersExt;
|
|
import com.dgtly.system.domain.CustomersExt;
|
|
import com.dgtly.system.domain.SysUser;
|
|
import com.dgtly.system.domain.SysUser;
|
|
import com.dgtly.wxportal.service.ESignService;
|
|
import com.dgtly.wxportal.service.ESignService;
|
|
|
|
+import com.dgtly.wxportal.service.IEsignOrganRealVerifyService;
|
|
|
|
+import com.dgtly.wxportal.service.IEsignPersonRealnVerifyService;
|
|
import com.dgtly.wxportal.service.IEsignSignService;
|
|
import com.dgtly.wxportal.service.IEsignSignService;
|
|
import com.dgtly.wxportal.utils.ESign.ESignHttpUtil;
|
|
import com.dgtly.wxportal.utils.ESign.ESignHttpUtil;
|
|
import com.dgtly.wxportal.utils.ESign.ESignUploadUtil;
|
|
import com.dgtly.wxportal.utils.ESign.ESignUploadUtil;
|
|
@@ -16,6 +18,9 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.boot.test.context.SpringBootTest;
|
|
import org.springframework.boot.test.context.SpringBootTest;
|
|
import org.springframework.test.context.junit4.SpringRunner;
|
|
import org.springframework.test.context.junit4.SpringRunner;
|
|
|
|
|
|
|
|
+import java.io.*;
|
|
|
|
+import java.net.HttpURLConnection;
|
|
|
|
+import java.net.URL;
|
|
import java.util.HashSet;
|
|
import java.util.HashSet;
|
|
import java.util.Set;
|
|
import java.util.Set;
|
|
|
|
|
|
@@ -23,7 +28,10 @@ import java.util.Set;
|
|
@SpringBootTest(classes=ApiApplication.class)
|
|
@SpringBootTest(classes=ApiApplication.class)
|
|
public class MyTest {
|
|
public class MyTest {
|
|
|
|
|
|
-
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private IEsignPersonRealnVerifyService personRealnVerifyService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private IEsignOrganRealVerifyService organRealVerifyService;
|
|
@Autowired
|
|
@Autowired
|
|
private ESignHttpUtil eSignHttpUtil;
|
|
private ESignHttpUtil eSignHttpUtil;
|
|
@Autowired
|
|
@Autowired
|
|
@@ -31,7 +39,7 @@ public class MyTest {
|
|
@Autowired
|
|
@Autowired
|
|
private IEsignSignService signService;
|
|
private IEsignSignService signService;
|
|
@Test
|
|
@Test
|
|
- public void test(){
|
|
|
|
|
|
+ public void test() throws Exception {
|
|
|
|
|
|
|
|
|
|
//创建文件
|
|
//创建文件
|
|
@@ -41,12 +49,12 @@ public class MyTest {
|
|
int result = eSignService.createPersonalAccount(user);*/
|
|
int result = eSignService.createPersonalAccount(user);*/
|
|
|
|
|
|
|
|
|
|
- CustomersExt customersExt = new CustomersExt();
|
|
|
|
- customersExt.setChainsCode("qiaoxiaomingqiye");
|
|
|
|
- customersExt.setCreator("7303abf8d1e54308a889ee61db2639da");
|
|
|
|
- customersExt.setCustomersName("乔小明企业");
|
|
|
|
-
|
|
|
|
- CustomersExt result = eSignService.createThirdParty(customersExt);
|
|
|
|
|
|
+// CustomersExt customersExt = new CustomersExt();
|
|
|
|
+// customersExt.setChainsCode("qiaoxiaomingqiye");
|
|
|
|
+// customersExt.setCreator("7303abf8d1e54308a889ee61db2639da");
|
|
|
|
+// customersExt.setCustomersName("乔小明企业");
|
|
|
|
+//
|
|
|
|
+// CustomersExt result = eSignService.createThirdParty(customersExt);
|
|
|
|
|
|
|
|
|
|
//创建文件
|
|
//创建文件
|
|
@@ -54,7 +62,7 @@ public class MyTest {
|
|
/*个人认证*/
|
|
/*个人认证*/
|
|
// String s = personRealnVerifyService.personRealnVerify("7303abf8d1e54308a889ee61db2639da");
|
|
// String s = personRealnVerifyService.personRealnVerify("7303abf8d1e54308a889ee61db2639da");
|
|
/*企业认证*/
|
|
/*企业认证*/
|
|
-// String s = organRealVerifyService.organRealVerify("85cfb45c3bcb4ba5962ab56cc316c2af","2d977a3e8f14400d8ecede8d7c584813");
|
|
|
|
|
|
+ String s = organRealVerifyService.organRealVerify("60b47892094143be9288bcfa6d5ab697","7303abf8d1e54308a889ee61db2639da");
|
|
|
|
|
|
/** 一步发起签署
|
|
/** 一步发起签署
|
|
*
|
|
*
|
|
@@ -78,12 +86,40 @@ public class MyTest {
|
|
// /*流程归档*/
|
|
// /*流程归档*/
|
|
// String s = signService.processArchiv("0cee5f3db6f8411b9cdefb1c7175cfaf");
|
|
// String s = signService.processArchiv("0cee5f3db6f8411b9cdefb1c7175cfaf");
|
|
/*签署文件下载*/
|
|
/*签署文件下载*/
|
|
- String s = signService.processDocumentDownload("c35e714481bb4a0288a81cf94bc3508e");
|
|
|
|
|
|
+// String s = signService.processDocumentDownload("c35e714481bb4a0288a81cf94bc3508e");
|
|
|
|
+
|
|
|
|
+// getURLResource("E:\\测试.pdf","https://esignoss.esign.cn/1111563786/19a14aab-b5d7-405c-a58d-55c337310803/%E5%90%88%E5%90%8C.pdf?Expires=1603179315&OSSAccessKeyId=LTAIdvHfiVrzDKbE&Signature=dl3hGcJ3HQ5%2FDTTN5%2F0UPajobyw%3D");
|
|
|
|
|
|
System.out.println(s);
|
|
System.out.println(s);
|
|
System.out.println("111111");
|
|
System.out.println("111111");
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public static void getURLResource(String ourputFile,String urlStr) throws Exception {
|
|
|
|
+
|
|
|
|
+ FileWriter fw = new FileWriter(ourputFile);
|
|
|
|
+
|
|
|
|
+ PrintWriter pw = new PrintWriter(fw);
|
|
|
|
+
|
|
|
|
+ URL resourceUrl = new URL(urlStr);
|
|
|
|
+
|
|
|
|
+ InputStream content = (InputStream) resourceUrl.getContent();
|
|
|
|
+
|
|
|
|
+ BufferedReader in = new BufferedReader(new InputStreamReader(content));
|
|
|
|
+
|
|
|
|
+ String line;
|
|
|
|
+
|
|
|
|
+ while ((line = in.readLine()) != null) {
|
|
|
|
+
|
|
|
|
+ pw.println(line);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ pw.close();
|
|
|
|
+
|
|
|
|
+ fw.close();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
}
|
|
}
|