Merge branch 'dev' into test

yun-zuoyi
peter.pan 6 years ago
commit a551249165

@ -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 :
@ -2567,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;
@ -2702,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;
}
}

@ -43,6 +43,14 @@ public class SysFile extends BaseBean {
@ApiParam(value ="文件所属模块")
private Integer fileSoftType;
public int getFileSoftTypeVal(){
if(fileSoftType == null){
return 0;
}
return fileSoftType.intValue();
}
@Column(name="USER_ID")
@ApiParam(value ="用户ID" , example = "-1")
@JsonSerialize(using = ToStringSerializer.class)
@ -83,5 +91,4 @@ public class SysFile extends BaseBean {
@Column(name="DOWNLOAD_NUM")
@ApiParam(value ="下载次数" , example ="0")
private Integer downloadNum;
}

@ -58,7 +58,7 @@ public class WmsDocFgDetail extends BaseBean {
public String partNo;
@Column(name="PART_NAME_RDD")
@ApiParam("单位")
@ApiParam("物料名称")
public String partNameRdd;
@Column(name="BOM_UPDATE")
@ -123,4 +123,8 @@ public class WmsDocFgDetail extends BaseBean {
@Column(name="IS_LOCK")
@ApiParam(value = "是否锁定", example = "2")
public Integer isLock;
@Column(name="REMARK")
@ApiParam("备注")
public String remark;
}

@ -1,6 +1,7 @@
package cn.estsh.i3plus.pojo.wms.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -148,9 +149,9 @@ public class WmsMoveToERP extends BaseBean {
@ApiParam("交易类型")
public Integer busiTypeCode;
@Column(name = "IS_SYNC")
@Column(name = "IS_SYNC", nullable = false)
@ApiParam("是否同步")
public Integer isSync;
public Integer isSync = CommonEnumUtil.FALSE;
@ApiParam(value = "待出库数量", example = "0")
@Transient

@ -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