package com.ld.igds.constant;
|
|
/**
|
* 仓库状态枚举
|
*/
|
public enum DepotStatus {
|
|
STATUS_1("1", "空仓"),
|
STATUS_2("2", "入库中"),
|
STATUS_3("3", "封仓"),
|
STATUS_4("4", "出库中"),
|
STATUS_31("31", "封仓-气调中"),
|
STATUS_32("32", "封仓-熏蒸中"),
|
STATUS_33("33", "封仓-通风中"),
|
STATUS_34("34", "封仓-温控中"),
|
STATUS_9("9", "其他");
|
|
private String code;
|
private String msg;
|
|
DepotStatus(String code, String msg) {
|
this.code = code;
|
this.msg = msg;
|
}
|
|
public String getCode() {
|
return code;
|
}
|
|
public String getMsg() {
|
return msg;
|
}
|
|
public static String getMsg(String code) {
|
if (null == code) return null;
|
|
if (DepotStatus.STATUS_1.getCode().equals(code)) return DepotStatus.STATUS_1.getMsg();
|
if (DepotStatus.STATUS_2.getCode().equals(code)) return DepotStatus.STATUS_2.getMsg();
|
if (DepotStatus.STATUS_3.getCode().equals(code)) return DepotStatus.STATUS_3.getMsg();
|
if (DepotStatus.STATUS_4.getCode().equals(code)) return DepotStatus.STATUS_4.getMsg();
|
if (DepotStatus.STATUS_31.getCode().equals(code)) return DepotStatus.STATUS_31.getMsg();
|
if (DepotStatus.STATUS_32.getCode().equals(code)) return DepotStatus.STATUS_32.getMsg();
|
if (DepotStatus.STATUS_33.getCode().equals(code)) return DepotStatus.STATUS_33.getMsg();
|
if (DepotStatus.STATUS_34.getCode().equals(code)) return DepotStatus.STATUS_34.getMsg();
|
|
return DepotStatus.STATUS_9.getMsg();
|
}
|
|
|
public static String getGBCode(String code) {
|
if (null == code) DepotStatus.STATUS_9.getCode();
|
|
if (DepotStatus.STATUS_31.equals(code)) return DepotStatus.STATUS_3.getCode();
|
if (DepotStatus.STATUS_32.equals(code)) return DepotStatus.STATUS_3.getCode();
|
if (DepotStatus.STATUS_33.equals(code)) return DepotStatus.STATUS_3.getCode();
|
if (DepotStatus.STATUS_34.equals(code)) return DepotStatus.STATUS_3.getCode();
|
|
return code;
|
}
|
|
|
}
|