提交 e6a73a47 编写于 作者: sq3536's avatar sq3536

getbusidByUserId

上级 620b7e4d
...@@ -233,11 +233,12 @@ public class WFCoreService ...@@ -233,11 +233,12 @@ public class WFCoreService
} }
public List<String> getBusinessKeys(String system,String appname, String entity,String processDefinitionKey,String taskDefinitionKey) public List<String> getBusinessKeys(String system,String appname, String entity,String processDefinitionKey,String taskDefinitionKey,String userId)
{ {
List<String> businessKeys = new ArrayList<>(); List<String> businessKeys = new ArrayList<>();
String processInstanceBusinessKeyLike=system+":"+entity+":k-"; String processInstanceBusinessKeyLike=system+":"+entity+":k-";
String userId=AuthenticationUser.getAuthenticationUser().getUserid(); if(StringUtils.isEmpty(userId))
userId=AuthenticationUser.getAuthenticationUser().getUserid();
if(StringUtils.isEmpty(userId)) if(StringUtils.isEmpty(userId))
return businessKeys; return businessKeys;
TaskQuery query=taskService.createTaskQuery().taskCandidateOrAssigned(userId); TaskQuery query=taskService.createTaskQuery().taskCandidateOrAssigned(userId);
......
...@@ -87,9 +87,19 @@ public class WFCoreResource ...@@ -87,9 +87,19 @@ public class WFCoreResource
processDefinitionKey=""; processDefinitionKey="";
if(StringUtils.isEmpty(taskDefinitionKey)||"null".equals(taskDefinitionKey)||"alls".equals(taskDefinitionKey)) if(StringUtils.isEmpty(taskDefinitionKey)||"null".equals(taskDefinitionKey)||"alls".equals(taskDefinitionKey))
taskDefinitionKey=""; taskDefinitionKey="";
return ResponseEntity.status(HttpStatus.OK).body(wfCoreService.getBusinessKeys(system,appname,entity,processDefinitionKey,taskDefinitionKey)); return ResponseEntity.status(HttpStatus.OK).body(wfCoreService.getBusinessKeys(system,appname,entity,processDefinitionKey,taskDefinitionKey,""));
} }
@ApiOperation(value = "getBusinessKeys", tags = {"String" }, notes = "根据流程步骤查询我的待办主键清单")
@RequestMapping(method = RequestMethod.POST, value = "/{system}-user-{userId}/{entity}/process-definitions/{processDefinitionKey}/usertasks/{taskDefinitionKey}/tasks")
public ResponseEntity<List<String>> getbusinesskeysByUserId(@PathVariable("system") String system,@PathVariable("userId") String userId,
@PathVariable("entity") String entity,@PathVariable("processDefinitionKey") String processDefinitionKey,@PathVariable("taskDefinitionKey") String taskDefinitionKey) {
if(StringUtils.isEmpty(processDefinitionKey)||"null".equals(processDefinitionKey)||"alls".equals(processDefinitionKey))
processDefinitionKey="";
if(StringUtils.isEmpty(taskDefinitionKey)||"null".equals(taskDefinitionKey)||"alls".equals(taskDefinitionKey))
taskDefinitionKey="";
return ResponseEntity.status(HttpStatus.OK).body(wfCoreService.getBusinessKeys(system,"",entity,processDefinitionKey,taskDefinitionKey,userId));
}
} }
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册