|
|
@ -1353,12 +1353,20 @@ public class FlowTaskService extends MybatisBaseService<FlowTaskMapper, FlowTask |
|
|
|
if(list.size()==0){ |
|
|
|
return ""; |
|
|
|
} |
|
|
|
SequenceFlow sequenceFlow = list.get(0); |
|
|
|
|
|
|
|
// 获取上一个节点的activityId
|
|
|
|
String sourceRef = sequenceFlow.getSourceRef(); |
|
|
|
HistoricActivityInstance historicActivityInstance = historyService.createHistoricActivityInstanceQuery().activityId(sourceRef) |
|
|
|
.processInstanceId(processInstanceId).orderByHistoricActivityInstanceStartTime().desc().list().get(0);//singleResult();
|
|
|
|
List<HistoricActivityInstance> list1=new ArrayList<>(); |
|
|
|
for( SequenceFlow sequenceFlow:list){ |
|
|
|
String sourceRef = sequenceFlow.getSourceRef(); |
|
|
|
list1= historyService.createHistoricActivityInstanceQuery().activityId(sourceRef) |
|
|
|
.processInstanceId(processInstanceId).orderByHistoricActivityInstanceStartTime().desc().list(); |
|
|
|
if(list1.size()>0){ |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
// 获取上一个节点的activityId
|
|
|
|
|
|
|
|
|
|
|
|
HistoricActivityInstance historicActivityInstance = list1.get(0);//singleResult()
|
|
|
|
String activityType = historicActivityInstance.getActivityType(); |
|
|
|
String historicActivityInstanceActivityId = historicActivityInstance.getActivityId(); |
|
|
|
if (!"userTask".equals(activityType)) { |
|
|
@ -1593,11 +1601,15 @@ public class FlowTaskService extends MybatisBaseService<FlowTaskMapper, FlowTask |
|
|
|
/* if(assignee.equals("0d8d8119-d476-47ce-89c2-075cd809dda6")){ |
|
|
|
taskService.setAssignee(task_map.get("id_").toString(), assignee); |
|
|
|
}else{*/ |
|
|
|
if(task_map!=null){ |
|
|
|
taskService.setAssignee(task_map.get("id_").toString(), assignee); |
|
|
|
latestTaskVo.setId_(task_map.get("id_").toString()); |
|
|
|
latestTaskList.add(latestTaskVo); |
|
|
|
} |
|
|
|
|
|
|
|
/* }*/ |
|
|
|
|
|
|
|
latestTaskVo.setId_(task_map.get("id_").toString()); |
|
|
|
latestTaskList.add(latestTaskVo); |
|
|
|
|
|
|
|
}); |
|
|
|
} catch (FlowableObjectNotFoundException e) { |
|
|
|
throw new CustomException("未找到流程实例,流程可能已发生变化"); |
|
|
|