package com.chinaztt.mes.quality.excel;
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
import java.math.BigDecimal;
|
|
/**
|
* @Description:
|
* @Author: shz
|
* @Date: 2023/4/26 14:57
|
*/
|
public enum ResultListV2Data {
|
CHECK_TIME("checkTime", "检测时间"),
|
|
IS_QUALIFIED("isQualified", "结论"),
|
|
PART_BATCH_NO("partBatchNo", "SN号"),
|
|
CHECK_LENGTH("checkLength", "检测长度"),
|
|
SCRAP_ARRIVED("scrapArrived", "报废长度"),
|
|
PART_NO("partNo", "零件号"),
|
|
PART_DESC("partDesc", "零件名称"),
|
|
REPLACE_PART_NO("replacePartNo", "替代零件号"),
|
|
REPLACE_PART_NAME("replacePartName", "替代零件名称"),
|
|
EXAMINER("examiner", "检测员"),
|
|
MEASURING_INSTRUMENT("measuringInstrument", "检测器具"),
|
|
REPORT_PERSON("reportPerson", "检测人员"),
|
|
TEST_TYPE("reportType", "检测类型"),
|
|
WORKSTATION_NAME("workstationName", "机台");
|
|
private String type;
|
|
private String desc;
|
|
private ResultListV2Data(String type, String desc) {
|
this.type = type;
|
this.desc = desc;
|
}
|
|
public static String getValue(String type) {
|
ResultListV2Data[] carTypeEnums = values();
|
for (ResultListV2Data carTypeEnum : carTypeEnums) {
|
if (carTypeEnum.type().equals(type)) {
|
return carTypeEnum.desc();
|
}
|
}
|
return null;
|
}
|
|
public static String getType(String desc) {
|
ResultListV2Data[] carTypeEnums = values();
|
for (ResultListV2Data carTypeEnum : carTypeEnums) {
|
if (carTypeEnum.desc().equals(desc)) {
|
return carTypeEnum.type();
|
}
|
}
|
return null;
|
}
|
|
private String type() {
|
return this.type;
|
}
|
|
private String desc() {
|
return this.desc;
|
}
|
}
|