feat(REQ-3383) - 日志中存在机器人节点时,日志展示不完整

This commit is contained in:
wangli 2024-12-06 20:40:26 +08:00
parent aa5972e804
commit 91c223165c

View File

@ -1310,6 +1310,7 @@ public class BpmnProcessInstanceServiceImpl implements BpmnProcessInstanceServic
Optional<BpmnTaskInstanceLogVO> processingTask = tasks.stream().filter(i -> Objects.equals(PROCESSING, i.getResult()))
.filter(i -> Objects.equals(i.getTaskDefinitionKey(), e.getActivityId())).findAny();
BpmnTaskDelegateAssigner assigner = BpmnTaskDelegateAssigner.toObjectCompatible(CollectionUtils.isEmpty(ListUtils.emptyIfNull(e.getAssigneeFull())) ? null : e.getAssigneeFull().get(0));
if (processingTask.isPresent()) {
// 多实例的情况需要合并节点
processingTask.ifPresent(i -> {
@ -1319,7 +1320,9 @@ public class BpmnProcessInstanceServiceImpl implements BpmnProcessInstanceServic
assigners.add(i.getAssigneeSnapshot());
}
}
assigners.add(BpmnTaskDelegateAssigner.toObjectCompatible(CollectionUtils.isEmpty(ListUtils.emptyIfNull(e.getAssigneeFull())) ? null : e.getAssigneeFull().get(0)));
if (Objects.nonNull(assigner)) {
assigners.add(assigner);
}
switch (i.getNodeMode()) {
case AND:
i.setOperationDesc(assigners.size() + "人会签,需要全部同意");
@ -1357,7 +1360,7 @@ public class BpmnProcessInstanceServiceImpl implements BpmnProcessInstanceServic
.fileList(getAttachmentByType(attachmentByTaskMap, e.getTaskId(), AttachmentTypeEnum.file))
.signatureUrl(getAttachmentByType(attachmentByTaskMap, e.getTaskId(), AttachmentTypeEnum.signature).stream().findFirst().orElse(new AttachmentDTO()).getUrl())
.assigneeSnapshot(Objects.equals(e.getNodeType(), BpmnFlowNodeType.NODE_CARBON_COPY.getType()) ? null :
BpmnTaskDelegateAssigner.toObjectCompatible(CollectionUtils.isEmpty(ListUtils.emptyIfNull(e.getAssigneeFull())) ? null : e.getAssigneeFull().get(0)))
assigner)
.forecastAssignees(Objects.equals(e.getNodeType(), BpmnFlowNodeType.NODE_CARBON_COPY.getType()) ? ListUtils.emptyIfNull(e.getAssigneeFull()) : Collections.emptyList())
.build());
}