From 99b66e459d339508db96da6a125b311fe62fc6bc Mon Sep 17 00:00:00 2001 From: "jhforever.wang@estsh.com" Date: Thu, 28 Nov 2019 20:10:55 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E9=9C=80=E6=B1=82=EF=BC=9A1221?= =?UTF-8?q?=EF=BC=8C=E5=AF=BC=E5=85=A5=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../i3plus/pojo/base/enumutil/MesEnumUtil.java | 163 ++++++++++++++++++++- .../i3plus/pojo/mes/pcn/model/RequestModel.java | 10 ++ .../estsh/i3plus/pojo/mes/bean/MesStationBom.java | 4 +- .../estsh/i3plus/pojo/mes/model/RequestModel.java | 18 +++ 4 files changed, 187 insertions(+), 8 deletions(-) diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesEnumUtil.java index cb8dae6..3673841 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesEnumUtil.java @@ -1308,7 +1308,7 @@ public class MesEnumUtil { MES_SHIFT(180, "班次"), MES_SHIFT_GROUP(190, "班组"), MES_WORK_CELL_PARAM_CFG(200, "工作单元参数配置"), - MES_PROCESS_BOM(210, "工序BOM表"); + MES_STATION_BOM(210, "工位BOM表"); private int value; private String description; @@ -1461,10 +1461,10 @@ public class MesEnumUtil { } /** - * mes 工位类型 + * mes 工位Bom 是否可重复 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) - public enum MES_IS_REPEAT { + public enum MES_STATION_BOM_IS_REPEAT { REPEATABLE(1, "可重复"), NOT_REPEAT(2, "不可重复"); @@ -1472,7 +1472,7 @@ public class MesEnumUtil { private int value; private String description; - MES_IS_REPEAT(int value, String description) { + MES_STATION_BOM_IS_REPEAT(int value, String description) { this.value = value; this.description = description; } @@ -1486,8 +1486,8 @@ public class MesEnumUtil { } // 根据value返回枚举类型,主要在switch中使用 - public static MES_IS_REPEAT getByValue(int value) { - for (MES_IS_REPEAT mesInsertExcel : values()) { + public static MES_STATION_BOM_IS_REPEAT getByValue(int value) { + for (MES_STATION_BOM_IS_REPEAT mesInsertExcel : values()) { if (mesInsertExcel.getValue() == value) { return mesInsertExcel; } @@ -1506,6 +1506,157 @@ public class MesEnumUtil { return tmp; } + public static Integer descriptionOfValue(String description) { + Integer tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].description.equals(description)) { + tmp = values()[i].value; + } + } + return tmp; + } + + } + + /** + * mes 工位Bom 是否检查 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum MES_STATION_BOM_IS_CHECK { + + REPEATABLE(1, "是"), + NOT_REPEAT(2, "否"); + + private int value; + private String description; + + MES_STATION_BOM_IS_CHECK(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; + } + + public static Integer descriptionOfValue(String description) { + Integer tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].description.equals(description)) { + tmp = values()[i].value; + } + } + return tmp; + } + + } + + /** + * mes 工位Bom 是否投料配置 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum MES_STATION_BOM_IS_FEED { + + REPEATABLE(1, "是"), + NOT_REPEAT(2, "否"); + + private int value; + private String description; + + MES_STATION_BOM_IS_FEED(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; + } + + public static Integer descriptionOfValue(String description) { + Integer tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].description.equals(description)) { + tmp = values()[i].value; + } + } + return tmp; + } + + } + + /** + * mes 工位Bom 是否绑定关键件 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum MES_STATION_BOM_IS_BIND_KEY { + + REPEATABLE(1, "是"), + NOT_REPEAT(2, "否"); + + private int value; + private String description; + + MES_STATION_BOM_IS_BIND_KEY(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; + } + + public static Integer descriptionOfValue(String description) { + Integer tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].description.equals(description)) { + tmp = values()[i].value; + } + } + return tmp; + } + } /** diff --git a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/model/RequestModel.java b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/model/RequestModel.java index bec442b..45bf859 100644 --- a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/model/RequestModel.java +++ b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/model/RequestModel.java @@ -33,6 +33,8 @@ public class RequestModel { private Integer destStatus; // 目的状态 + private List orderNoList;//工单编号 + public RequestModel(List queueOrderList, Double currentSeq, Double nextSeq) { this.queueOrderList = queueOrderList; this.currentSeq = currentSeq; @@ -101,6 +103,14 @@ public class RequestModel { this.queueOrderList = queueOrderList; } + public void setOrderNoList(List orderNoList) { + this.orderNoList = orderNoList; + } + + public List getOrderNoList() { + return orderNoList; + } + public Double getCurrentSeq() { return currentSeq == null ? 0.0d : currentSeq; } diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesStationBom.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesStationBom.java index 233bf70..a0ab37f 100644 --- a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesStationBom.java +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesStationBom.java @@ -16,7 +16,7 @@ import javax.persistence.Table; import javax.persistence.Transient; /** - * @Description :工序物料清单 + * @Description :工位物料清单 * @Reference : * @Author : jack.jia * @CreateDate : 2019-04-02 @@ -28,7 +28,7 @@ import javax.persistence.Transient; @DynamicUpdate @EqualsAndHashCode(callSuper = true) @Table(name = "MES_STATION_BOM") -@Api("工序物料清单") +@Api("工位物料清单") public class MesStationBom extends BaseBean { @Column(name = "PART_NO") @ApiParam("零件号") diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/RequestModel.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/RequestModel.java index 91b5e18..1bada8a 100644 --- a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/RequestModel.java +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/RequestModel.java @@ -32,6 +32,10 @@ public class RequestModel { private Integer destStatus; // 目的状态 + private List orderNoList;//工单编号 + + private List requestBeanList;//工单下达 + public RequestModel(List queueOrderList, Double currentSeq, Double nextSeq) { this.queueOrderList = queueOrderList; this.currentSeq = currentSeq; @@ -84,6 +88,20 @@ public class RequestModel { this.queueOrderList = queueOrderList; } + public void setOrderNoList(List orderNoList) { + this.orderNoList = orderNoList; + } + + public List getOrderNoList() { + return orderNoList; + } + + public void setRequestBeanList(List requestBeanList) { + this.requestBeanList = requestBeanList; + } + + public List getRequestBeanList() { return requestBeanList; } + public Double getCurrentSeq() { return currentSeq == null ? 0.0d : currentSeq; }