故障描述

This commit is contained in:
Guoqs
2024-06-05 09:39:41 +08:00
parent ebb621c0ab
commit 414019f62b
2 changed files with 16 additions and 16 deletions

View File

@@ -256,7 +256,7 @@ public class CacheConstants {
public static final String HUA_WEI_ORDER_INFO_BY_ORDER_CODE = "HUA_WEI_ORDER_INFO_BY_ORDER_CODE:";
/**
* 桩硬件故障
* 桩硬件故障 根据枪口号查询故障原因
*/
public static final String PILE_HARDWARE_FAULT = "pile_hardware_fault:";

View File

@@ -23,21 +23,6 @@ public enum YKCPileFaultReasonEnum {
DOOR_OPEN_FAULT(13, "门打开"),
;
/**
* 根据code获取故障描述
*
* @param code 故障编码
* @return 故障描述
*/
public static String getValueByCode(int code) {
for (YKCPileFaultReasonEnum item : YKCPileFaultReasonEnum.values()) {
if (item.getCode() == code) {
return item.getValue();
}
}
return null;
}
private int code;
private String value;
@@ -61,4 +46,19 @@ public enum YKCPileFaultReasonEnum {
this.code = code;
this.value = value;
}
/**
* 根据code获取故障描述
*
* @param code 故障编码
* @return 故障描述
*/
public static String getValueByCode(int code) {
for (YKCPileFaultReasonEnum item : YKCPileFaultReasonEnum.values()) {
if (item.getCode() == code) {
return item.getValue();
}
}
return null;
}
}