From bbfcdfdd648e31001812326acbdfff3b5e551964 Mon Sep 17 00:00:00 2001 From: luweihao Date: Fri, 14 Feb 2020 14:53:32 +0800 Subject: [PATCH] =?UTF-8?q?ptl=20pojo=20=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../i3plus/pojo/base/enumutil/PtlPcnEnumUtil.java | 71 ++++++++++++++++++++-- .../pojo/mes/pcn/bean/MesNumberSerialno.java | 6 ++ .../pojo/mes/pcn/bean/MesWorkCellMonitorLog.java | 6 +- .../i3plus/pojo/mes/pcn/bean/MesWorkOrder.java | 10 +-- .../estsh/i3plus/pojo/mes/bean/MesWorkOrder.java | 8 +-- 5 files changed, 84 insertions(+), 17 deletions(-) diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/PtlPcnEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/PtlPcnEnumUtil.java index 674fede..8a3b947 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/PtlPcnEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/PtlPcnEnumUtil.java @@ -117,14 +117,16 @@ public class PtlPcnEnumUtil { @JsonFormat(shape = JsonFormat.Shape.OBJECT) public enum RouteType { - GEN_TASK(10, "生成任务"), - OFF_TAG(20, "灭灯"); + GEN_TASK(10, "GEN_TASK", "生成任务"), + OFF_TAG(20, "OFF_TAG", "灭灯"); private int value; + private String code; private String description; - RouteType(int value, String description) { + RouteType(int value, String code, String description) { this.value = value; + this.code = code; this.description = description; } @@ -132,6 +134,10 @@ public class PtlPcnEnumUtil { return value; } + public String getCode() { + return code; + } + public String getDescription() { return description; } @@ -141,7 +147,9 @@ public class PtlPcnEnumUtil { public enum MonitorProcessMessageType { CONNECT_CONTROL(10, "CONNECT_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 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; + } + } + } diff --git a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesNumberSerialno.java b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesNumberSerialno.java index 3938dbe..3be0723 100644 --- a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesNumberSerialno.java +++ b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesNumberSerialno.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.Version; import java.io.Serializable; /** @@ -40,4 +41,9 @@ public class MesNumberSerialno extends BaseBean implements Serializable { @Column(name = "CURRENT_NUMBER") @ApiParam("当前编号") private String currentNumber; + + @Version + @Column(name = "LOCK_VERSION") + @ApiParam(value = "乐观锁", example = "1") + public Integer lockVersion; } diff --git a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesWorkCellMonitorLog.java b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesWorkCellMonitorLog.java index 3ef3027..8047c46 100644 --- a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesWorkCellMonitorLog.java +++ b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesWorkCellMonitorLog.java @@ -9,10 +9,7 @@ import lombok.EqualsAndHashCode; import org.hibernate.annotations.DynamicInsert; import org.hibernate.annotations.DynamicUpdate; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Index; -import javax.persistence.Table; +import javax.persistence.*; import java.io.Serializable; /** @@ -60,6 +57,7 @@ public class MesWorkCellMonitorLog extends BaseBean implements Serializable { @ApiParam("流程") private String routeCOde; + @Lob @Column(name = "MESSAGE") @ApiParam("异常信息") private String message; diff --git a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesWorkOrder.java b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesWorkOrder.java index fe11f2f..956a931 100644 --- a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesWorkOrder.java +++ b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesWorkOrder.java @@ -27,7 +27,7 @@ import java.io.Serializable; @Table(name = "MES_WORK_ORDER", indexes = {@Index(columnList = "ORDER_NO") }, uniqueConstraints = { @UniqueConstraint(columnNames = {"ORGANIZE_CODE", "ORDER_NO", "PART_NO"}) - } +} ) @Api("生产工单") public class MesWorkOrder extends BaseBean implements Serializable { @@ -152,10 +152,10 @@ public class MesWorkOrder extends BaseBean implements Serializable { @ApiParam("首检生成数量") private Double fiGenerateQty; -// @Version -// @Column(name = "LOCK_VERSION") -// @ApiParam(value = "乐观锁", example = "1") -// public transient Integer lockVersion; + @Version + @Column(name = "LOCK_VERSION") + @ApiParam(value = "乐观锁", example = "1") + public Integer lockVersion; /********************** 冗余字段 *********************************/ @Transient diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesWorkOrder.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesWorkOrder.java index 6e3bfb8..7633f77 100644 --- a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesWorkOrder.java +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesWorkOrder.java @@ -152,10 +152,10 @@ public class MesWorkOrder extends BaseBean implements Serializable { @ApiParam("首检生成数量") private Double fiGenerateQty; -// @Version -// @Column(name = "LOCK_VERSION") -// @ApiParam(value = "乐观锁", example = "1") -// public transient Integer lockVersion; + @Version + @Column(name = "LOCK_VERSION") + @ApiParam(value = "乐观锁", example = "1") + public Integer lockVersion; /********************** 冗余字段 *********************************/ @Transient