bug修复
This commit is contained in:
@@ -288,12 +288,12 @@ public class SignAward {
|
||||
}
|
||||
|
||||
/**
|
||||
* 发起签署
|
||||
* 发起带有用印签署
|
||||
*
|
||||
* @return
|
||||
* @throws EsignDemoException
|
||||
*/
|
||||
public static EsignHttpResponse createByFileMediation(SealSignRecord sealSignRecord ,List<String> sealIdList) throws EsignDemoException {
|
||||
public static EsignHttpResponse createByFileSeal(SealSignRecord sealSignRecord ,List<String> sealIdList) throws EsignDemoException {
|
||||
String apiaddr = "/v3/sign-flow/create-by-file";
|
||||
|
||||
String fileId = sealSignRecord.getFileid();
|
||||
@@ -488,6 +488,162 @@ public class SignAward {
|
||||
//发起接口请求
|
||||
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, false);
|
||||
}
|
||||
/**
|
||||
* 发起不带用印签署
|
||||
*
|
||||
* @return
|
||||
* @throws EsignDemoException
|
||||
*/
|
||||
public static EsignHttpResponse createByFileMediation(SealSignRecord sealSignRecord) throws EsignDemoException {
|
||||
String apiaddr = "/v3/sign-flow/create-by-file";
|
||||
|
||||
String fileId = sealSignRecord.getFileid();
|
||||
String fileName = sealSignRecord.getFilename();
|
||||
|
||||
String psnAccount = sealSignRecord.getPensonAccount();
|
||||
String psnName = sealSignRecord.getPensonName();
|
||||
|
||||
String psnAccountRes = sealSignRecord.getPensonAccountRes();
|
||||
String psnNameRes = sealSignRecord.getPensonNameRes();
|
||||
|
||||
String psnAccountMedi = sealSignRecord.getPensonAccountMedi();
|
||||
String psnNameMedi = sealSignRecord.getPensonNameMedi();
|
||||
|
||||
|
||||
String positionPagepsn = sealSignRecord.getPositionPagepsn();
|
||||
double positionXpsn = sealSignRecord.getPositionXpsn();
|
||||
double positionYpsn = sealSignRecord.getPositionYpsn();
|
||||
|
||||
String positionPagepsnRes = sealSignRecord.getPositionPagepsnRes();
|
||||
double positionXpsnRes = sealSignRecord.getPositionXpsnRes();
|
||||
double positionYpsnRes = sealSignRecord.getPositionYpsnRes();
|
||||
|
||||
String positionPagepsnMedi = sealSignRecord.getPositionPagepsnMedi();
|
||||
double positionXpsnMedi = sealSignRecord.getPositionXpsnMedi();
|
||||
double positionYpsnMedi = sealSignRecord.getPositionYpsnMedi();
|
||||
|
||||
|
||||
String jsonParm = "{\n" +
|
||||
" \"docs\": [\n" +
|
||||
" {\n" +
|
||||
" \"fileId\": \"" + fileId + "\",\n" +
|
||||
" \"fileName\": \"" + fileName + "\"\n" +
|
||||
" }\n" +
|
||||
" ],\n" +
|
||||
" \"signFlowConfig\": {\n" +
|
||||
" \"signFlowTitle\": \"测试合同\",\n" +
|
||||
" \"autoStart\": true,\n" +
|
||||
" \"authConfig\": {\n" +
|
||||
" \"willingnessAuthModes\": [\n" +
|
||||
" \"CODE_SMS\"\n" +
|
||||
" ],\n" +
|
||||
" \"psnAvailableAuthModes\": [\n" +
|
||||
" \"PSN_MOBILE3\"\n" +
|
||||
" ],\n" +
|
||||
" \"orgAvailableAuthModes\": [\n" +
|
||||
" \"ORG_LEGALREP\"\n" +
|
||||
" ]\n" +
|
||||
" },\n" +
|
||||
|
||||
" \"signConfig\": {\n" +
|
||||
" \"availableSignClientTypes\": \"1\"\n" +
|
||||
" },\n" +
|
||||
// " \"notifyUrl\": \"" + signSealCallbackUrl + "\",\n" +
|
||||
" \"autoFinish\": true\n" +
|
||||
" },\n" +
|
||||
|
||||
" \"signers\": [\n" +
|
||||
" {\n" +
|
||||
" \"psnSignerInfo\": {\n" +
|
||||
" \"psnAccount\": \"" + psnAccount + "\",\n" +
|
||||
" \"psnInfo\": {\n" +
|
||||
" \"psnName\": \"" + psnName + "\"\n" +
|
||||
" }\n" +
|
||||
" },\n" +
|
||||
" \"signFields\": [\n" +
|
||||
" {\n" +
|
||||
" \"fileId\": \"" + fileId + "\",\n" +
|
||||
" \"normalSignFieldConfig\": {\n" +
|
||||
" \"autoSign\": false,\n" +
|
||||
" \"freeMode\": false,\n" +
|
||||
" \"movableSignField\": false,\n" +
|
||||
" \"signFieldPosition\": {\n" +
|
||||
" \"positionPage\": \"" + positionPagepsn + "\",\n" +
|
||||
" \"positionX\": " + positionXpsn + ",\n" +
|
||||
" \"positionY\": " + positionYpsn + "\n" +
|
||||
" },\n" +
|
||||
" \"signFieldStyle\": 1\n" +
|
||||
" },\n" +
|
||||
" \"signFieldType\": 0\n" +
|
||||
" }\n" +
|
||||
" ],\n" +
|
||||
" \"signerType\": 0\n" +
|
||||
" },\n" +
|
||||
|
||||
" {\n" +
|
||||
" \"psnSignerInfo\": {\n" +
|
||||
" \"psnAccount\": \"" + psnAccountRes + "\",\n" +
|
||||
" \"psnInfo\": {\n" +
|
||||
" \"psnName\": \"" + psnNameRes + "\"\n" +
|
||||
" }\n" +
|
||||
" },\n" +
|
||||
" \"signFields\": [\n" +
|
||||
" {\n" +
|
||||
" \"fileId\": \"" + fileId + "\",\n" +
|
||||
" \"normalSignFieldConfig\": {\n" +
|
||||
" \"autoSign\": false,\n" +
|
||||
" \"freeMode\": false,\n" +
|
||||
" \"movableSignField\": false,\n" +
|
||||
" \"signFieldPosition\": {\n" +
|
||||
" \"positionPage\": \"" + positionPagepsnRes + "\",\n" +
|
||||
" \"positionX\": " + positionXpsnRes + ",\n" +
|
||||
" \"positionY\": " + positionYpsnRes + "\n" +
|
||||
" },\n" +
|
||||
" \"signFieldStyle\": 1\n" +
|
||||
" },\n" +
|
||||
" \"signFieldType\": 0\n" +
|
||||
" }\n" +
|
||||
" ],\n" +
|
||||
" \"signerType\": 0\n" +
|
||||
" },\n" +
|
||||
|
||||
|
||||
" {\n" +
|
||||
" \"psnSignerInfo\": {\n" +
|
||||
" \"psnAccount\": \"" + psnAccountMedi + "\",\n" +
|
||||
" \"psnInfo\": {\n" +
|
||||
" \"psnName\": \"" + psnNameMedi + "\"\n" +
|
||||
" }\n" +
|
||||
" },\n" +
|
||||
" \"signFields\": [\n" +
|
||||
" {\n" +
|
||||
" \"fileId\": \"" + fileId + "\",\n" +
|
||||
" \"normalSignFieldConfig\": {\n" +
|
||||
" \"autoSign\": false,\n" +
|
||||
" \"freeMode\": false,\n" +
|
||||
" \"movableSignField\": false,\n" +
|
||||
" \"signFieldPosition\": {\n" +
|
||||
" \"positionPage\": \"" + positionPagepsnMedi + "\",\n" +
|
||||
" \"positionX\": " + positionXpsnMedi + ",\n" +
|
||||
" \"positionY\": " + positionYpsnMedi + "\n" +
|
||||
" },\n" +
|
||||
" \"signFieldStyle\": 1\n" +
|
||||
" },\n" +
|
||||
" \"signFieldType\": 0\n" +
|
||||
" }\n" +
|
||||
" ],\n" +
|
||||
" \"signerType\": 0\n" +
|
||||
" }\n" +
|
||||
" ]\n" +
|
||||
"}";
|
||||
|
||||
//请求方法
|
||||
EsignRequestType requestType = EsignRequestType.POST;
|
||||
//生成请求签名鉴权方式的Header
|
||||
Map<String, String> header = EsignHttpHelper.signAndBuildSignAndJsonHeader(eSignAppId, eSignAppSecret, jsonParm, requestType.name(), apiaddr, false);
|
||||
//发起接口请求
|
||||
return EsignHttpHelper.doCommHttp(eSignHost, apiaddr, requestType, jsonParm, header, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* 发起签署
|
||||
@@ -850,8 +1006,8 @@ public class SignAward {
|
||||
String apiaddr = "/v3/files/" + fileId + "/keyword-positions";
|
||||
String jsonParm = "{\n" +
|
||||
" \"keywords\": [\n" +
|
||||
" \"甲方(签字):\",\n" +
|
||||
" \"乙方(签字):\",\n" +
|
||||
" \"申请人(签字):\",\n" +
|
||||
" \"被申请人(签字):\",\n" +
|
||||
" \"调解员(签字):\",\n" +
|
||||
" \"调解机构(盖章):\"\n" +
|
||||
" ]\n" +
|
||||
|
||||
Reference in New Issue
Block a user