Commit 8ebb75cd authored by chenhao's avatar chenhao

修改查询历史操作节点的历史执行角色组的方法

parent 8c78ce46
...@@ -171,19 +171,31 @@ public class WorkflowExcuteServiceImpl implements IWorkflowExcuteService { ...@@ -171,19 +171,31 @@ public class WorkflowExcuteServiceImpl implements IWorkflowExcuteService {
} }
return newDate + result; return newDate + result;
} }
/**
* 描述: 获取在流程启动时,直接完成的特定任务的执行角色信息。 /**
* 作用:用来判断当前登录用户在任务回退到启动并完成的哪一步任务的执行权限,以及获取当前登录用户所属角色能够处理的当前任务的列表数据 * 描述: 获取在流程启动时,直接完成的特定任务的执行角色信息。
* @param processInstanceId * 作用:用来判断当前登录用户在任务回退到启动并完成的哪一步任务的执行权限,以及获取当前登录用户所属角色能够处理的当前任务的列表数据
* @return *
*/ * @param processInstanceId
* @return
*/
public String getFristFlowDetail(String processInstanceId) { public String getFristFlowDetail(String processInstanceId) {
try { try {
JSONObject detail = workflowFeignService.getHistoricIdentityLinksForProcessInstance(processInstanceId);
if (ObjectUtils.isNotEmpty(detail.getJSONArray("data"))) { JSONObject historyTaskJsonObject = workflowFeignService
JSONObject json = detail.getJSONArray("data").getJSONObject(1); .getHistoricTaskForProcessInstanceId(processInstanceId);
if (json.getBooleanValue("group")) { if (ObjectUtils.isEmpty(historyTaskJsonObject.getJSONArray("data"))) {
return json.getString("groupId"); return null;
}
JSONObject historyTaskObject = historyTaskJsonObject.getJSONArray("data").getJSONObject(0);
JSONObject detail = workflowFeignService.getHistoricIdentityLinksForTask(historyTaskObject.getString("id"));
JSONArray resultArray = detail.getJSONArray("data");
if (ObjectUtils.isNotEmpty(resultArray)) {
for (int i = 0; i < resultArray.size(); i++) {
JSONObject result = resultArray.getJSONObject(i);
if (result.getBooleanValue("group")) {
return result.getString("groupId");
}
} }
} }
} catch (ParseException e) { } catch (ParseException e) {
......
...@@ -191,6 +191,16 @@ public interface WorkflowFeignService { ...@@ -191,6 +191,16 @@ public interface WorkflowFeignService {
* @return * @return
* @throws ParseException * @throws ParseException
*/ */
@RequestMapping(value = "/activitiHistory/processes/historytasks/getGroupNamelist/{processInstanceId}",method = RequestMethod.GET) @RequestMapping(value = "/activitiHistory/processes/historytasks/getGroupNamelist/{taskId}",method = RequestMethod.GET)
JSONObject getHistoricIdentityLinksForProcessInstance(@PathVariable("processInstanceId") String processInstanceId) throws ParseException; JSONObject getHistoricIdentityLinksForTask(@PathVariable("taskId") String taskId) throws ParseException;
/**
*获取指定流程定义下所有的历史流程任务任务执行信息 --获取historytask表数据
* @param processInstanceId
* @return
* @throws ParseException
*/
@RequestMapping(value = "/processes/historytasks/getHistoricTaskForProcessInstanceId/{processInstanceId}",method = RequestMethod.GET)
JSONObject getHistoricTaskForProcessInstanceId(@PathVariable("processInstanceId") String processInstanceId) throws ParseException;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment