发布流程增加GPT上传删除功能
This commit is contained in:
parent
3f39349643
commit
9a3bd51e6c
Binary file not shown.
@ -572,12 +572,14 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
String finalFilePath = filepath.replace("bin\\..\\", "");
|
String finalFilePath = filepath.replace("bin\\..\\", "");
|
||||||
|
|
||||||
|
|
||||||
String result=UploadGptFileUtils.uploadGptFile(uploadGptUrl,appkey,requestCode,dcContext.getFilePath());
|
JSONObject result=JSONObject.parseObject(UploadGptFileUtils.uploadGptFile(uploadGptUrl,appkey,requestCode,dcContext.getFilePath()));
|
||||||
if(result!=null){
|
|
||||||
|
if(result.getString("meg").equals("success")){
|
||||||
|
String data=result.getString("data");
|
||||||
//插入模型ID与DOCID对应表中
|
//插入模型ID与DOCID对应表中
|
||||||
BO gptBO=new BO();
|
BO gptBO=new BO();
|
||||||
gptBO.set("plid",fileId);
|
gptBO.set("plid",fileId);
|
||||||
gptBO.set("docid",result);
|
gptBO.set("docid",data);
|
||||||
SDK.getBOAPI().create("BO_EU_GPT_DOCFILE", gptBO, processExecutionContext.getProcessInstance().getId(), processExecutionContext.getProcessInstance().getCreateUser());
|
SDK.getBOAPI().create("BO_EU_GPT_DOCFILE", gptBO, processExecutionContext.getProcessInstance().getId(), processExecutionContext.getProcessInstance().getCreateUser());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -663,7 +665,6 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
DeleteGptFilesUtils.deleteGptFiles(deleteGptUrl,jsonRequest.toJSONString(),appkey);
|
DeleteGptFilesUtils.deleteGptFiles(deleteGptUrl,jsonRequest.toJSONString(),appkey);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
RowMap rowMap = DBSql
|
RowMap rowMap = DBSql
|
||||||
.getMap("SELECT * FROM BO_ACT_COE_PUBLISH_C WHERE PUBLISHFILEID=" +changefileIdNew+"");
|
.getMap("SELECT * FROM BO_ACT_COE_PUBLISH_C WHERE PUBLISHFILEID=" +changefileIdNew+"");
|
||||||
|
|
||||||
@ -697,15 +698,17 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
|||||||
String filepath = dcContext.getFilePath();
|
String filepath = dcContext.getFilePath();
|
||||||
String finalFilePath = filepath.replace("bin\\..\\", "");
|
String finalFilePath = filepath.replace("bin\\..\\", "");
|
||||||
|
|
||||||
|
JSONObject result=JSONObject.parseObject(UploadGptFileUtils.uploadGptFile(uploadGptUrl,appkey,requestCode,dcContext.getFilePath()));
|
||||||
|
|
||||||
String result = UploadGptFileUtils.uploadGptFile(uploadGptUrl, appkey, requestCode, dcContext.getFilePath());
|
if(result.getString("meg").equals("success")){
|
||||||
if (result != null) {
|
String data=result.getString("data");
|
||||||
//插入模型ID与DOCID对应表中
|
//插入模型ID与DOCID对应表中
|
||||||
BO gptBO = new BO();
|
BO gptBO=new BO();
|
||||||
gptBO.set("plid", changefileIdNew);
|
gptBO.set("plid",changefileIdNew);
|
||||||
gptBO.set("docid", result);
|
gptBO.set("docid",data);
|
||||||
SDK.getBOAPI().create("BO_EU_GPT_DOCFILE", gptBO, processExecutionContext.getProcessInstance().getId(), processExecutionContext.getProcessInstance().getCreateUser());
|
SDK.getBOAPI().create("BO_EU_GPT_DOCFILE", gptBO, processExecutionContext.getProcessInstance().getId(), processExecutionContext.getProcessInstance().getCreateUser());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user