集成wms服务模块
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
package com.mhd.wms.enums;
|
||||
|
||||
public enum StatusInvestigationEnum {
|
||||
|
||||
creat("已创建", 1),
|
||||
pending("待盘点", 2),
|
||||
during("盘点中", 3),
|
||||
completed("盘点完成", 4);
|
||||
|
||||
private String name;
|
||||
private Integer code;
|
||||
|
||||
private StatusInvestigationEnum(String name, Integer code) {
|
||||
this.name = name;
|
||||
this.code = code;
|
||||
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public void setCode(Integer code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public static String getName(Integer code) {
|
||||
for (StatusInvestigationEnum newEnum : StatusInvestigationEnum.values()) {
|
||||
if (code.equals(newEnum.getCode())) {
|
||||
return newEnum.getName();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static Integer getCode(String name) {
|
||||
for (StatusInvestigationEnum newEnum : StatusInvestigationEnum.values()) {
|
||||
if (name.equals(newEnum.getName())) {
|
||||
return newEnum.getCode();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user