package digital.laboratory.platform.inspection.enums;

/**
 * @author xy
 * @version 1.0
 * @title TestDataType 检验数据的格式类型枚举
 * @description
 * @create 2024/1/9 10:23
 */

public enum TestDataType {
    //这三种是沃特斯的数据文件的格式类型
    WaterS_QuantifyCompoundSummaryReport(10001,"WATERS Quantify Compound Summary Report"),
    WaterS_QuantifySampleSummaryReport(10002, "WATERS Quantify Sample Summary Report"),
    WaterS_TabSeparator(10003, "WATERS 液相色谱导出的 tab 分隔数据文件"),
    //这三种是岛津的数据文件的格式
    Shimadzu_Common_File(20000, "岛津通用格式"),
    Shimadzu_MCPeakTable(20001, "岛津 定性峰表 SHIMADZU MC Peak Table"),
    Shimadzu_MSQuantitativeResults(20002, "岛津 组分定量结果 SHIMADZU MS Quantitative Results"),
    //这2种是安捷伦的数据文件格式
    Angient_TSV(30001, "ANGIENT TSV"),
    Angient_CSV(30002, "ANGIENT CSV");
    private int eCode;
    private String description;
    TestDataType(int _code,String _description){
        this.description=_description;
        this.eCode=_code;
    }

    public int getECode() {
        return eCode;
    }

    public String getDescription() {
        return description;
    }
    /**
     * 根据code 获取对应的描述
     * @param _code
     * @return
     */
    public static String getDescriptionByCode(int _code) {
        for (TestDataType enumObj : TestDataType.values()) {
            if (enumObj.getECode() == _code) {
                return enumObj.description;
            }
        }
        return "未知数据格式";
    }
}
