|
|
@ -237,6 +237,7 @@ public class FlowTaskService extends MybatisBaseService<FlowTaskMapper, FlowTask |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public ResultBean<FlowRecordVo> businessFlowRecord(String procInsId, String deployId) { |
|
|
|
ResultBean<FlowRecordVo> rb=ResultBean.fireFail(); |
|
|
|
FlowRecordVo flowRecordVo = new FlowRecordVo(); |
|
|
|
if (StringUtils.isNotBlank(procInsId)) { |
|
|
|
List<HistoricActivityInstance> list = historyService |
|
|
@ -300,7 +301,7 @@ public class FlowTaskService extends MybatisBaseService<FlowTaskMapper, FlowTask |
|
|
|
} |
|
|
|
flowRecordVo.setFlowList(hisFlowList); |
|
|
|
} |
|
|
|
return new ResultBean(flowRecordVo); |
|
|
|
return rb.success().setData(flowRecordVo); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -1156,7 +1157,12 @@ public class FlowTaskService extends MybatisBaseService<FlowTaskMapper, FlowTask |
|
|
|
private String getTaskId(String currentActivityId, String processInstanceId, String processDefinitionId) { |
|
|
|
BpmnModel bpmnModel = repositoryService.getBpmnModel(processDefinitionId); |
|
|
|
FlowNode flowNode = (FlowNode) bpmnModel.getFlowElement(currentActivityId); |
|
|
|
SequenceFlow sequenceFlow = flowNode.getIncomingFlows().get(0); |
|
|
|
List<SequenceFlow> list=flowNode.getIncomingFlows(); |
|
|
|
if(list.size()==0){ |
|
|
|
return ""; |
|
|
|
} |
|
|
|
SequenceFlow sequenceFlow = list.get(0); |
|
|
|
|
|
|
|
// 获取上一个节点的activityId
|
|
|
|
String sourceRef = sequenceFlow.getSourceRef(); |
|
|
|
HistoricActivityInstance historicActivityInstance = historyService.createHistoricActivityInstanceQuery().activityId(sourceRef) |
|
|
@ -1183,6 +1189,9 @@ public class FlowTaskService extends MybatisBaseService<FlowTaskMapper, FlowTask |
|
|
|
// taskService.addComment(currentTask.getId(), execution.getProcessInstanceId(), body.get("msg").toString());
|
|
|
|
// FlowNode flowNode2 = (FlowNode)bpmnModel.getFlowElement(sourceRef);
|
|
|
|
String taskId = getTaskId(currentActivityId, historicTaskInstance.getProcessInstanceId(), historicTaskInstance.getProcessDefinitionId()); |
|
|
|
if(StringUtils.isBlank(taskId)){ |
|
|
|
return new ResultBean<List<LatestTaskVo>>().fail().setMsg("流程找不到上一环节,撤回操作失败!").setData(new ArrayList<>()); |
|
|
|
} |
|
|
|
HistoricTaskInstance historicTaskInstance1 = historyService.createHistoricTaskInstanceQuery().taskId(taskId).singleResult(); |
|
|
|
String assignee = historicTaskInstance1.getAssignee(); |
|
|
|
String userSid = flowTaskVo.getUserSid(); |
|
|
|