This commit is contained in:
2025-12-10 11:41:59 +08:00
parent 55e163792c
commit 4cc846c4be
6 changed files with 29 additions and 7 deletions

View File

@@ -50,7 +50,8 @@ public class EsignCallBackController extends BaseController {
}); });
String flowId = callbackParams.getSignFlowId(); String flowId = callbackParams.getSignFlowId();
String action = callbackParams.getAction(); String action = callbackParams.getAction();
if(!action.equals("SIGN_MISSON_COMPLETE")) { log.info("签署回调当前流程: " + flowId);
if(!action.equals("SIGN_FLOW_COMPLETE")) {
response.setStatus(HttpServletResponse.SC_OK); response.setStatus(HttpServletResponse.SC_OK);
return; return;
} }
@@ -60,7 +61,7 @@ public class EsignCallBackController extends BaseController {
}else { }else {
callbackMap.put(flowId, "1"); callbackMap.put(flowId, "1");
} }
if(callbackParams.getSignResult() == 2) { if(callbackParams.getSignFlowStatus() == 2) {
Map<String, Object> fileInfo = esignByUploadFileService.getDownloadFileInfo(flowId); Map<String, Object> fileInfo = esignByUploadFileService.getDownloadFileInfo(flowId);
esignCallbackBizService.handleSuccessSignCallbackBiz(tableName,updatefield,statusfield,formId,(String)fileInfo.get("downloadUrl"),(String)fileInfo.get("fileName")); esignCallbackBizService.handleSuccessSignCallbackBiz(tableName,updatefield,statusfield,formId,(String)fileInfo.get("downloadUrl"),(String)fileInfo.get("fileName"));
}else { }else {
@@ -74,7 +75,7 @@ public class EsignCallBackController extends BaseController {
out.write("{\"code\":\"200\",\"msg\":\"success\"}".getBytes(StandardCharsets.UTF_8)); out.write("{\"code\":\"200\",\"msg\":\"success\"}".getBytes(StandardCharsets.UTF_8));
out.flush(); out.flush();
} }
log.info("回调处理完成"); log.info("回调处理完成: " + flowId);
callbackMap.remove(flowId); callbackMap.remove(flowId);
return; return;
} catch (Exception e) { } catch (Exception e) {

View File

@@ -244,6 +244,7 @@ public class EsignOneSignerNode extends ACommonSuperNode {
normalSignFieldConfig.setAssignedSealId(sealId); normalSignFieldConfig.setAssignedSealId(sealId);
normalSignFieldConfig.setFreeMode(true); normalSignFieldConfig.setFreeMode(true);
normalSignFieldConfig.setAutoSign(false); normalSignFieldConfig.setAutoSign(false);
normalSignFieldConfig.setAdaptableSignFieldSize(true);
SignField field = new SignField(); SignField field = new SignField();
field.setSignFieldType(0); field.setSignFieldType(0);
field.setNormalSignFieldConfig(normalSignFieldConfig); field.setNormalSignFieldConfig(normalSignFieldConfig);

View File

@@ -11,6 +11,7 @@ public class EsignCallbackParams implements Serializable {
private String action; private String action;
private String resultDescription; //签署结果描述 private String resultDescription; //签署结果描述
private Integer signResult; //签署结果 private Integer signResult; //签署结果
private Integer signFlowStatus; //签署流程状态
public String getSignFlowId() { public String getSignFlowId() {
return signFlowId; return signFlowId;
@@ -43,4 +44,12 @@ public class EsignCallbackParams implements Serializable {
public void setSignResult(Integer signResult) { public void setSignResult(Integer signResult) {
this.signResult = signResult; this.signResult = signResult;
} }
public Integer getSignFlowStatus() {
return signFlowStatus;
}
public void setSignFlowStatus(Integer signFlowStatus) {
this.signFlowStatus = signFlowStatus;
}
} }

View File

@@ -6,6 +6,7 @@ public class NormalSignFieldConfig {
private SignFieldPosition signFieldPosition; private SignFieldPosition signFieldPosition;
private String assignedSealId; //指定签章id private String assignedSealId; //指定签章id
private Boolean freeMode = false; private Boolean freeMode = false;
private Boolean adaptableSignFieldSize;//是否自适应签章大小
public Boolean getAutoSign() { public Boolean getAutoSign() {
return autoSign; return autoSign;
@@ -46,4 +47,12 @@ public class NormalSignFieldConfig {
public void setFreeMode(Boolean freeMode) { public void setFreeMode(Boolean freeMode) {
this.freeMode = freeMode; this.freeMode = freeMode;
} }
public Boolean getAdaptableSignFieldSize() {
return adaptableSignFieldSize;
}
public void setAdaptableSignFieldSize(Boolean adaptableSignFieldSize) {
this.adaptableSignFieldSize = adaptableSignFieldSize;
}
} }

View File

@@ -78,8 +78,10 @@ public class EsignByUploadFileService {
Map<String,Object> map = (Map<String, Object>) data; Map<String,Object> map = (Map<String, Object>) data;
resp.setFileUploadUrl((String) map.get("fileUploadUrl")); resp.setFileUploadUrl((String) map.get("fileUploadUrl"));
resp.setFileId((String) map.get("fileId")); resp.setFileId((String) map.get("fileId"));
}
return resp; return resp;
}else {
throw new RuntimeException("获取合同上传地址失败: " + esignBaseResp.getMessage());
}
} }
@@ -112,7 +114,7 @@ public class EsignByUploadFileService {
List<String> paths = fileUtil.fieldFileDownload(Long.parseLong(refId), tempDir + File.separator + "oafile" + File.separator); List<String> paths = fileUtil.fieldFileDownload(Long.parseLong(refId), tempDir + File.separator + "oafile" + File.separator);
file = new File(paths.get(0)); file = new File(paths.get(0));
String contentMD5 = EsignByUploadFileService.getFileContentMD5(paths.get(0)); String contentMD5 = EsignByUploadFileService.getFileContentMD5(paths.get(0));
GetUploadUrlResp uploadResp = getUploadFileUrl(file.getName(), contentMD5, file.length(),true); GetUploadUrlResp uploadResp = getUploadFileUrl(file.getName(), contentMD5, file.length(),false);
uploadFile(uploadResp.getFileUploadUrl(), contentMD5, file.getName(), paths.get(0)); uploadFile(uploadResp.getFileUploadUrl(), contentMD5, file.getName(), paths.get(0));
return uploadResp.getFileId(); return uploadResp.getFileId();
}finally { }finally {

View File

@@ -79,8 +79,8 @@ public class ProtUtil {
log.info("调用恢复超级节点接口请求地址为: " + url); log.info("调用恢复超级节点接口请求地址为: " + url);
String respStr = HttpClient.httpPostRaw(url, params, null, null); String respStr = HttpClient.httpPostRaw(url, params, null, null);
log.info("调用恢复超级节点接口响应结果: " + respStr); log.info("调用恢复超级节点接口响应结果: " + respStr);
if(!"1".equals(respStr)) {
Map map = JsonUtils.parseObject(respStr, Map.class); Map map = JsonUtils.parseObject(respStr, Map.class);
if(!"0".equals(map.get("code")) || map.get("code") == null) {
throw new RuntimeException("恢复阻塞的超级节点失败: " + map.get("message")); throw new RuntimeException("恢复阻塞的超级节点失败: " + map.get("message"));
} }
return respStr; return respStr;