From 3c9183e42233f325b80df1a3ceac482d42971737 Mon Sep 17 00:00:00 2001 From: jokelone Date: Thu, 28 Nov 2019 20:19:32 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E3=80=90=E4=BB=BB=E5=8A=A1=EF=BC=9A1256?= =?UTF-8?q?=E5=B7=A5=E5=BA=8FBOM=E6=94=B9=E4=B8=BA=E5=B7=A5=E4=BD=8DBOM?= =?UTF-8?q?=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../i3plus/pojo/mes/pcn/bean/MesStationBom.java | 2 +- .../i3plus/pojo/mes/pcn/model/DefectModel.java | 49 ++++++++++++++++++++++ ...rocessBomModel.java => MesStationBomModel.java} | 8 ++-- .../estsh/i3plus/pojo/mes/bean/MesStationBom.java | 2 +- .../estsh/i3plus/pojo/mes/model/ProdOrgModel.java | 4 ++ 5 files changed, 59 insertions(+), 6 deletions(-) create mode 100644 modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/model/DefectModel.java rename modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/model/{MesProcessBomModel.java => MesStationBomModel.java} (91%) diff --git a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesStationBom.java b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesStationBom.java index 284358c..36a7f61 100644 --- a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesStationBom.java +++ b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesStationBom.java @@ -121,7 +121,7 @@ public class MesStationBom extends BaseBean { @Override public String toString() { - return "MesProcessBom{" + + return "MesStationBom{" + "partNo='" + partNo + '\'' + ", itemPartNo='" + itemPartNo + '\'' + ", qty=" + qty + diff --git a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/model/DefectModel.java b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/model/DefectModel.java new file mode 100644 index 0000000..83a9451 --- /dev/null +++ b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/model/DefectModel.java @@ -0,0 +1,49 @@ +package cn.estsh.i3plus.pojo.mes.pcn.model; + +import cn.estsh.i3plus.pojo.mes.pcn.bean.MesDefect; +import io.swagger.annotations.ApiParam; +import lombok.Data; + +import java.util.List; + +/** + * @Description: + * @Reference: + * @Author: joke.wang + * @CreateDate: 2019\11\28 19:50 + * @Modify: + **/ +@Data +public class DefectModel { + + private Long id; + + @ApiParam("缺陷代码") + private String defectCode; + + @ApiParam("缺陷名称") + private String defectName; + + @ApiParam("缺陷类型") + private String defectType; + + @ApiParam("缺陷类型名称") + private String defectTypeName; + + @ApiParam("缺陷位置") + private String defectLocation; + + @ApiParam("缺陷类型子集") + private List mesDefectList; + public DefectModel() { + + } + + public DefectModel(Long id, String defectCode, String defectName, String defectType, String defectTypeName) { + this.id = id; + this.defectCode = defectCode; + this.defectName = defectName; + this.defectType = defectType; + this.defectTypeName = defectTypeName; + } +} diff --git a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/model/MesProcessBomModel.java b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/model/MesStationBomModel.java similarity index 91% rename from modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/model/MesProcessBomModel.java rename to modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/model/MesStationBomModel.java index 86e92b4..e6504ec 100644 --- a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/model/MesProcessBomModel.java +++ b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/model/MesStationBomModel.java @@ -11,7 +11,7 @@ import lombok.Data; * @Modify: **/ @Data -public class MesProcessBomModel { +public class MesStationBomModel { private Long id; @ApiParam("子物料编码") @@ -40,11 +40,11 @@ public class MesProcessBomModel { @ApiParam("报废数") private Integer scrapQty; - public MesProcessBomModel() { + public MesStationBomModel() { } - public MesProcessBomModel(Long id, String itemPartNo, String itemPartName, Double qty, Integer isValid, Integer isDeleted, String organizeCode, Integer isFeed, String workCenterCode, String workCellCode, String parentPartNo, String parentPartName) { + public MesStationBomModel(Long id, String itemPartNo, String itemPartName, Double qty, Integer isValid, Integer isDeleted, String organizeCode, Integer isFeed, String workCenterCode, String workCellCode, String parentPartNo, String parentPartName) { this.id = id; this.itemPartNo = itemPartNo; this.itemPartName = itemPartName; @@ -59,7 +59,7 @@ public class MesProcessBomModel { this.parentPartName = parentPartName; } - public MesProcessBomModel(String itemPartNo, String itemPartName, Double qty, Integer isValid, Integer isDeleted, String organizeCode, Integer isFeed, String workCenterCode, String workCellCode, String parentPartNo, String parentPartName) { + public MesStationBomModel(String itemPartNo, String itemPartName, Double qty, Integer isValid, Integer isDeleted, String organizeCode, Integer isFeed, String workCenterCode, String workCellCode, String parentPartNo, String parentPartName) { this.itemPartNo = itemPartNo; this.itemPartName = itemPartName; this.qty = qty; 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..b66d940 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 @@ -110,7 +110,7 @@ public class MesStationBom extends BaseBean { @Override public String toString() { - return "MesProcessBom{" + + return "MesStationBom{" + "partNo='" + partNo + '\'' + ", itemPartNo='" + itemPartNo + '\'' + ", qty=" + qty + diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/ProdOrgModel.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/ProdOrgModel.java index 2d5ffd2..b668562 100644 --- a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/ProdOrgModel.java +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/model/ProdOrgModel.java @@ -66,4 +66,8 @@ public class ProdOrgModel extends BaseBean { @Transient @ApiParam("工位类型") private Integer workCellType; + + @Transient + @ApiParam("序号") + private Integer seq; } From 0e2b13d52f9bf21942be0384617f0e099a8a5bb5 Mon Sep 17 00:00:00 2001 From: jokelone Date: Thu, 28 Nov 2019 20:30:32 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E3=80=90=E4=BB=BB=E5=8A=A1=EF=BC=9A1258?= =?UTF-8?q?=E6=9E=9A=E4=B8=BE=E4=BC=98=E5=8C=96=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../i3plus/pojo/base/enumutil/MesPcnEnumUtil.java | 214 +++++++++++++++++++++ 1 file changed, 214 insertions(+) diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesPcnEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesPcnEnumUtil.java index 360c881..5bfb46b 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesPcnEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/MesPcnEnumUtil.java @@ -12,6 +12,220 @@ import org.apache.commons.lang3.StringUtils; **/ public class MesPcnEnumUtil { + + /** + * mes 工位Bom 是否可重复 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum MES_STATION_BOM_IS_REPEAT { + + REPEATABLE(1, "可重复"), + NOT_REPEAT(2, "不可重复"); + + private int value; + private String description; + + MES_STATION_BOM_IS_REPEAT(int value, String description) { + this.value = value; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + // 根据value返回枚举类型,主要在switch中使用 + public static MES_STATION_BOM_IS_REPEAT getByValue(int value) { + for (MES_STATION_BOM_IS_REPEAT mesInsertExcel : values()) { + if (mesInsertExcel.getValue() == value) { + return mesInsertExcel; + } + } + return null; + } + + + 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; + } + + } + + /** + * 系统配置表枚举 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum CONFIG_TYPE { + FASTDFS_SAVE_PATH(10, "SAVE_PATH", ""), + NGINX_HOST(20, "NGINX_HOST", ""), + MES_STATION_SOCKET(30, "mes_station_socket", ""), + GATEWAY_IP(40, "GATEWAY_HOST", ""), + UPDATE_SYNC_TIME(50, "SYNC_DATA_URL", "UPDATE_SYNC_TIME"), + PCN_PULL(60, "SYNC_DATA_URL", "PCN_PULL"), + PCN_PUSH(70, "SYNC_DATA_URL", "PCN_PUSH"), + FDFS_DOWNLOAD(80, "SYNC_DATA_URL", "FDFS_DOWNLOAD"), + REWORK_REPAIR(90, "REWORK_REPAIR", ""), + OPC_LINK_SERVER_URL(100, "OPC_LINK", "OPC_LINK_SERVER_URL"), + OPC_LINK_USERNAME(110, "OPC_LINK", "OPC_LINK_USERNAME"), + OPC_LINK_PASSWORD(120, "OPC_LINK", "OPC_LINK_PASSWORD"), + OPC_LINK_REALM(130, "OPC_LINK", "OPC_LINK_REALM"), + OPC_LINK_CALLBACK(140, "OPC_LINK", "OPC_LINK_CALLBACK"), + SUPPLY_SWITCH(150, "SUPPLY_SWITCH", ""), + PCN_LOGIN(160, "PCN_LOGIN", ""), + PCN_MENU(170, "PCN_MENU", ""), + PCN_MODULE(180, "PCN_MODULE", ""), + PCN_LOGOUT(190, "PCN_LOGOUT", ""); + + + private int value; + private String code; + private String description; + + CONFIG_TYPE(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; + } + + 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 动作类型 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum MES_ACTION_TYPE { + + BIND(10, "绑定"), + UNTYING(20, "解绑"); + + private int value; + private String description; + + MES_ACTION_TYPE(int value, String description) { + this.value = value; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + // 根据value返回枚举类型,主要在switch中使用 + public static MES_ACTION_TYPE getByValue(int value) { + for (MES_ACTION_TYPE mesInsertExcel : values()) { + if (mesInsertExcel.getValue() == value) { + return mesInsertExcel; + } + } + return null; + } + + + 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 是否是关键件 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum MES_IS_BIND_KEY { + + IS_BIND_KEY(1, "是"), + NO_BIND_KEY(2, "否"); + + private int value; + private String description; + + MES_IS_BIND_KEY(int value, String description) { + this.value = value; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + // 根据value返回枚举类型,主要在switch中使用 + public static MES_IS_BIND_KEY getByValue(int value) { + for (MES_IS_BIND_KEY mesInsertExcel : values()) { + if (mesInsertExcel.getValue() == value) { + return mesInsertExcel; + } + } + return null; + } + + + 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; + } + + } + /** * 接口同步状态 */