Merge remote-tracking branch 'remotes/origin/dev' into test
commit
f8b89c930b
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
@ -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;
|
||||
|
||||
}
|
@ -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;
|
||||
}
|
||||
}
|
@ -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;
|
||||
|
||||
}
|
@ -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<MesPcnSyncCfg, Long> {
|
||||
}
|
@ -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<MesPcnSyncErrorLog, Long> {
|
||||
}
|
@ -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;
|
||||
|
||||
}
|
@ -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<MesObjectDao, Long> {
|
||||
}
|
Loading…
Reference in New Issue