diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/bean/BaseBean.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/bean/BaseBean.java index 6f6fcb2..58fc14d 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/bean/BaseBean.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/bean/BaseBean.java @@ -22,14 +22,13 @@ import java.io.Serializable; * @Modify: **/ @Data -@Entity +@MappedSuperclass +//@Entity //以子类table为准 -@javax.persistence.Inheritance(strategy=InheritanceType.TABLE_PER_CLASS) +//@javax.persistence.Inheritance(strategy=InheritanceType.TABLE_PER_CLASS) //@JsonInclude(value = JsonInclude.Include.NON_EMPTY) //""或null属性不参加序列转换 public abstract class BaseBean implements Serializable { - private static final long serialVersionUID = 1L; - //此处使用hibernate的主键策略方式 //手动设置,使用iplus-platform-common中的idtool生成 //将Long类型系列化成String避免精度丢失 @@ -130,7 +129,7 @@ public abstract class BaseBean implements Serializable { @ApiParam(value = "排序类型,1 正序,2 倒序",example = "1") @AnnoOutputColumn(hidden = true) //CommonEnumUtil.ASC_OR_DESC 1 asc,2 desc - public Integer ascOrDesc = 1; + public transient Integer ascOrDesc = 1; //排序方式 public String orderBy(){ diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesPcnEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesPcnEnumUtil.java new file mode 100644 index 0000000..68e18a9 --- /dev/null +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesPcnEnumUtil.java @@ -0,0 +1,86 @@ +package cn.estsh.i3plus.pojo.base.enumutil; + +import com.fasterxml.jackson.annotation.JsonFormat; + +/** + * @Description : + * @Reference : + * @Author : alwaysfrin + * @CreateDate : 2018-10-23 15:53 + * @Modify: + **/ +public class MesPcnEnumUtil { + /** + * PCN同步MES主数据同步方式枚举 + * 10. + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum SYNC_PATTERN{ + + UPDATE(1,"修改或新增"), + INSERT(2,"新增"); + + private int value; + private String description; + + SYNC_PATTERN(int value, String description) { + this.value = value; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + return tmp; + } + } + + /** + * PCN同步MES主数据同步类型枚举 + * 10. + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum SYNC_TYPE{ + + GET_MES_DATA(1,"pcn获取mes数据"), + DATA_TO_MES(2,"pcn推送数据至mes"); + + private int value; + private String description; + + SYNC_TYPE(int value, String description) { + this.value = value; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + public static String valueOfDescription(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].description; + } + } + return tmp; + } + } +} diff --git a/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfElement.java b/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfElement.java index 7f8fbae..8466ff9 100644 --- a/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfElement.java +++ b/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfElement.java @@ -105,6 +105,10 @@ public class BfElement extends BaseBean { private BfDataObject dataObject; @Transient + @ApiParam(value = "数据对象") + private BfElementProperty elementSortProperty; + + @Transient @ApiParam(value = "元素表单") private BfElementGrid elementGrid; diff --git a/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfElementTree.java b/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfElementTree.java index aefdef9..ef4c996 100644 --- a/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfElementTree.java +++ b/modules/i3plus-pojo-form/src/main/java/cn/estsh/i3plus/pojo/form/bean/BfElementTree.java @@ -42,16 +42,28 @@ public class BfElementTree extends BaseBean { @JsonSerialize(using = ToStringSerializer.class) private Long treeParentId; + @Column(name = "TREE_PARENT_RDD") + @ApiParam(value = "父级属性ID") + private String treeParentRdd; + @Column(name = "TREE_ATTR_NAME_ID") @ApiParam(value = "显示属性ID") @JsonSerialize(using = ToStringSerializer.class) private Long treeAttrNameId; + @Column(name = "TREE_ATTR_NAME_RDD") + @ApiParam(value = "显示属性ID") + private String treeAttrNameRdd; + @Column(name = "TREE_ATTR_VALUE_ID") @ApiParam(value = "取值属性ID") @JsonSerialize(using = ToStringSerializer.class) private Long treeAttrValueId; + @Column(name = "TREE_ATTR_VALUE_RDD") + @ApiParam(value = "取值属性ID") + private String treeAttrValueRdd; + @Column(name="TREE_IS_OPEN_ALL") @ApiParam(value ="是否全部展开") private Integer treeIsOpenAll; diff --git a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesPart.java b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesPart.java index 504a987..785ecb7 100644 --- a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesPart.java +++ b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesPart.java @@ -12,6 +12,7 @@ import org.hibernate.annotations.DynamicUpdate; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Table; +import javax.persistence.Transient; /** * @Description :物料信息 @@ -71,4 +72,8 @@ public class MesPart extends BaseBean { @Column(name="PRODUCE_CATEGORY") @ApiParam("产品类型") private String produceCategory; + + @Transient + @ApiParam("分类名称") + private String categoryName; } diff --git a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesPcn.java b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesPcn.java new file mode 100644 index 0000000..26b99b7 --- /dev/null +++ b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesPcn.java @@ -0,0 +1,46 @@ +package cn.estsh.i3plus.pojo.mes.pcn.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: yiming.gu + * @CreateDate:2019-04-22-17:20 + * @Modify: + **/ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name="MES_PCN") +@Api("PCN节点") +public class MesPcn extends BaseBean { + @Column(name="PCN_CODE") + @ApiParam("PCN代码") + private String pcnCode; + + @Column(name="PCN_NAME") + @ApiParam("PCN名称") + private String pcnName; + + @Column(name="AREA_CODE") + @ApiParam("区域") + private String areaCode; + + @Column(name="WORK_CENTER_CODE") + @ApiParam("工作中心") + private String workCentreCode; + +} diff --git a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesPcnSyncCfg.java b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesPcnSyncCfg.java new file mode 100644 index 0000000..b444b59 --- /dev/null +++ b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesPcnSyncCfg.java @@ -0,0 +1,80 @@ +package cn.estsh.i3plus.pojo.mes.pcn.bean; + +import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import com.fasterxml.jackson.annotation.JsonFormat; +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: yiming.gu + * @CreateDate:2019-04-22-17:32 + * @Modify: + **/ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name="MES_PCN_SYNC_CFG") +@Api("MES_PCN_同步配置") +public class MesPcnSyncCfg extends BaseBean { + @Column(name="PCN_CODE") + @ApiParam("PCN代码") + private String pcnCode; + + @Column(name="OBJECT_CODE") + @ApiParam("对象代码") + private String objectCode; + + @Column(name="OBJECT_NAME") + @ApiParam("对象名称") + private String objectName; + + @Column(name="OBJECT_KEY") + @ApiParam("对象主键") + private String objectKey; + + @Column(name="SYNC_FREQUENCY") + @ApiParam("同步频率") + private Integer syncFrequency; + + @Column(name="SYNC_TIME") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @ApiParam(value ="同步时间") + private String syncTime; + + @Column(name="SYNC_PATTERN")//2、新增 1、修改 + @ApiParam("同步方式") + private Integer syncPattern; + + @Column(name="SYNC_TYPE")//1\pcn获取mes数据 2、pcn推送数据至mes + @ApiParam("同步类型") + private Integer syncType; + + @Column(name="LAST_SYNC_TIME") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @ApiParam(value ="上一同步时间") + private String lastSyncTime; + + public int getSyncFrequencyVal() { + return this.syncFrequency == null ? 0 : this.syncFrequency; + } + + public int getSyncTypeVal() { + return this.syncType == null ? 0 : this.syncType; + } + + public int getSyncPatternVal() { + return this.syncPattern == null ? 0 : this.syncPattern; + } +} diff --git a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesPcnSyncErrorLog.java b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesPcnSyncErrorLog.java new file mode 100644 index 0000000..a2d045a --- /dev/null +++ b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesPcnSyncErrorLog.java @@ -0,0 +1,50 @@ +package cn.estsh.i3plus.pojo.mes.pcn.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: yiming.gu + * @CreateDate:2019-04-22-17:20 + * @Modify: + **/ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name="MES_PCN_SYNC_ERRORLOG") +@Api("MES_PCN同步异常日志") +public class MesPcnSyncErrorLog extends BaseBean { + @Column(name="PCN_CODE") + @ApiParam("PCN代码") + private String pcnCode; + + @Column(name="OBJECT_CODE") + @ApiParam("对象代码") + private String objectCode; + + @Column(name="OBJECT_NAME") + @ApiParam("对象名称") + private String objectName; + + @Column(name="ERROR_SPOT") + @ApiParam("异常位置") + private String errorSpot; + + @Column(name="ERROR_CONTENT") + @ApiParam("异常内容") + private String errorContent; + +} diff --git a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/repository/MesPcnSyncCfgRepository.java b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/repository/MesPcnSyncCfgRepository.java new file mode 100644 index 0000000..256e8da --- /dev/null +++ b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/repository/MesPcnSyncCfgRepository.java @@ -0,0 +1,16 @@ +package cn.estsh.i3plus.pojo.mes.pcn.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.mes.pcn.bean.MesPcnSyncCfg; +import org.springframework.stereotype.Repository; + +/** + * @Description: + * @Reference: + * @Author: yiming.gu + * @CreateDate:2019-04-24-17:13 + * @Modify: + **/ +@Repository +public interface MesPcnSyncCfgRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/repository/MesPcnSyncErrorLogRepository.java b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/repository/MesPcnSyncErrorLogRepository.java new file mode 100644 index 0000000..a217480 --- /dev/null +++ b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/repository/MesPcnSyncErrorLogRepository.java @@ -0,0 +1,16 @@ +package cn.estsh.i3plus.pojo.mes.pcn.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.mes.pcn.bean.MesPcnSyncErrorLog; +import org.springframework.stereotype.Repository; + +/** + * @Description: + * @Reference: + * @Author: yiming.gu + * @CreateDate:2019-04-24-17:13 + * @Modify: + **/ +@Repository +public interface MesPcnSyncErrorLogRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesObjectDao.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesObjectDao.java new file mode 100644 index 0000000..da55753 --- /dev/null +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesObjectDao.java @@ -0,0 +1,39 @@ +package cn.estsh.i3plus.pojo.mes.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 :MES_对象与dao对应关系 + * @Reference : + * @Author : yiming.gu + * @CreateDate : 2019-04-23 + * @Modify: + **/ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name="MES_OBJECT_DAO") +@Api("MES_对象与dao对应关系") +public class MesObjectDao extends BaseBean { + @Column(name="OBJECT_CODE") + @ApiParam("对象代码") + private String objectCode; + + @Column(name="DAO_CLASS") + @ApiParam("dao层类名") + private String daoClass; + +} diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesObjectDaoRepository.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesObjectDaoRepository.java new file mode 100644 index 0000000..d29df0f --- /dev/null +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesObjectDaoRepository.java @@ -0,0 +1,16 @@ +package cn.estsh.i3plus.pojo.mes.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.mes.bean.MesObjectDao; +import org.springframework.stereotype.Repository; + +/** + * @Description: + * @Reference: + * @Author: yiming.gu + * @CreateDate:2019-04-23 + * @Modify: + **/ +@Repository +public interface MesObjectDaoRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/form/ElementModel.java b/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/form/ElementModel.java index 82e59d5..822b260 100644 --- a/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/form/ElementModel.java +++ b/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/form/ElementModel.java @@ -1,5 +1,6 @@ package cn.estsh.i3plus.pojo.model.form; +import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn; import cn.estsh.i3plus.pojo.form.bean.*; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; @@ -7,6 +8,7 @@ import io.swagger.annotations.ApiParam; import lombok.Data; import javax.persistence.Column; +import javax.persistence.Transient; import java.util.List; /** @@ -36,6 +38,9 @@ public class ElementModel{ @ApiParam(value = "元素基础属性信息") private List propertyList; + @ApiParam(value = "元素查询排序") + private BfElementProperty propertySort; + @ApiParam(value = "元素基础虚拟属性信息") private List virtualList; @@ -51,4 +56,11 @@ public class ElementModel{ @ApiParam(value = "元素类型") private Integer elementType; + @ApiParam(value = "排序属性") + public String orderByParam; + + //CommonEnumUtil.ASC_OR_DESC 1 asc,2 desc + @ApiParam(value = "排序类型,1 正序,2 倒序",example = "1") + public Integer ascOrDesc = 1; + } diff --git a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrRefReportTypeset.java b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrRefReportTypeset.java index ff730f1..c329c15 100644 --- a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrRefReportTypeset.java +++ b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrRefReportTypeset.java @@ -59,7 +59,7 @@ public class BrRefReportTypeset extends BaseBean { /** * 关联元素或模板html */ - @Column(name = "REF_HTML") + @Column(name = "REF_HTML",columnDefinition = "TEXT") @ApiParam(value = "关联对象html") private String refHtml; diff --git a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrReport.java b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrReport.java index a88c054..f37e43e 100644 --- a/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrReport.java +++ b/modules/i3plus-pojo-report/src/main/java/cn/estsh/i3plus/pojo/report/bean/BrReport.java @@ -55,7 +55,7 @@ public class BrReport extends BaseBean { @ApiParam(value ="布局名称") private String layoutNameRdd; - @Column(name="LAYOUT_HTML") + @Column(name="LAYOUT_HTML",columnDefinition = "TEXT") @ApiParam(value ="报表html") private String reportHtml; diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsDocMovementDetails.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsDocMovementDetails.java index d075d60..adbb369 100644 --- a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsDocMovementDetails.java +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsDocMovementDetails.java @@ -174,13 +174,13 @@ public class WmsDocMovementDetails extends BaseBean { return recommondLot == null ? "无" : this.recommondLot; } - public Double getQty() {return qty == null ? 0L : this.qty.doubleValue(); } + public Double getQty() {return qty == null ? 0D : this.qty.doubleValue(); } - public Double getOutQty() {return outQty == null ? 0L : this.outQty.doubleValue(); } + public Double getOutQty() {return outQty == null ? 0D : this.outQty.doubleValue(); } - public Double getPickQty() {return pickQty == null ? 0L : this.pickQty.doubleValue(); } + public Double getPickQty() {return pickQty == null ? 0D : this.pickQty.doubleValue(); } - public Double getActualQty() {return actualQty == null ? 0L : this.actualQty.doubleValue(); } + public Double getActualQty() {return actualQty == null ? 0D : this.actualQty.doubleValue(); } }