测试类
This commit is contained in:
parent
b2d2a06086
commit
1eb12c3527
|
@ -1,6 +1,7 @@
|
|||
package com.hzya.frame;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.plugin.cinvoice.plugin.CInvoiceImportPluginInitializer;
|
||||
import com.hzya.frame.plugin.contract.plugin.ContractAuditPluginInitializer;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
@ -21,6 +22,8 @@ public class Test1 {
|
|||
|
||||
@Resource
|
||||
private ContractAuditPluginInitializer contractPlugin;
|
||||
@Resource
|
||||
private CInvoiceImportPluginInitializer cInvoiceImportPluginInitializer;
|
||||
@Test
|
||||
public void contractAuditPluginTest(){
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
|
@ -31,4 +34,16 @@ public class Test1 {
|
|||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
//发票批量导入
|
||||
@Test
|
||||
public void cinvoicePluginTest(){
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("sourceCode","HT-OA");
|
||||
try {
|
||||
cInvoiceImportPluginInitializer.executeBusiness(jsonObject);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -163,6 +163,17 @@ public class temButtom {
|
|||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void youduTest(){
|
||||
long timestamp = System.currentTimeMillis();
|
||||
System.out.println("时间戳:"+timestamp);
|
||||
Map<String, Object> parametersMap = new HashMap<>();
|
||||
parametersMap.put("accessKey","6X3B526P5HqE6ums");
|
||||
parametersMap.put("timestamp",timestamp);
|
||||
|
||||
String a = YzfSignUtil.signRequest(parametersMap,"34e5fc32ac894a2ba2ade8c3852c7a0a");
|
||||
System.out.println("sign"+a);
|
||||
}
|
||||
private String getdata(String accessToken) {
|
||||
String url = "http://oapi.nanofintax.com/api/invoice_receive/fp/v1/query?accessToken="+accessToken;
|
||||
JSONObject dayabody = new JSONObject();
|
||||
|
|
Loading…
Reference in New Issue