From bc13a8a3accb4757a8dcca07881c64ec30e7ce1a Mon Sep 17 00:00:00 2001 From: jokelone Date: Tue, 29 Oct 2019 17:52:41 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E9=9C=80=E6=B1=82=EF=BC=9A1090=20?= =?UTF-8?q?=E8=BF=94=E5=8E=82=E8=BF=94=E4=BF=AE=E5=A2=9E=E5=8A=A0=E5=88=86?= =?UTF-8?q?=E9=A1=B5=E6=9F=A5=E8=AF=A2=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../i3plus/pojo/base/enumutil/MesEnumUtil.java | 37 +++++++++++ .../i3plus/pojo/base/enumutil/MesPcnEnumUtil.java | 76 ++++++++++++++++++++++ .../i3plus/pojo/mes/pcn/bean/MesDefectRecord.java | 4 ++ .../estsh/i3plus/pojo/mes/pcn/bean/MesScrap.java | 4 ++ .../i3plus/pojo/mes/pcn/bean/MesScrapRecord.java | 4 -- .../pojo/mes/pcn/model/MesProdBindRecordModel.java | 32 +++++++++ .../i3plus/pojo/mes/pcn/sqlpack/MesHqlPack.java | 60 +++++++++++++++++ 7 files changed, 213 insertions(+), 4 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 856f7c2..8403580 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 @@ -12,6 +12,43 @@ import com.fasterxml.jackson.annotation.JsonFormat; public class MesEnumUtil { /** + * MesScrap 报废原因 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum SCRAP_TYPE { + + SCRAP_TYPE(10, "过期"), + SCRAP_TYPE2(20, "不合格"), + SCRAP_TYPE3(30, "缺失"); + + private int value; + private String description; + + SCRAP_TYPE(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 图片面位 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) 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 0b2d4a4..c7a0b65 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,82 @@ import org.apache.commons.lang3.StringUtils; **/ public class MesPcnEnumUtil { + + /** + * MesScrap 报废原因 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum SCRAP_TYPE { + + SCRAP_TYPE(10, "过期"), + SCRAP_TYPE2(20, "不合格"), + SCRAP_TYPE3(30, "缺失"); + + private int value; + private String description; + + SCRAP_TYPE(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; + } + } + + /** + * MesProduceSn实体对应的qcStatus值 条码表条码质量状态 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum PRODUCE_SN_QC_STATUS { + + QUALIFIED(10, "合格"), + DEFECTED(20, "不合格"), + SCRAPED(30, "报废"), + DISMANTLED(40, "已拆解"); + + private int value; + private String description; + + PRODUCE_SN_QC_STATUS(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 工位类型 */ diff --git a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesDefectRecord.java b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesDefectRecord.java index 53f4b36..30c641c 100644 --- a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesDefectRecord.java +++ b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesDefectRecord.java @@ -53,6 +53,10 @@ public class MesDefectRecord extends BaseBean { @ApiParam("缺陷位置") private String defectLocation; + @Column(name = "SIDE_LOCATION") + @ApiParam("面位") + private String sideLocation; + @Column(name="REPAIR_STATUS") @ApiParam("维修状态") private Integer repairStatus; diff --git a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesScrap.java b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesScrap.java index cad4af5..c42611a 100644 --- a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesScrap.java +++ b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesScrap.java @@ -36,4 +36,8 @@ public class MesScrap extends BaseBean { @ApiParam("报废名称") private String scrapName; + @Column(name = "SCRAP_TYPE") + @ApiParam("报废类型") + private String scrapType; + } diff --git a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesScrapRecord.java b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesScrapRecord.java index 2c60f7a..46b20b1 100644 --- a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesScrapRecord.java +++ b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesScrapRecord.java @@ -60,10 +60,6 @@ public class MesScrapRecord extends BaseBean { @ApiParam("工位") private String workCellCode; - @Column(name = "SCRAP_REASON") - @ApiParam("报废原因") - private String scrapReason; - @Column(name = "MEMO") @ApiParam("备注") private String memo; diff --git a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/model/MesProdBindRecordModel.java b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/model/MesProdBindRecordModel.java index aaa7497..8736abb 100644 --- a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/model/MesProdBindRecordModel.java +++ b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/model/MesProdBindRecordModel.java @@ -36,6 +36,16 @@ public class MesProdBindRecordModel { private Integer missQty; @ApiParam("报废数") private Integer scrapQty; + @ApiParam("创建时间") + private String createUser; + @ApiParam("创建时间") + private String createDatetime; + @ApiParam("修改人") + private String modifyUser; + @ApiParam("修改时间") + private String modifyDatetime; + @ApiParam("产品条码") + private String serialNumber; public MesProdBindRecordModel() { } @@ -72,4 +82,26 @@ public class MesProdBindRecordModel { this.parentPartNo = parentPartNo; this.parentPartName = parentPartName; } + + public MesProdBindRecordModel(Long id, String itemPartNo, String itemPartName, Double qty, Integer isValid, Integer isDeleted, String organizeCode, Integer isFeed, String workCenterCode, String workCellCode, String kpSn, String parentPartNo, String parentPartName, String createUser, String createDatetime, String modifyUser, String modifyDatetime, String serialNumber) { + this.id = id; + this.itemPartNo = itemPartNo; + this.itemPartName = itemPartName; + this.qty = qty; + this.isValid = isValid; + this.isDeleted = isDeleted; + this.organizeCode = organizeCode; + this.isFeed = isFeed; + this.workCenterCode = workCenterCode; + this.workCellCode = workCellCode; + this.kpSn = kpSn; + this.parentPartNo = parentPartNo; + this.parentPartName = parentPartName; + this.createUser = createUser; + this.createDatetime = createDatetime; + this.modifyUser = modifyUser; + this.modifyDatetime = modifyDatetime; + this.serialNumber = serialNumber; + } + } diff --git a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/sqlpack/MesHqlPack.java b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/sqlpack/MesHqlPack.java index c9a071a..82ef884 100644 --- a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/sqlpack/MesHqlPack.java +++ b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/sqlpack/MesHqlPack.java @@ -220,4 +220,64 @@ public class MesHqlPack { return packBean; } + /** + * MES PCN系维修信息条件查询 + * + * @param mesRepair + * @return + */ + public static DdlPackBean getMesRepair(MesRepair mesRepair, String organizeCode) { + DdlPackBean packBean = getAllBaseData(organizeCode); + if (StringUtils.isNotEmpty(mesRepair.getRepairCode())) { + DdlPreparedPack.getStringLikerPack(mesRepair.getRepairCode(), "repairCode", packBean); + } + if (StringUtils.isNotEmpty(mesRepair.getRepairName())) { + DdlPreparedPack.getStringLikerPack(mesRepair.getRepairName(), "repairName", packBean); + } + if (mesRepair.getRepairType() != null) { + DdlPreparedPack.getNumEqualPack(mesRepair.getRepairType(), "repairType", packBean); + } + return packBean; + } + + /** + * MES PCN系维修信息条件查询 + * + * @param mesScrap + * @return + */ + public static DdlPackBean getMesScrap(MesScrap mesScrap, String organizeCode) { + DdlPackBean packBean = getAllBaseData(organizeCode); + if (StringUtils.isNotEmpty(mesScrap.getScrapCode())) { + DdlPreparedPack.getStringLikerPack(mesScrap.getScrapCode(), "scrapCode", packBean); + } + if (StringUtils.isNotEmpty(mesScrap.getScrapName())) { + DdlPreparedPack.getStringLikerPack(mesScrap.getScrapName(), "scrapName", packBean); + } + if (StringUtils.isNotEmpty(mesScrap.getScrapType())) { + DdlPreparedPack.getStringLikerPack(mesScrap.getScrapType(), "scrapType", packBean); + } + return packBean; + } + + /** + * MES PCN缺陷原因信息条件查询 + * + * @param mesDefectCause + * @return + */ + public static DdlPackBean getMesDefectCause(MesDefectCause mesDefectCause, String organizeCode) { + DdlPackBean packBean = getAllBaseData(organizeCode); + if (StringUtils.isNotEmpty(mesDefectCause.getDcCode())) { + DdlPreparedPack.getStringLikerPack(mesDefectCause.getDcCode(), "dcCode", packBean); + } + if (StringUtils.isNotEmpty(mesDefectCause.getDcName())) { + DdlPreparedPack.getStringLikerPack(mesDefectCause.getDcName(), "dcName", packBean); + } + if (mesDefectCause.getDcType() != null) { + DdlPreparedPack.getNumEqualPack(mesDefectCause.getDcType(), "dcType", packBean); + } + return packBean; + } + }