Merge branch 'dev' of i3-IMPP/i3plus-pojo into test

yun-zuoyi
陆卫豪 6 years ago committed by nancy.li
commit 345374354b

@ -12,6 +12,38 @@ import com.fasterxml.jackson.annotation.JsonFormat;
public class MesEnumUtil { public class MesEnumUtil {
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum TRUE_OR_FALSE {
TRUE(1, "是"),
FALSE(2, "否");
private int value;
private String description;
TRUE_OR_FALSE(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;
}
}
/** /**
* - MES_PACK_SPEC * - MES_PACK_SPEC
* 10. * 10.
@ -172,7 +204,9 @@ public class MesEnumUtil {
this.description = description; this.description = description;
} }
public String getValue() { return value;} public String getValue() {
return value;
}
public String getDescription() { public String getDescription() {
return description; return description;

@ -1180,7 +1180,7 @@ public class MesPcnEnumUtil {
MATERIAL(30, "materials", "物料"), MATERIAL(30, "materials", "物料"),
ROUTE(40, "routes", "工艺"), ROUTE(40, "routes", "工艺"),
ONLINE_SIGNAL(50, "onlineSignal", "开线信号"), ONLINE_SIGNAL(50, "onlineSignal", "开线信号"),
MAKE_UP_SIGNAL(60, "makeUpSignal", "补偿信号"); ENVIRONMENT(60, "environment", "环境");
private int value; private int value;

@ -1,7 +1,7 @@
package cn.estsh.i3plus.pojo.mes.pcn.bean; package cn.estsh.i3plus.pojo.mes.pcn.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean; import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import com.fasterxml.jackson.annotation.JsonFormat; import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import lombok.Data; import lombok.Data;
@ -49,20 +49,18 @@ public class MesPcnSyncCfg extends BaseBean {
private Integer syncFrequency; private Integer syncFrequency;
@Column(name = "SYNC_TIME") @Column(name = "SYNC_TIME")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiParam(value = "同步时间") @ApiParam(value = "同步时间")
private String syncTime; private String syncTime;
@Column(name = "SYNC_PATTERN")//2.新增 1.修改 @Column(name = "SYNC_PATTERN")
@ApiParam("同步方式") @ApiParam("同步方式 2.新增 1.修改")
private Integer syncPattern; private Integer syncPattern;
@Column(name = "SYNC_TYPE")//1.pcn获取mes数据 2.pcn推送数据至mes @Column(name = "SYNC_TYPE")
@ApiParam("同步类型") @ApiParam("同步类型 1.pcn获取mes数据 2.pcn推送数据至mes")
private Integer syncType; private Integer syncType;
@Column(name = "LAST_SYNC_TIME") @Column(name = "LAST_SYNC_TIME")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiParam(value = "上一同步时间") @ApiParam(value = "上一同步时间")
private String lastSyncTime; private String lastSyncTime;
@ -74,6 +72,10 @@ public class MesPcnSyncCfg extends BaseBean {
@ApiParam(value = "从数据库抽取的条件限制") @ApiParam(value = "从数据库抽取的条件限制")
private String extractCondition; private String extractCondition;
@Column(name = "IS_IGNORE_ORG")
@ApiParam(value = "同步的时候是否区分工厂")
private Integer isIgnoreOrg = CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue();
public int getSyncFrequencyVal() { public int getSyncFrequencyVal() {
return this.syncFrequency == null ? 0 : this.syncFrequency; return this.syncFrequency == null ? 0 : this.syncFrequency;
} }

@ -1,7 +1,7 @@
package cn.estsh.i3plus.pojo.mes.bean; package cn.estsh.i3plus.pojo.mes.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean; import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import com.fasterxml.jackson.annotation.JsonFormat; import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import lombok.Data; import lombok.Data;
@ -28,6 +28,9 @@ import javax.persistence.Table;
@Table(name = "MES_PCN_SYNC_CFG") @Table(name = "MES_PCN_SYNC_CFG")
@Api("MES_PCN_同步配置") @Api("MES_PCN_同步配置")
public class MesPcnSyncCfg extends BaseBean { public class MesPcnSyncCfg extends BaseBean {
private static final long serialVersionUID = 7270930330576127126L;
@Column(name = "PCN_CODE") @Column(name = "PCN_CODE")
@ApiParam("PCN代码") @ApiParam("PCN代码")
private String pcnCode; private String pcnCode;
@ -49,20 +52,18 @@ public class MesPcnSyncCfg extends BaseBean {
private Integer syncFrequency; private Integer syncFrequency;
@Column(name = "SYNC_TIME") @Column(name = "SYNC_TIME")
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiParam(value = "同步时间") @ApiParam(value = "同步时间")
private String syncTime; private String syncTime;
@Column(name = "SYNC_PATTERN")//2、新增 1、修改 @Column(name = "SYNC_PATTERN")
@ApiParam("同步方式") @ApiParam("同步方式 2、新增 1、修改")
private Integer syncPattern; private Integer syncPattern;
@Column(name = "SYNC_TYPE")//1.pcn获取mes数据 2.pcn推送数据至mes @Column(name = "SYNC_TYPE")
@ApiParam("同步类型") @ApiParam("同步类型 1.pcn获取mes数据 2.pcn推送数据至mes")
private Integer syncType; private Integer syncType;
@Column(name = "LAST_SYNC_TIME") @Column(name = "LAST_SYNC_TIME")
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiParam(value = "上一同步时间") @ApiParam(value = "上一同步时间")
private String lastSyncTime; private String lastSyncTime;
@ -74,6 +75,14 @@ public class MesPcnSyncCfg extends BaseBean {
@ApiParam(value = "从数据库抽取的条件限制") @ApiParam(value = "从数据库抽取的条件限制")
private String extractCondition; private String extractCondition;
@Column(name = "IS_IGNORE_ORG")
@ApiParam(value = "同步的时候是否区分工厂")
private Integer isIgnoreOrg = CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue();
public int getIsIgnoreOrgVal() {
return this.isIgnoreOrg == null ? 0 : this.isIgnoreOrg;
}
public int getSyncFrequencyVal() { public int getSyncFrequencyVal() {
return this.syncFrequency == null ? 0 : this.syncFrequency; return this.syncFrequency == null ? 0 : this.syncFrequency;
} }

Loading…
Cancel
Save