package com.jwipc.constant;

import lombok.Getter;

/**
 * <p> </p>
 *
 * @author 邓京术
 * @version 1.0
 * @since JDK 1.8
 */
@Getter
public enum ShareProcessType {

    CONTRACT_MRO(101, "流程ID", "合同审批状态反写共享回调", ""),
    CONTRACT_STAMP(102, "流程ID", "更新合同盖章附件状态共享回调", ""),
    CONTRACT_PAYABLE(201, "流程ID", "资产合同应付款申请共享审批回调", "/"),
    CONTRACT_PREPARE_PAY(202, "流程ID", "资产合同预付款申请共享审批回调", ""),
    CONTRACT_MRO_PAY(203, "流程ID", "资产合同请款共享审批回调", ""),
    PAYMENT_CHANGE(204, "流程ID", "付款申请银行信息变更审批回调", ""),
    RECEIPT_ACCOUNTING(301, "流程ID", "收货单资产化记账状态回调", ""),
    RECEIPT_ACCEPT(302, "流程ID", "收货单资产验收状态回调", ""),
    CONTRACT_MU_JU(401, "流程ID", "模具资产验收状态回调", ""),
    CONTRACT_PAYMENT_APPLY(207, "流程ID", "资产合同MRO付款申请单状态回调", ""),
    ;

    private final int type;
    private final String processId;
    private final String title;
    private final String url;//流程查看的地址

    ShareProcessType(int type, String processId, String title, String url) {
        this.type = type;
        this.processId = processId;
        this.title = title;
        this.url = url;
    }

    public static ShareProcessType getObj(int type){

        for(ShareProcessType obj: ShareProcessType.values()){
            if(obj.getType()==type){
                return obj;
            }
        }
        return null;
    }

    public static String getTitle(int type){

        for(ShareProcessType obj: ShareProcessType.values()){
            if(obj.getType()==type){
                return obj.getTitle();
            }
        }
        return null;
    }
}
