字段和枚举的新增

yun-zuoyi
puxiao.liao 4 years ago
parent c67f263e5d
commit 224e3a9a51

@ -1908,6 +1908,84 @@ public class WmsEnumUtil {
}
/**
* PO
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PO_QC_STATUS {
INQUALITY(10, "INQUALITY", "质检中"),
NORMAL(20, "NORMAL", "合格"),
ABNORMAL(30, "ABNORMAL", "不合格");
private int value;
private String code;
private String description;
private PO_QC_STATUS(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public String getCode() {
return code;
}
public static String valueOf(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
public static String codeOf(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].code;
}
}
return tmp;
}
public static PO_QC_STATUS codeOfs(Integer value) {
if (value == null) {
return null;
} else {
for (int i = 0; i < values().length; i++) {
if (values()[i].value == value) {
return values()[i];
}
}
}
return null;
}
public static int descOf(String desc) {
int tmp = 1;
for (int i = 0; i < values().length; i++) {
if (values()[i].description.equals(desc)) {
tmp = values()[i].value;
}
}
return tmp;
}
public static String valueOfDescription(int val) {
return valueOf(val);
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)

@ -56,11 +56,20 @@ public class WmsQCMaster extends BaseBean {
* :1=,5=,10=,90=,91=
*/
@Column(name = "ORDER_STATUS")
@ApiParam(value = "状态", example = "1")
@ApiParam(value = "单据状态", example = "1")
@AnnoOutputColumn(refClass = WmsEnumUtil.QC_INFO_STATUS.class, refForeignKey = "value", value = "description")
@DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.SELECT, dataSrc = "QC_INFO_STATUS")
public Integer orderStatus;
/**
* :10=,20=,30=
*/
@Column(name = "QC_STATUS")
@ApiParam(value = "质检状态", example = "1")
@AnnoOutputColumn(refClass = WmsEnumUtil.PO_QC_STATUS.class, refForeignKey = "value", value = "description")
@DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.SELECT, dataSrc = "PO_QC_STATUS")
public Integer qcStatus;
@Column(name = "REMARK")
@ApiParam("备注")
@DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)

Loading…
Cancel
Save