优化流程标题

This commit is contained in:
huangxing123
2024-08-31 14:57:03 +08:00
parent 899bd0366e
commit 150b109af0
2 changed files with 9 additions and 19 deletions

View File

@@ -216,19 +216,14 @@ public class WfProcessServiceImpl extends FlowServiceFactory implements IWfProce
// 查询任务节点参数并转换成Map目的是获取流程标题(新增于2024年2月29日)
List<HistoricVariableInstance> collectors = historyService.createHistoricVariableInstanceQuery().processInstanceId(hisIns.getId()).list();
if(CollUtil.isNotEmpty(collectors)){
taskVo.setProcVars(collectors.stream().collect(Collectors.toMap(HistoricVariableInstance::getVariableName, HistoricVariableInstance::getValue)));
// taskVo.setProcVars(collectors.stream().collect(Collectors.toMap(HistoricVariableInstance::getVariableName, HistoricVariableInstance::getValue)));
// 遍历表单属性并获取值
collectors.stream().forEach(historicVariableInstance -> {
if (historicVariableInstance.getVariableName().equals("description")) {
taskVo.setProcVars(historicVariableInstance.getValue());
}
});
}
/* Map<String, Object> collectors = historyService.createHistoricVariableInstanceQuery()
.processInstanceId(hisIns.getId())
.list()
.stream()
.collect(Collectors.toMap(HistoricVariableInstance::getVariableName, HistoricVariableInstance::getValue));
taskVo.setProcVars(collectors);*/
/* List<HistoricVariableInstance> list = historyService.createHistoricVariableInstanceQuery()
.processInstanceId(hisIns.getId())
.list();
taskVo.setProcVars(list);*/
taskVoList.add(taskVo);
}
page.setRecords(taskVoList);