package com.casic.missiles.enums.system;

public enum ApplyFromIdEnum {
    FILE_APPROVAL("jlglwjsp", "4", "文件审批"),
    TRAIN_APPROVAL("jlglpxjhsp", "4", "培训计划审批"),
    STANDARD_EQUIPMENT("jlglsygfsp", "4", "溯源供方审批"),
    STANDARD_CHANGE_APPROVAL("sbglbzzzghsq", "3", "标准装置更换申请"),
    STANDARD_PAUSE_APPROVAL("sbglbzzzztsq", "3", "标准装置暂停申请"),
    STANDARD_REVERT_APPROVAL("sbglbzzzcxsq", "3", "标准装置撤销申请"),
    STANDARD_RESUME_APPROVAL("sbglbzzzhfsq", "3", "标准装置恢复申请"),
    STANDARD_CHECK_APPROVAL("sbglbzzzfcsq", "3", "标准装置复查申请"),
    DEVICE_UNUSED_APPROVAL("sbglsbxzsq", "3", "设备闲置申请"),
    DEVICE_SEALED_APPROVAL("sbglsbfcsq", "3", "设备封存申请"),
    DEVICE_UNSEALED_APPROVAL("sbglsbqfsq", "3", "设备启封申请"),
    DEVICE_SCRAP_APPROVAL("sbglsbbfsq", "3", "设备报废申请"),
    DEVICE_HANDLE_APPROVAL("sbglsbczsq", "3", "设备处置申请"),
    DEVICE_CONSUMING_APPROVAL("clsblysp", "3", "设备领用申请"),
    DEVICE_BORROW_APPROVAL("clsbjysp", "3", "设备借用申请"),
    DEVICE_FIX_APPROVAL("sbglsbjxsq", "3", "设备检修申请"),
    DEVICE_FIX_ACCEPTANCE("sbglsbjxbyysd", "3", "设备检修保养验收单"),
    CERTIFICATE_PRINT_APPROVAL("ywglzsdy", "1", "证书打印通过"),
    CERTIFICATE_REPORT_APPROVAL("ywglzsbg", "1", "证书报告通过"),
    OUTSOURCER_APPROVAL("ywglfbfzg", "1", "分包方资格"),
    OUTSOURCE_PROJECT_APPLY_APPROVAL("ywglfbxmsq", "1", "分包项目申请"),
    OUTSOURCE_PROJECT_CHECK_APPROVAL("ywglfbxmys", "1", "分包项目验收"),
    AGREEMENT_APPROVAL("cwczht", "2", "合同"),
    SITE_EXECUTIVE_INFO_APPROVAL("ywglxcjc", "1", "现场检测审批");

    private String code;
    private String source;//MessageSourceModuleEnum类code,工作台审批消息提醒接口使用
    private String value;

    ApplyFromIdEnum(String code, String source, String value) {
        this.code = code;
        this.source = source;
        this.value = value;
    }

    public String getCode() {
        return code;
    }

    public String getSource() {
        return source;
    }

    public String getValue() {
        return value;
    }

    public static String getSourceByCode(String code){
        for (ApplyFromIdEnum applyFromIdEnum : ApplyFromIdEnum.values()) {
            if(applyFromIdEnum.getCode().equals(code)){
                return applyFromIdEnum.getSource();
            }
        }
        return "";
    }

    public static String getValueByCode(String code){
        for (ApplyFromIdEnum applyFromIdEnum : ApplyFromIdEnum.values()) {
            if(applyFromIdEnum.getCode().equals(code)){
                return applyFromIdEnum.getValue();
            }
        }
        return "";
    }
}
