Merge remote-tracking branch 'origin/feature/REQ-2924' into feature/REQ-2924
This commit is contained in:
commit
70d23a6e18
@ -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))
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user