package com.chinaztt.mes.quality.excel; /** * @Description: * @Author: shz * @Date: 2022/2/18 17:32 */ public enum ReportSamoleData { /** * 零件编号 */ PART_NO("partNo", "零件编号"), /** * 检测描述 */ SYSTEM_NO("systemNo", "系统号"), /** * 零件描述 */ PART_SPECS("partSpecs", "零件名称"), /** * 零件规格 */ LOT_BATCH_NO("lotBatchNo", "批号"), /** * 检测结论 */ CREATE_TIME("createTime", "检测时间"), /** * 检测时间 */ IS_QUALIFIED("isQualified", "结论"), /** * 检测人 */ REPORT_PERSON("reportPerson", "检测人"); private String type; private String desc; private ReportSamoleData(String type, String desc) { this.type = type; this.desc = desc; } public static String getValue(String type) { ReportSamoleData[] carTypeEnums = values(); for (ReportSamoleData carTypeEnum : carTypeEnums) { if (carTypeEnum.type().equals(type)) { return carTypeEnum.desc(); } } return null; } public static String getType(String desc) { ReportSamoleData[] carTypeEnums = values(); for (ReportSamoleData carTypeEnum : carTypeEnums) { if (carTypeEnum.desc().equals(desc)) { return carTypeEnum.type(); } } return null; } private String type() { return this.type; } private String desc() { return this.desc; } }