Merge remote-tracking branch 'origin/feature/REQ-2924' into feature/REQ-2924

This commit is contained in:
wangli 2024-09-11 19:50:36 +08:00
commit 70d23a6e18
2 changed files with 16 additions and 0 deletions

View File

@ -1,6 +1,8 @@
package cn.axzo.workflow.common.enums;
import org.springframework.util.StringUtils;
import java.util.Arrays;
import java.util.Objects;
@ -51,6 +53,19 @@ public enum BpmnFlowNodeType {
this.desc = desc;
}
public static BpmnFlowNodeType getByType(String type) {
if (!StringUtils.hasText(type)) {
return null;
}
BpmnFlowNodeType[] values = BpmnFlowNodeType.values();
for (BpmnFlowNodeType value : values) {
if (value.getType().equals(type)) {
return value;
}
}
return null;
}
public static BpmnFlowNodeType valueOfType(String type) {
return Arrays.stream(BpmnFlowNodeType.values())
.filter(i -> Objects.equals(i.getType(), type))

View File

@ -411,6 +411,7 @@ public class BpmnProcessTaskServiceImpl implements BpmnProcessTaskService {
BpmnOptionalNodeDTO bpmnOptionalNodeDTO = resultList.get(resultList.size() - 1);
bpmnOptionalNodeDTO.setProcessNodeDesc(bpmnOptionalNodeDTO.getProcessActivityName() + "(上一级)");
}
resultList.sort((o1, o2) -> o2.getOrdinal() - o1.getOrdinal());
return resultList;
}