ptl pojo 提交

yun-zuoyi
luweihao 5 years ago
parent 717b72e086
commit bbfcdfdd64

@ -117,14 +117,16 @@ public class PtlPcnEnumUtil {
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum RouteType { public enum RouteType {
GEN_TASK(10, "生成任务"), GEN_TASK(10, "GEN_TASK", "生成任务"),
OFF_TAG(20, "灭灯"); OFF_TAG(20, "OFF_TAG", "灭灯");
private int value; private int value;
private String code;
private String description; private String description;
RouteType(int value, String description) { RouteType(int value, String code, String description) {
this.value = value; this.value = value;
this.code = code;
this.description = description; this.description = description;
} }
@ -132,6 +134,10 @@ public class PtlPcnEnumUtil {
return value; return value;
} }
public String getCode() {
return code;
}
public String getDescription() { public String getDescription() {
return description; return description;
} }
@ -141,7 +147,9 @@ public class PtlPcnEnumUtil {
public enum MonitorProcessMessageType { public enum MonitorProcessMessageType {
CONNECT_CONTROL(10, "CONNECT_CONTROL", "连接控制器"), CONNECT_CONTROL(10, "CONNECT_CONTROL", "连接控制器"),
DISCONNECT_CONTROL(20, "DISCONNECT_CONTROL", "断开控制器"), DISCONNECT_CONTROL(20, "DISCONNECT_CONTROL", "断开控制器"),
LIGHT_ON_CMD(30, "LIGHT_ON_CMD", "亮灯命令"); LIGHT_ON_CMD(30, "LIGHT_ON_CMD", "亮灯命令"),
LIGHT_OFF_CMD(40, "LIGHT_OFF_CMD", "灭灯命令"),
INTERFACE_FEEDBACK(100, "INTERFACE_FEEDBACK", "发送给界面actor通过websocket返回");
private int value; private int value;
private String code; private String code;
@ -178,4 +186,59 @@ public class PtlPcnEnumUtil {
} }
} }
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum WsBusiType {
MONITOR_PROCESS(10, "MONITOR_PROCESS", "控制器相关");
private int value;
private String code;
private String description;
WsBusiType(int value, String code, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getCode() {
return code;
}
public String getDescription() {
return description;
}
}
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum WsDataType {
TEXT(10, "TEXT", "正常信息"),
EXP_TEXT(20, "EXP_TEXT", "异常信息"),
TABLE(30, "TABLE", "表格");
private int value;
private String code;
private String description;
WsDataType(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public int getValue() {
return value;
}
public String getCode() {
return code;
}
public String getDescription() {
return description;
}
}
} }

@ -12,6 +12,7 @@ import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Table; import javax.persistence.Table;
import javax.persistence.Version;
import java.io.Serializable; import java.io.Serializable;
/** /**
@ -40,4 +41,9 @@ public class MesNumberSerialno extends BaseBean implements Serializable {
@Column(name = "CURRENT_NUMBER") @Column(name = "CURRENT_NUMBER")
@ApiParam("当前编号") @ApiParam("当前编号")
private String currentNumber; private String currentNumber;
@Version
@Column(name = "LOCK_VERSION")
@ApiParam(value = "乐观锁", example = "1")
public Integer lockVersion;
} }

@ -9,10 +9,7 @@ import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert; import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate; import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column; import javax.persistence.*;
import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;
import java.io.Serializable; import java.io.Serializable;
/** /**
@ -60,6 +57,7 @@ public class MesWorkCellMonitorLog extends BaseBean implements Serializable {
@ApiParam("流程") @ApiParam("流程")
private String routeCOde; private String routeCOde;
@Lob
@Column(name = "MESSAGE") @Column(name = "MESSAGE")
@ApiParam("异常信息") @ApiParam("异常信息")
private String message; private String message;

@ -27,7 +27,7 @@ import java.io.Serializable;
@Table(name = "MES_WORK_ORDER", indexes = {@Index(columnList = "ORDER_NO") @Table(name = "MES_WORK_ORDER", indexes = {@Index(columnList = "ORDER_NO")
}, uniqueConstraints = { }, uniqueConstraints = {
@UniqueConstraint(columnNames = {"ORGANIZE_CODE", "ORDER_NO", "PART_NO"}) @UniqueConstraint(columnNames = {"ORGANIZE_CODE", "ORDER_NO", "PART_NO"})
} }
) )
@Api("生产工单") @Api("生产工单")
public class MesWorkOrder extends BaseBean implements Serializable { public class MesWorkOrder extends BaseBean implements Serializable {
@ -152,10 +152,10 @@ public class MesWorkOrder extends BaseBean implements Serializable {
@ApiParam("首检生成数量") @ApiParam("首检生成数量")
private Double fiGenerateQty; private Double fiGenerateQty;
// @Version @Version
// @Column(name = "LOCK_VERSION") @Column(name = "LOCK_VERSION")
// @ApiParam(value = "乐观锁", example = "1") @ApiParam(value = "乐观锁", example = "1")
// public transient Integer lockVersion; public Integer lockVersion;
/********************** 冗余字段 *********************************/ /********************** 冗余字段 *********************************/
@Transient @Transient

@ -152,10 +152,10 @@ public class MesWorkOrder extends BaseBean implements Serializable {
@ApiParam("首检生成数量") @ApiParam("首检生成数量")
private Double fiGenerateQty; private Double fiGenerateQty;
// @Version @Version
// @Column(name = "LOCK_VERSION") @Column(name = "LOCK_VERSION")
// @ApiParam(value = "乐观锁", example = "1") @ApiParam(value = "乐观锁", example = "1")
// public transient Integer lockVersion; public Integer lockVersion;
/********************** 冗余字段 *********************************/ /********************** 冗余字段 *********************************/
@Transient @Transient

Loading…
Cancel
Save