|
@@ -143,7 +143,7 @@ public class FlowController {
|
|
|
return new BaseResult("500", "流程的key重复", null);
|
|
|
}
|
|
|
File file = FileUtil.createFile(fileName, fileContent);
|
|
|
- Deployment deployment = flowModel.deployFlowXml(file.getAbsolutePath());
|
|
|
+ Deployment deployment = flowModel.deployFlowXml(file.getAbsolutePath(), companyId);
|
|
|
boolean delete = file.delete();
|
|
|
if (!delete) {
|
|
|
System.out.println("文件删除失败!");
|
|
@@ -169,7 +169,7 @@ public class FlowController {
|
|
|
// 重新部署新的流程实例
|
|
|
fileContent = XmlUtil.setNodeArrtibute(fileContent, "id", flowKey);
|
|
|
File file = FileUtil.createFile(fileName, fileContent);
|
|
|
- Deployment deployment = flowModel.deployFlowXml(file.getAbsolutePath());
|
|
|
+ Deployment deployment = flowModel.deployFlowXml(file.getAbsolutePath(), companyId);
|
|
|
boolean delete = file.delete();
|
|
|
if (!delete) {
|
|
|
return new BaseResult("500", "文件删除失败!", null);
|
|
@@ -222,7 +222,6 @@ public class FlowController {
|
|
|
@RequestParam String name,
|
|
|
@RequestParam(value = "paras") String paras
|
|
|
){
|
|
|
- LoginUser loginUser = tokenService.getUser(request);
|
|
|
BaseResult result = new BaseResult();
|
|
|
Map<String, Object> m = new HashMap<>();
|
|
|
m.put("menuId", menuId);
|
|
@@ -251,7 +250,7 @@ public class FlowController {
|
|
|
paras = paras.replaceAll("\\:,", "\\:null,");
|
|
|
Map<String, Object> p = JSONObject.fromObject(paras);
|
|
|
String processId = String.valueOf(conf.get("procdefId"));
|
|
|
- ProcessInstance processInstance = flowProcess.startFlow(processId, p, sessionUserId, name, businessKey, loginUser.getSysUser().getCompanyId());
|
|
|
+ ProcessInstance processInstance = flowProcess.startFlow(processId, p, sessionUserId, name, businessKey);
|
|
|
return result;
|
|
|
}
|
|
|
|