yun-zuoyi
陈思洁 6 years ago
commit d9d776060f

@ -2,6 +2,12 @@ package cn.estsh.i3plus.pojo.base.enumutil;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @Description :
* @Reference :
@ -602,7 +608,10 @@ public class WmsEnumUtil {
IN_STOCK("IN_STOCK", "入库单"),
SHIPPING("SHIPPING", "发运单"),
QC("QC", "质检"),
CS("CS", "盘点");
CS("CS", "盘点"),
DR("DR", "直送收货"),
AMPR("AMPR", "AMP拉动收货");
private String value;
private String description;
@ -2564,7 +2573,7 @@ public class WmsEnumUtil {
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum WMS_TRANS_QUAN_STATUS {
CREATE(1, "创建"), SUCCESS(10, "处理成功"),FAIL(30,"处理失败");
CREATE(1, "创建"), SUCCESS(10, "处理成功"), FAIL(30, "处理失败");
private int value;
private String description;
@ -2699,4 +2708,56 @@ public class WmsEnumUtil {
return description;
}
}
public static Map<String, Object> getEnumByName(String enumName) throws Exception{
Class innerClazz[] = WmsEnumUtil.class.getDeclaredClasses();// 获取常量类中的所有内部类
Class<Enum> clazz;
Enum[] enumConstants;
Map<String, Object> enumMap;// 枚举类
List<Map<String, Object>> values;// 枚举实例【enumName{“”:}{“”:}{“”:}】
Map<String, Object> value;// 枚举实例属性
Method getValue;
Method getCode;
Method getDescription;
// 遍历内部类
String simpleName;//内部类的类名
for (Class class1 : innerClazz) {
//获取内部内的类名
simpleName = class1.getSimpleName();
if (simpleName.equals(enumName)) {
// 判断类是不是枚举类
clazz = (Class<Enum>) Class.forName("cn.estsh.i3plus.pojo.base.enumutil.WmsEnumUtil$" + simpleName);
// 枚举类方法初始化
getCode = null;
try {
getCode = clazz.getMethod("getCode");
} catch (NoSuchMethodException e) {
}
getValue = clazz.getMethod("getValue");
getDescription = clazz.getMethod("getDescription");
// 获取所有枚举实例
enumConstants = clazz.getEnumConstants();
enumMap = new HashMap<>();
values = new ArrayList<>();
for (Enum enum1 : enumConstants) {
value = new HashMap<>();
value.put("value", getValue.invoke(enum1));
if (getCode != null) {
value.put("code", getCode.invoke(enum1));
}
value.put("description", getDescription.invoke(enum1));
values.add(value);
}
enumMap.put("enumName", clazz.getSimpleName());
enumMap.put("valuesList", values);
return enumMap;
}
}
return null;
}
}

@ -136,6 +136,22 @@ public class WmsMoveToERP extends BaseBean {
@ApiParam("关联单号")
public String refSrc;
@Column(name = "SRC_AREA_NO")
@ApiParam("来源库存地")
public String srcAreaNo;
@Column(name = "DEST_AREA_NO")
@ApiParam("目标库存地")
public String destAreaNo;
@Column(name = "BUSI_TYPE_CODE")
@ApiParam("交易类型")
public Integer busiTypeCode;
@Column(name = "IS_SYNC")
@ApiParam("是否同步")
public Integer isSync;
@ApiParam(value = "待出库数量", example = "0")
@Transient
private Long waitingCounts;

@ -25,21 +25,32 @@ public class WmsMoveUnfinishedOrderModel extends BaseBean{
@ApiParam("未完成数量")
private Double destQty;
@ApiParam("业务类型")
private Integer busiTypeCode;
@ApiParam("交易类型")
private String transTypeCode;
@ApiParam("交易类型名称")
private String transTypeName;
@ApiParam("关联单号")
private String refSrc;
public WmsMoveUnfinishedOrderModel(String organizeCode, String partNo, String partNameRdd, Double destQty, Integer busiTypeCode, String transTypeCode, String refSrc) {
public WmsMoveUnfinishedOrderModel(String organizeCode, String partNo, String partNameRdd, Double destQty, String transTypeCode, String transTypeName, String refSrc) {
this.organizeCode = organizeCode;
this.partNo = partNo;
this.partNameRdd = partNameRdd;
this.destQty = destQty;
this.transTypeCode = transTypeCode;
this.transTypeName = transTypeName;
this.refSrc = refSrc;
}
public WmsMoveUnfinishedOrderModel(String organizeCode, String partNo, String partNameRdd, Double destQty, String transTypeCode, String refSrc) {
this.organizeCode = organizeCode;
this.partNo = partNo;
this.partNameRdd = partNameRdd;
this.destQty = destQty;
this.busiTypeCode = busiTypeCode;
this.transTypeCode = transTypeCode;
this.refSrc = refSrc;
}

Loading…
Cancel
Save