From fb86682652a0481967403ac20e2616a96c7591b9 Mon Sep 17 00:00:00 2001 From: "jimmy.zeng" Date: Fri, 27 Sep 2019 17:28:47 +0800 Subject: [PATCH 1/3] =?UTF-8?q?VDA=20=E7=94=9F=E4=BA=A7=E5=BF=AB=E9=80=9F?= =?UTF-8?q?=E5=85=A5=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../i3plus/pojo/base/enumutil/WmsEnumUtil.java | 111 +++++++++++++++++++++ 1 file changed, 111 insertions(+) diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/WmsEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/WmsEnumUtil.java index c2f5c13..ae984f5 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/WmsEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/WmsEnumUtil.java @@ -3448,4 +3448,115 @@ public class WmsEnumUtil { } } + /** + * 物料关系信息 关联类型 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum PART_ASSOCIATE_TYPE { + LINE(10, "LINE", "产线"), + CUSTOMER(20, "CUSTOMER", "客户"), + VENDOR(30, "VENDOR", "供应商"); + + private int value; + private String code; + private String description; + + PART_ASSOCIATE_TYPE(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 valueOfDescription(int val) { + return valueOf(val); + } + + 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; + } + } + + /** + * 条码操作记录信息 操作类型 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum SN_OPERATE_TYPE { + REPORT(10, "REPORT", "生产报工"), + BOXING_ERROR_PROOFING(20, "BOXING_ERROR_PROOFING", "装箱防错"); + + private int value; + private String code; + private String description; + + SN_OPERATE_TYPE(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 valueOfDescription(int val) { + return valueOf(val); + } + + 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; + } + } + } \ No newline at end of file From eb70017396e5eb1b74ff7a0f143f0a093cd12c32 Mon Sep 17 00:00:00 2001 From: "wei.peng" <123456> Date: Fri, 27 Sep 2019 17:50:23 +0800 Subject: [PATCH 2/3] =?UTF-8?q?Xml=20=E8=A7=A3=E6=9E=90=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E9=87=8D=E8=AF=95=E6=9C=BA=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/estsh/i3plus/pojo/base/common/XStreamFactory.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/common/XStreamFactory.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/common/XStreamFactory.java index 6378c45..0d742da 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/common/XStreamFactory.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/common/XStreamFactory.java @@ -9,6 +9,8 @@ import com.thoughtworks.xstream.io.naming.NameCoder; import com.thoughtworks.xstream.io.naming.NoNameCoder; import com.thoughtworks.xstream.io.xml.PrettyPrintWriter; import com.thoughtworks.xstream.io.xml.XppDomDriver; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.io.Writer; import java.lang.reflect.Field; @@ -23,8 +25,13 @@ import java.lang.reflect.Field; **/ public class XStreamFactory { + private static final Logger LOGGER = LoggerFactory.getLogger(XStreamFactory.class); + private static final XStream xStream = XStreamFactory.getXStream(); + /* 转换重试次数 */ + private static final int RETRY_NUM = 3; + public static final String CDATA_PREFIX = ""; @@ -120,7 +127,14 @@ public class XStreamFactory { public static String toXml(T t) { xStream.processAnnotations(t.getClass()); String headLine = "\n"; - return headLine + xStream.toXML(t); + for (int i = 1; i < RETRY_NUM; i++) { + try { + return headLine + xStream.toXML(t); + }catch (Exception e){ + LOGGER.error("Bean To Xml Error Message:{} Number:{}",e.getMessage(),i); + } + } + return null; } /** From c509f3c707ae005ec8ed4962b957ec25ed29e8ee Mon Sep 17 00:00:00 2001 From: "jimmy.zeng" Date: Fri, 27 Sep 2019 18:06:29 +0800 Subject: [PATCH 3/3] =?UTF-8?q?VDA=20=E7=94=9F=E4=BA=A7=E5=BF=AB=E9=80=9F?= =?UTF-8?q?=E5=85=A5=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../i3plus/pojo/wms/bean/WmsPartRelation.java | 51 +++++++++++++++ .../i3plus/pojo/wms/bean/WmsSnOperateRecord.java | 75 ++++++++++++++++++++++ .../wms/repository/WmsPartRelationRepository.java | 16 +++++ .../repository/WmsSnOperateRecordRepository.java | 16 +++++ 4 files changed, 158 insertions(+) create mode 100644 modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPartRelation.java create mode 100644 modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsSnOperateRecord.java create mode 100644 modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/repository/WmsPartRelationRepository.java create mode 100644 modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/repository/WmsSnOperateRecordRepository.java diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPartRelation.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPartRelation.java new file mode 100644 index 0000000..b31d80a --- /dev/null +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPartRelation.java @@ -0,0 +1,51 @@ +package cn.estsh.i3plus.pojo.wms.bean; + +import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiParam; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +/** + * @Description : 物料关系表 + * @Reference : + * @Author : jimmy.zeng + * @CreateDate : 2019-09-27 14:44 + * @Modify: + **/ +@Data +@Entity +@Table(name="WMS_PART_RELATION") +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Api(value="物料关系表",description = "物料关系表") +public class WmsPartRelation extends BaseBean { + + @Column(name = "PART_NO") + @ApiParam(value = "物料编码") + private String partNo; + + @Column(name = "PART_NAME") + @ApiParam(value = "物料名称") + private String partName; + + @Column(name = "ASSOCIATE_CODE") + @ApiParam(value = "关联代码") + private String associateCode; + + @Column(name = "ASSOCIATE_NAME_ADD") + @ApiParam(value = "关联名称") + private String associateNameAdd; + + @Column(name = "ASSOCIATE_TYPE") + @ApiParam(value = "关联类型") + private Integer associateType; + +} diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsSnOperateRecord.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsSnOperateRecord.java new file mode 100644 index 0000000..5639a23 --- /dev/null +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsSnOperateRecord.java @@ -0,0 +1,75 @@ +package cn.estsh.i3plus.pojo.wms.bean; + +import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiParam; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +/** + * @Description : 条码操作记录表 + * @Reference : + * @Author : jimmy.zeng + * @CreateDate : 2019-09-27 16:58 + * @Modify: + **/ +@Data +@Entity +@Table(name="WMS_SN_OPERATE_RECORD") +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Api(value="条码操作记录表",description = "条码操作记录表") +public class WmsSnOperateRecord extends BaseBean { + + @Column(name = "SN") + @ApiParam(value = "条码") + private String sn; + + @Column(name = "LINE_CODE") + @ApiParam(value = "产线代码") + private String lineCode; + + @Column(name = "ZONE_NO") + @ApiParam(value = "存储区编号") + private String zoneNo; + + @Column(name = "LOCATE_NO") + @ApiParam(value = "库位代码") + private String locateNo; + + @Column(name = "QTY") + @ApiParam(value = "数量", example = "0") + private Double qty = 0d; + + @Column(name = "PART_NO") + @ApiParam(value = "物料编号") + private String partNo; + + @Column(name = "PART_NAME_RDD") + @ApiParam(value = "物料名称") + private String partNameRdd; + + @Column(name = "CUST_NO") + @ApiParam(value = "客户编码") + private String custNo; + + @Column(name = "VENDOR_NO") + @ApiParam(value = "供应商编码") + public String vendorNo; + + @Column(name = "SHIPPING_FLAG") + @ApiParam(value = "发往地") + private String shippingFlag; + + @Column(name = "OPERATE_TYPE") + @ApiParam(value = "操作类型") + private Integer operateType; + +} diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/repository/WmsPartRelationRepository.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/repository/WmsPartRelationRepository.java new file mode 100644 index 0000000..e2108ed --- /dev/null +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/repository/WmsPartRelationRepository.java @@ -0,0 +1,16 @@ +package cn.estsh.i3plus.pojo.wms.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.wms.bean.WmsPartRelation; +import org.springframework.stereotype.Repository; + +/** + * @Description : 物料关系信息 + * @Reference : + * @Author : jimmy.zeng + * @CreateDate : 2019-09-27 15:18 + * @Modify: + **/ +@Repository +public interface WmsPartRelationRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/repository/WmsSnOperateRecordRepository.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/repository/WmsSnOperateRecordRepository.java new file mode 100644 index 0000000..fc4f25d --- /dev/null +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/repository/WmsSnOperateRecordRepository.java @@ -0,0 +1,16 @@ +package cn.estsh.i3plus.pojo.wms.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.wms.bean.WmsSnOperateRecord; +import org.springframework.stereotype.Repository; + +/** + * @Description : 条码操作记录信息 + * @Reference : + * @Author : jimmy.zeng + * @CreateDate : 2019-09-27 17:07 + * @Modify: + **/ +@Repository +public interface WmsSnOperateRecordRepository extends BaseRepository { +}