|
|
@@ -268,7 +268,7 @@ public class BoyangServiceImpl implements BoyangService {
|
|
|
signer.put("signNode", 1);
|
|
|
signer.put("signMode", "0");
|
|
|
signer.put("signOrder", i + 1);
|
|
|
-// signer.put("sealTypeCode", String.join(",",sealTypeCodeList));
|
|
|
+// signer.put("sealTypeCode", String.join(",",sealTypeCodeList));
|
|
|
|
|
|
signerInfos.add(signer);
|
|
|
}
|
|
|
@@ -299,6 +299,9 @@ public class BoyangServiceImpl implements BoyangService {
|
|
|
@Override
|
|
|
public void signed(String processInstanceId,String signFlowId) {
|
|
|
try {
|
|
|
+ Map result = ddClient_workflow.getProcessInstanceId(ddClient.getAccessToken(), processInstanceId);
|
|
|
+ String originatorUserId = UtilMap.getString(result, "originatorUserId");
|
|
|
+
|
|
|
// 获取签署流程进度详情
|
|
|
Map data = (Map) eqbGet(host + "/esign-signs/v1/signFlow/signDetail?signFlowId=" + signFlowId);
|
|
|
List<Map> signFiles = UtilMap.getList(data, "signFiles");
|
|
|
@@ -323,12 +326,10 @@ public class BoyangServiceImpl implements BoyangService {
|
|
|
//todo 签署后文件上传到钉盘
|
|
|
Map dentry = uploadDdFile(spaceId, parentDentryUuid, downloadPath + signedFileName, operatorUnionId);
|
|
|
//todo 审批单添加评论
|
|
|
- comment(processInstanceId,operator,"接口测试 "+ fileName + "已签署",Arrays.asList(dentry));
|
|
|
+ comment(processInstanceId,originatorUserId,"接口测试 "+ fileName + "已签署",Arrays.asList(dentry));
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- String msg = MessageFormat.format("请求签名鉴权方式调用接口出现异常: {0}", e.getMessage());
|
|
|
- System.out.println(msg);
|
|
|
+ throw new RuntimeException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -362,6 +363,20 @@ public class BoyangServiceImpl implements BoyangService {
|
|
|
return McR.success(options);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void start(String processInstanceId, String signPreUrl) {
|
|
|
+ try {
|
|
|
+ Map result = ddClient_workflow.getProcessInstanceId(ddClient.getAccessToken(), processInstanceId);
|
|
|
+ String originatorUserId = UtilMap.getString(result, "originatorUserId");
|
|
|
+
|
|
|
+ //审批单添加评论
|
|
|
+ String signPreUrl2 = signPreUrl.replace(intranet_host, host);
|
|
|
+ comment(processInstanceId,originatorUserId,"签署预览地址:" + signPreUrl2,null);
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new RuntimeException(e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//下载钉钉OA审批单附件
|
|
|
private void downloadDdFile(String processInstanceId,String fileId,String downloadPath){
|
|
|
try {
|