package com.qmth.distributed.print.business.enums;

import java.util.Objects;

/**
 * @Description: 自定义流程驳回重新提交类型
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2022/1/21
 */
public enum CustomFlowRejectResubmitTypeEnum {

    NORMAL("按正常流程提交"),

    PREV_STEP("提交到驳回节点");

    private String title;

    private CustomFlowRejectResubmitTypeEnum(String title) {
        this.title = title;
    }

    public String getTitle() {
        return title;
    }

    /**
     * 状态转换 toName
     *
     * @param title
     * @return
     */
    public static String convertToName(String title) {
        for (CustomFlowRejectResubmitTypeEnum e : CustomFlowRejectResubmitTypeEnum.values()) {
            if (Objects.equals(title, e.getTitle())) {
                return e.name();
            }
        }
        return null;
    }
}
