Merge branch 'dev' into test

yun-zuoyi
jenkins 6 years ago
commit 99382a8fca

@ -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 = "<![CDATA[";
public static final String CDATA_SUFFIX = "]]>";
@ -120,7 +127,14 @@ public class XStreamFactory {
public static <T> String toXml(T t) {
xStream.processAnnotations(t.getClass());
String headLine = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
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;
}
/**

@ -3518,4 +3518,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;
}
}
}

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

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

@ -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<WmsPartRelation, Long> {
}

@ -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<WmsSnOperateRecord, Long> {
}
Loading…
Cancel
Save