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

View File

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

View File

@@ -11,6 +11,7 @@ public class EsignCallbackParams implements Serializable {
private String action;
private String resultDescription; //签署结果描述
private Integer signResult; //签署结果
private Integer signFlowStatus; //签署流程状态
public String getSignFlowId() {
return signFlowId;
@@ -43,4 +44,12 @@ public class EsignCallbackParams implements Serializable {
public void setSignResult(Integer 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 String assignedSealId; //指定签章id
private Boolean freeMode = false;
private Boolean adaptableSignFieldSize;//是否自适应签章大小
public Boolean getAutoSign() {
return autoSign;
@@ -46,4 +47,12 @@ public class NormalSignFieldConfig {
public void setFreeMode(Boolean 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;
resp.setFileUploadUrl((String) map.get("fileUploadUrl"));
resp.setFileId((String) map.get("fileId"));
return resp;
}else {
throw new RuntimeException("获取合同上传地址失败: " + esignBaseResp.getMessage());
}
return resp;
}
@@ -112,7 +114,7 @@ public class EsignByUploadFileService {
List<String> paths = fileUtil.fieldFileDownload(Long.parseLong(refId), tempDir + File.separator + "oafile" + File.separator);
file = new File(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));
return uploadResp.getFileId();
}finally {

View File

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