|
|
@@ -914,7 +914,7 @@ public class TodoCenterManage { |
|
|
|
* @param instanceId 流程实例ID |
|
|
|
* @return 流程进度及表单详情 |
|
|
|
*/ |
|
|
|
public ProcessProgressDetailVo getProcessDetail(String nodeId, String instanceId, Long projectId) { |
|
|
|
public ProcessProgressDetailVo getProcessDetail(String instanceId, Long projectId) { |
|
|
|
HistoricProcessInstance instance = historyService.createHistoricProcessInstanceQuery() |
|
|
|
.processInstanceId(instanceId) |
|
|
|
.singleResult(); |
|
|
@@ -924,34 +924,49 @@ public class TodoCenterManage { |
|
|
|
.variableName(WflowGlobalVarDef.WFLOW_FORMS) |
|
|
|
.singleResult(); |
|
|
|
List<HistoricVariableInstance> formDatas = null; |
|
|
|
if (nodeId.equals("undefined")) { |
|
|
|
List<HistoricTaskInstance> historicTaskInstances = historyService.createHistoricTaskInstanceQuery().processInstanceId(instanceId).list(); |
|
|
|
formDatas = historyService |
|
|
|
.createHistoricVariableInstanceQuery() |
|
|
|
.executionIds(historicTaskInstances.stream() |
|
|
|
.map(HistoricTaskInstance::getExecutionId) |
|
|
|
.collect(Collectors.toSet())) |
|
|
|
.processInstanceId(instanceId) |
|
|
|
.list(); |
|
|
|
} else { |
|
|
|
formDatas = historyService |
|
|
|
.createHistoricVariableInstanceQuery() |
|
|
|
.processInstanceId(instanceId) |
|
|
|
.list(); |
|
|
|
} |
|
|
|
//if (nodeId.equals("undefined")) { |
|
|
|
// List<HistoricTaskInstance> historicTaskInstances = historyService.createHistoricTaskInstanceQuery().processInstanceId(instanceId).list(); |
|
|
|
// formDatas = historyService |
|
|
|
// .createHistoricVariableInstanceQuery() |
|
|
|
// .executionIds(historicTaskInstances.stream() |
|
|
|
// .map(HistoricTaskInstance::getExecutionId) |
|
|
|
// .collect(Collectors.toSet())) |
|
|
|
// .processInstanceId(instanceId) |
|
|
|
// .list(); |
|
|
|
//} else { |
|
|
|
// formDatas = historyService |
|
|
|
// .createHistoricVariableInstanceQuery() |
|
|
|
// .processInstanceId(instanceId) |
|
|
|
// .list(); |
|
|
|
//} |
|
|
|
List<HistoricTaskInstance> historicTaskInstances = historyService.createHistoricTaskInstanceQuery() |
|
|
|
.processInstanceId(instanceId).list(); |
|
|
|
formDatas = historyService.createHistoricVariableInstanceQuery() |
|
|
|
.executionIds(historicTaskInstances.stream() |
|
|
|
.map(HistoricTaskInstance::getExecutionId) |
|
|
|
.collect(Collectors.toSet())) |
|
|
|
.processInstanceId(instanceId).list(); |
|
|
|
|
|
|
|
// 取节点设置 |
|
|
|
HistoricVariableInstance nodeProps = historyService.createHistoricVariableInstanceQuery() |
|
|
|
.processInstanceId(instanceId).variableName(WflowGlobalVarDef.WFLOW_NODE_PROPS).singleResult(); |
|
|
|
Map<String, Object> nodePropsValue = (Map<String, Object>) nodeProps.getValue(); |
|
|
|
|
|
|
|
ProcessNode<?> currentNode = null; |
|
|
|
if (StrUtil.isNotBlank(nodeId)) { |
|
|
|
// 搜索当前版本流程的配置 |
|
|
|
WflowModelHistorys modelHistory = modelHistorysMapper.selectOne(new QueryWrapper<>(WflowModelHistorys.builder() |
|
|
|
//if (StrUtil.isNotBlank(nodeId)) { |
|
|
|
// // 搜索当前版本流程的配置 |
|
|
|
// WflowModelHistorys modelHistory = modelHistorysMapper.selectOne(new QueryWrapper<>(WflowModelHistorys.builder() |
|
|
|
// .processDefId(instance.getProcessDefinitionId()) |
|
|
|
// .version(instance.getProcessDefinitionVersion()) |
|
|
|
// .build())); |
|
|
|
// currentNode = nodeCatchService.reloadProcessByStr(modelHistory.getProcess()).get(nodeId); |
|
|
|
//} |
|
|
|
// 搜索当前版本流程的配置 |
|
|
|
WflowModelHistorys modelHistory = modelHistorysMapper.selectOne(new QueryWrapper<>(WflowModelHistorys.builder() |
|
|
|
.processDefId(instance.getProcessDefinitionId()) |
|
|
|
.version(instance.getProcessDefinitionVersion()) |
|
|
|
.build())); |
|
|
|
currentNode = nodeCatchService.reloadProcessByStr(modelHistory.getProcess()).get(nodeId); |
|
|
|
} |
|
|
|
currentNode = nodeCatchService.reloadProcessByStr(modelHistory.getProcess()).get("undefined"); |
|
|
|
//UserInfo userInfo = userInfoService.getById(Long.valueOf(instance.getStartUserId())); |
|
|
|
//HashSet<String> userSet = new HashSet<>(); |
|
|
|
//userSet.add(String.valueOf(userInfo.getId())); |
|
|
|