diff --git a/modules/i3plus-pojo-andon/src/main/java/cn/estsh/i3plus/pojo/andon/bean/AndonManageQueue.java b/modules/i3plus-pojo-andon/src/main/java/cn/estsh/i3plus/pojo/andon/bean/AndonManageQueue.java index a58c464..674dd65 100644 --- a/modules/i3plus-pojo-andon/src/main/java/cn/estsh/i3plus/pojo/andon/bean/AndonManageQueue.java +++ b/modules/i3plus-pojo-andon/src/main/java/cn/estsh/i3plus/pojo/andon/bean/AndonManageQueue.java @@ -157,6 +157,10 @@ public class AndonManageQueue extends BaseBean { @ApiParam(value = "解决人") private String resetUser; + @Column(name = "SOURCE_TYPE") + @ApiParam(value = "安灯来源类型") + private String sourceType = AndonEnumUtil.ALARM_SOURCE_TYPE.SOFT.getValue(); + @Transient @ApiParam(value = "解决人名字") private String resetUserName; @@ -279,6 +283,10 @@ public class AndonManageQueue extends BaseBean { @ApiParam(value = "发送标志") private String sendFlag; + @Column(name = "SIGN_SEND_FLAG") + @ApiParam(value = "响应已通知标识") + private String signSendFlag; + /** * 处理类型:10=标准处理,20=自处理 */ @@ -325,6 +333,10 @@ public class AndonManageQueue extends BaseBean { @ApiParam(value = "驳回意见") private String rejectOpinion; + @Column(name = "OPEN_INFO") + @ApiParam(value = "放行说明") + private String openInfo; + @Transient @ApiParam(value = "安灯状态集合") private List statusCodeList; diff --git a/modules/i3plus-pojo-andon/src/main/java/cn/estsh/i3plus/pojo/andon/bean/AndonManageRecord.java b/modules/i3plus-pojo-andon/src/main/java/cn/estsh/i3plus/pojo/andon/bean/AndonManageRecord.java index f1fa3f0..b7aef8e 100644 --- a/modules/i3plus-pojo-andon/src/main/java/cn/estsh/i3plus/pojo/andon/bean/AndonManageRecord.java +++ b/modules/i3plus-pojo-andon/src/main/java/cn/estsh/i3plus/pojo/andon/bean/AndonManageRecord.java @@ -264,6 +264,10 @@ public class AndonManageRecord extends BaseBean { @ApiParam(value = "驳回意见") private String rejectOpinion; + @Column(name = "OPEN_INFO") + @ApiParam(value = "放行说明") + private String openInfo; + // 是否转呼 public Integer getIsShiftCall() { return this.isShiftCall == null ? 0 : this.isShiftCall; diff --git a/modules/i3plus-pojo-andon/src/main/java/cn/estsh/i3plus/pojo/andon/bean/AndonQueueAttach.java b/modules/i3plus-pojo-andon/src/main/java/cn/estsh/i3plus/pojo/andon/bean/AndonQueueAttach.java new file mode 100644 index 0000000..778baae --- /dev/null +++ b/modules/i3plus-pojo-andon/src/main/java/cn/estsh/i3plus/pojo/andon/bean/AndonQueueAttach.java @@ -0,0 +1,46 @@ +package cn.estsh.i3plus.pojo.andon.bean; + +import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiParam; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +/** + * @Description : 安灯任务附属表 + * @Reference : + * @Author : crish + * @CreateDate : 2019-09-27 19:58 + * @Modify: + **/ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name="ANDON_MANAGE_ATTACH") +@Api(value="安灯任务附属信息") +public class AndonQueueAttach extends BaseBean { + + @Column(name="PROD_INFO") + @ApiParam(value ="产品信息" , example ="-1") + private String prodInfo; + + @Column(name="LINE_INFO") + @ApiParam(value ="产线信息") + private String lineInfo; + + @Column(name="ANDON_ORDER_NO") + @ApiParam(value ="安灯任务编号") + private String andonOrderNo; + + @Column(name="STATUS_CODE") + @ApiParam(value ="安灯状态") + private String statusCode; +} diff --git a/modules/i3plus-pojo-andon/src/main/java/cn/estsh/i3plus/pojo/andon/bean/MesWorkCell.java b/modules/i3plus-pojo-andon/src/main/java/cn/estsh/i3plus/pojo/andon/bean/MesWorkCell.java index 7b95b63..e8f4a03 100644 --- a/modules/i3plus-pojo-andon/src/main/java/cn/estsh/i3plus/pojo/andon/bean/MesWorkCell.java +++ b/modules/i3plus-pojo-andon/src/main/java/cn/estsh/i3plus/pojo/andon/bean/MesWorkCell.java @@ -49,6 +49,10 @@ public class MesWorkCell extends BaseBean { private String areaCode; @Transient + @ApiParam(value ="工作单元中安灯队列标识") + private String workCellSignal; + + @Transient @ApiParam(value ="子集列表") @AnnoOutputColumn(hidden = true) private List childTreeList; diff --git a/modules/i3plus-pojo-andon/src/main/java/cn/estsh/i3plus/pojo/andon/repository/IAndonQueueAttachRepository.java b/modules/i3plus-pojo-andon/src/main/java/cn/estsh/i3plus/pojo/andon/repository/IAndonQueueAttachRepository.java new file mode 100644 index 0000000..d36bc9f --- /dev/null +++ b/modules/i3plus-pojo-andon/src/main/java/cn/estsh/i3plus/pojo/andon/repository/IAndonQueueAttachRepository.java @@ -0,0 +1,17 @@ +package cn.estsh.i3plus.pojo.andon.repository; + +import cn.estsh.i3plus.pojo.andon.bean.AndonAlarmCause; +import cn.estsh.i3plus.pojo.andon.bean.AndonQueueAttach; +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import org.springframework.stereotype.Repository; + +/** + * @Description : 安灯附属表 + * @Reference : + * @Author : crish + * @CreateDate : 2019-09-28 + * @Modify: + **/ +@Repository +public interface IAndonQueueAttachRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/bean/BaseBean.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/bean/BaseBean.java index 716a027..457b27d 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/bean/BaseBean.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/bean/BaseBean.java @@ -134,7 +134,7 @@ public abstract class BaseBean implements Serializable { String result = ""; if (orderByParam!=null&&orderByParam.trim().length()>0) { result = " order by " + orderByParam; - if(ascOrDesc!= null && ascOrDesc == CommonEnumUtil.ASC_OR_DESC.ASC.getValue()) { + if(ascOrDesc == CommonEnumUtil.ASC_OR_DESC.ASC.getValue()) { result += " asc"; }else{ result += " desc"; diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/common/XStreamFactory.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/common/XStreamFactory.java index 6378c45..0d742da 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/common/XStreamFactory.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/common/XStreamFactory.java @@ -9,6 +9,8 @@ import com.thoughtworks.xstream.io.naming.NameCoder; import com.thoughtworks.xstream.io.naming.NoNameCoder; import com.thoughtworks.xstream.io.xml.PrettyPrintWriter; import com.thoughtworks.xstream.io.xml.XppDomDriver; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.io.Writer; import java.lang.reflect.Field; @@ -23,8 +25,13 @@ import java.lang.reflect.Field; **/ public class XStreamFactory { + private static final Logger LOGGER = LoggerFactory.getLogger(XStreamFactory.class); + private static final XStream xStream = XStreamFactory.getXStream(); + /* 转换重试次数 */ + private static final int RETRY_NUM = 3; + public static final String CDATA_PREFIX = ""; @@ -120,7 +127,14 @@ public class XStreamFactory { public static String toXml(T t) { xStream.processAnnotations(t.getClass()); String headLine = "\n"; - return headLine + xStream.toXML(t); + for (int i = 1; i < RETRY_NUM; i++) { + try { + return headLine + xStream.toXML(t); + }catch (Exception e){ + LOGGER.error("Bean To Xml Error Message:{} Number:{}",e.getMessage(),i); + } + } + return null; } /** diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/AndonEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/AndonEnumUtil.java index cc0ebe0..d3688eb 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/AndonEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/AndonEnumUtil.java @@ -58,6 +58,51 @@ public class AndonEnumUtil { } /** + * 标准类型 = 10,异常类型 = 20 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum WORK_CELL_TYPE{ + NORMAL("10","标准类型"), + ABNORMAL("20","异常类型"); + + private String value; + private String description; + + WORK_CELL_TYPE(String value, String description) { + this.value = value; + this.description = description; + } + + public String getValue() { + return value; + } + + public String getDescription() { + return description; + } + + public static String valueOfDescription(String val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (StringUtils.equalsIgnoreCase(values()[i].value,val)) { + tmp = values()[i].description; + } + } + return tmp; + } + + public static String descriptionOfValue(String val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (StringUtils.equalsIgnoreCase(values()[i].description, val)) { + tmp = values()[i].value; + } + } + return tmp; + } + } + + /** * 审批状态:10=待审批,20=二级审批,30=三级审批,40=四级审批,100=已审批 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) @@ -199,7 +244,7 @@ public class AndonEnumUtil { /** * 按灯业务状态 - * 安灯状态=10,工号 =20 ,读取状态=30, 停线=40, 安灯子类型=50, 原因代码=60 + * 安灯状态=10,工号 =20 ,读取状态=30, 停线=40, 安灯子类型=50, 原因代码=60, 产品信息=70, 产品产量=80 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) public enum ALARM_BUSI_FLAG{ @@ -208,7 +253,9 @@ public class AndonEnumUtil { READ_FLAG("30", "安灯读取状态"), STOP_FLAG("40", "停线状态"), DETAIL_TYPE("50", "安灯子类型"), - AC_CODE("60", "原因代码"); + AC_CODE("60", "原因代码"), + PROD_INFO("70", "产品信息"), + LINE_INFO("80", "产量信息"); private String value; private String description; @@ -362,6 +409,51 @@ public class AndonEnumUtil { } } + /** + * 安灯来源 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum ALARM_SOURCE_TYPE{ + PHYSICAL("10","物理安灯"), + SOFT("20","软件安灯"); + + private String value; + private String description; + + ALARM_SOURCE_TYPE(String value, String description) { + this.value = value; + this.description = description; + } + + public String getValue() { + return value; + } + + public String getDescription() { + return description; + } + + public static String valueOfDescription(String val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (StringUtils.equalsIgnoreCase(values()[i].value, val)) { + tmp = values()[i].description; + } + } + return tmp; + } + + public static String descriptionOfValue(String val) { + String tmp = ""; + for (int i = 0; i < values().length; i++) { + if (StringUtils.equalsIgnoreCase(values()[i].description, val)) { + tmp = values()[i].value; + } + } + return tmp; + } + } + /** * ANDON类型:MM=物料 QM=质量 EQ=设备 GY=工艺 JC=检测 @@ -625,7 +717,8 @@ public class AndonEnumUtil { CANCEL_ACTION("40", "撤销动作"), COMMIT_ACTION("50","提交动作"), PASS_ACTION("60","审批动作"), - REJECT_ACTION("70", "驳回动作"); + REJECT_ACTION("70", "驳回动作"), + OPEN_ACTION("80","放行动作"); private String value; private String description; 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 a93ebf4..1fba6f6 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 @@ -1,6 +1,7 @@ package cn.estsh.i3plus.pojo.base.enumutil; import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.StringUtils; /** * @Description : @@ -532,7 +533,7 @@ public class MesPcnEnumUtil { PLC(10, "PLC"), DB(20, "DB"), - OTHER(30,"OTHER"); + OTHER(30, "OTHER"); private int value; private String description; @@ -562,6 +563,204 @@ public class MesPcnEnumUtil { } /** + * 数据库操作类型 开线检查的模块 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum DB_OPERATION_TYPE { + + INSERT(10, "insert", "新增"), + SELECT(20, "select", "查询"), + UPDATE(30, "update", "更新"); + + private int value; + private String code; + private String description; + + DB_OPERATION_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; + } + + public static String valueOfCode(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].code; + } + } + return tmp; + } + } + + /** + * 数据库连接方式 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum DATA_SOURCE_TYPE { + SOURCE_MARIA_DB(10, "MariaDB", "MariaDB 10.1","com.mysql.jdbc.Driver",3306,null), + SOURCE_SQL_SERVER(20, "SQL Server", "SQL Server 2017","com.microsoft.sqlserver.jdbc.SQLServerDriver",1433,"dbo"), + SOURCE_ORACLE(30, "Oracle", "Oralce 12C","oracle.jdbc.driver.OracleDriver",1521,null), + SOURCE_POSTGRE_SQL(40, "PostgreSql", "PostgreSql 10.5","org.postgresql.Driver",5432,"public"); + + private int value; + private String code; + private String description; + private String driverClassName; + private int defaultPort; + private String defaultSchemaPattern; + + private DATA_SOURCE_TYPE (int value, String code, String description,String driverClassName,int port,String defaultSchemaPattern) { + this.value = value; + this.code = code; + this.description = description; + this.driverClassName = driverClassName; + this.defaultPort = port; + this.defaultSchemaPattern = defaultSchemaPattern; + } + + public int getValue() { + return value; + } + + public String getCode() { + return code; + } + + public String getDescription() { + return description; + } + + public String getDriverClassName() { + return driverClassName; + } + + public int getDefaultPort() { + return defaultPort; + } + + public String getDefaultSchemaPattern() { + return defaultSchemaPattern; + } + + public static String valueOfCode(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + tmp = values()[i].code; + } + } + return tmp; + } + + public static int codeOfValue(String code) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].code.equals(code)) { + tmp = values()[i].value; + } + } + return tmp; + } + + 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 DATA_SOURCE_TYPE valueOf(int val) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].value == val) { + return values()[i]; + } + } + return null; + } + + public static String codeOfDescription(String code) { + String tmp = null; + for (int i = 0; i < values().length; i++) { + if (values()[i].code.equals(code)) { + tmp = values()[i].description; + } + } + return tmp; + } + + public String getJDBCUrl(String database,String host,Integer port){ + if(this.getValue() == SOURCE_MARIA_DB.getValue()){ + return getJDBCUrlMySQL(database,host,port); + }else if(this.getValue() == SOURCE_ORACLE.getValue()){ + return getJDBCUrlOracle(database,host,port); + }else if(this.getValue() == SOURCE_POSTGRE_SQL.getValue()){ + return getJDBCUrlPostgreSQL(database,host,port); + }else if(this.getValue() == SOURCE_SQL_SERVER.getValue()){ + return getJDBCUrlSQLServer(database,host,port); + } + return null; + } + + public static DATA_SOURCE_TYPE getDataSourceURL(String databaseProductName){ + if(StringUtils.isNotBlank(databaseProductName)){ + if(databaseProductName.indexOf(":mysql:") != -1){ + return SOURCE_MARIA_DB; + }else if(databaseProductName.indexOf(":oracle:") != -1){ + return SOURCE_ORACLE; + }else if(databaseProductName.indexOf(":postgresql:") != -1){ + return SOURCE_POSTGRE_SQL; + }else if(databaseProductName.indexOf(":sqlserver:") != -1){ + return SOURCE_SQL_SERVER; + } + } + return null; + } + + private String getJDBCUrlMySQL(String database,String host,Integer port){ + return "jdbc:mysql://"+host+":"+port+"/"+database+"?autoReconnect=true&useSSL=false&characterEncoding=utf-8"; + } + + private String getJDBCUrlOracle(String database,String host,Integer port){ + return "jdbc:oracle:thin:@"+host+":"+port+":"+database; + } + + private String getJDBCUrlPostgreSQL(String database,String host,Integer port){ + return "jdbc:postgresql://"+host+":"+port+"/"+database; + } + + private String getJDBCUrlSQLServer(String database,String host,Integer port){ + return "jdbc:sqlserver://" + host + ":" + port + ";database=" + database; + } + } + + /** * MesPlanOrder实体对应的status值 计划状态 */ @JsonFormat(shape = JsonFormat.Shape.OBJECT) @@ -961,5 +1160,4 @@ public class MesPcnEnumUtil { } } - } diff --git a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/WmsEnumUtil.java b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/WmsEnumUtil.java index ef96bed..84ecce4 100644 --- a/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/WmsEnumUtil.java +++ b/modules/i3plus-pojo-base/src/main/java/cn/estsh/i3plus/pojo/base/enumutil/WmsEnumUtil.java @@ -3522,4 +3522,115 @@ public class WmsEnumUtil { } } + /** + * 物料关系信息 关联类型 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum PART_ASSOCIATE_TYPE { + LINE(10, "LINE", "产线"), + CUSTOMER(20, "CUSTOMER", "客户"), + VENDOR(30, "VENDOR", "供应商"); + + private int value; + private String code; + private String description; + + PART_ASSOCIATE_TYPE(int value, String code, String description) { + this.value = value; + this.code = code; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + public String getCode() { + return code; + } + + public static String valueOf(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 String valueOfDescription(int val) { + return valueOf(val); + } + + public static int descOf(String desc) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].description.equals(desc)) { + tmp = values()[i].value; + } + } + return tmp; + } + } + + /** + * 条码操作记录信息 操作类型 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum SN_OPERATE_TYPE { + REPORT(10, "REPORT", "生产报工"), + BOXING_ERROR_PROOFING(20, "BOXING_ERROR_PROOFING", "装箱防错"); + + private int value; + private String code; + private String description; + + SN_OPERATE_TYPE(int value, String code, String description) { + this.value = value; + this.code = code; + this.description = description; + } + + public int getValue() { + return value; + } + + public String getDescription() { + return description; + } + + public String getCode() { + return code; + } + + public static String valueOf(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 String valueOfDescription(int val) { + return valueOf(val); + } + + public static int descOf(String desc) { + int tmp = 1; + for (int i = 0; i < values().length; i++) { + if (values()[i].description.equals(desc)) { + tmp = values()[i].value; + } + } + return tmp; + } + } + } \ No newline at end of file diff --git a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesDataObject.java b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesDataObject.java index b964d08..b26dc90 100644 --- a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesDataObject.java +++ b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesDataObject.java @@ -39,4 +39,8 @@ public class MesDataObject extends BaseBean { @Column(name="DS_CODE") @ApiParam("数据源代码") private String dsCode; + + @Column(name="OPERATE_TYPE") + @ApiParam("操作类型") + private Integer operateType; } diff --git a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesDB.java b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesDb.java similarity index 97% rename from modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesDB.java rename to modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesDb.java index 18cd750..e86de81 100644 --- a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesDB.java +++ b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesDb.java @@ -25,7 +25,7 @@ import javax.persistence.Table; @EqualsAndHashCode(callSuper = true) @Table(name = "MES_DB") @Api("地址清单") -public class MesDB extends BaseBean { +public class MesDb extends BaseBean { @Column(name="DS_CODE") @ApiParam("数据源代码") diff --git a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesEquipment.java b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesEquipment.java index df924c5..e6dd7ba 100644 --- a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesEquipment.java +++ b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesEquipment.java @@ -55,6 +55,10 @@ public class MesEquipment extends BaseBean { @ApiParam("区域代码") private String areaCode; + @Column(name="CONNECT_TYPE") + @ApiParam("连接类型") + private Integer connectType; + @Transient @ApiParam(value ="名称") private String name; diff --git a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesObjectCfg.java b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesObjectCfg.java index 1dec08d..48ec4d9 100644 --- a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesObjectCfg.java +++ b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesObjectCfg.java @@ -52,4 +52,8 @@ public class MesObjectCfg extends BaseBean { @ApiParam("主键标记") private String fieldPk; + @Column(name="POJO_ATTR") + @ApiParam("对应的pojo属性") + private String pojoAttr; + } diff --git a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesPlc.java b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesPlc.java new file mode 100644 index 0000000..64a9e9c --- /dev/null +++ b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/bean/MesPlc.java @@ -0,0 +1,81 @@ +package cn.estsh.i3plus.pojo.mes.pcn.bean; + + +import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiParam; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +/** + * @Author: Wynne.Lu + * @CreateDate: 2019/9/25 8:07 PM + * @Description: + **/ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name = "MES_PLC") +@Api("PLC配置表") +public class MesPlc extends BaseBean { + + @Column(name = "PLC_CODE") + @ApiParam("PLC代码") + private String plcCode; + + @Column(name = "PLC_NAME") + @ApiParam("PLC名称") + private String plcName; + + @Column(name = "PLC_MODEL") + @ApiParam("PLC型号") + private String plcModel; + + @Column(name = "PLC_IP") + @ApiParam("PLC IP") + private String plcIp; + + @Column(name = "CHANNEL") + @ApiParam("通道") + private String channel; + + @Column(name = "TAG_NAME") + @ApiParam("标签名称") + private String tagName; + + @Column(name = "TAG_ADDRESS") + @ApiParam("标签地址") + private String tagAddress; + + @Column(name = "DATA_TYPE") + @ApiParam("标签数据类型") + private String dataType; + + @Column(name = "GROUP_NAME") + @ApiParam("分组名称") + private String groupName; + + @Column(name = "EQU_CODE") + @ApiParam("设备代码") + private String equCode; + + @Column(name = "WORK_CENTER_CODE") + @ApiParam("工作中心") + private String workCenterCode; + + @Column(name = "WORK_CELL_CODE") + @ApiParam("工作单元") + private String workCellCode; + + @Column(name = "ENABLED") + @ApiParam("是否启用 0 false 1 true") + private Integer enabled; +} diff --git a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/model/PLCInteracticeModel.java b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/model/PLCInteracticeModel.java new file mode 100644 index 0000000..f3b4227 --- /dev/null +++ b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/model/PLCInteracticeModel.java @@ -0,0 +1,50 @@ +package cn.estsh.i3plus.pojo.mes.pcn.model; + + +import io.swagger.annotations.Api; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Map; + +/** + * @Author: Wynne.Lu + * @CreateDate: 2019/9/25 7:41 PM + * @Description: + **/ +@Data +@NoArgsConstructor +@AllArgsConstructor +@Api("PLC交互model") +public class PLCInteracticeModel { + + private String serverIp; + + private String serverPort; + + private String mwContext; + + private String protocol; + + private String plcCode; + + private String dataType; + + private String userName; + + private String password; + + private Integer enabled; + + private String realm; + + private String tag; + + private String value; + + private String comment; + + private String authenKey; + +} diff --git a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/model/PlcCacheKeyModel.java b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/model/PlcCacheKeyModel.java new file mode 100644 index 0000000..ef2610f --- /dev/null +++ b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/model/PlcCacheKeyModel.java @@ -0,0 +1,35 @@ +package cn.estsh.i3plus.pojo.mes.pcn.model; + + +import io.swagger.annotations.Api; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @Author: Wynne.Lu + * @CreateDate: 2019/9/28 10:17 AM + * @Description: + **/ +@Data +@Api("PLC Redis Cache key") +public class PlcCacheKeyModel { + + private String channel; + + private String device; + + private String tag; + + public PlcCacheKeyModel(String channel, String device, String tag) { + this.channel = channel; + this.device = device; + this.tag = tag; + } + + public String getPlcCacheKey() { + return channel + ":" + device + ":" + tag; + } + + +} diff --git a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/model/WcCheckModel.java b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/model/WcCheckModel.java index 64151f9..80e7374 100644 --- a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/model/WcCheckModel.java +++ b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/model/WcCheckModel.java @@ -48,6 +48,9 @@ public class WcCheckModel { @ApiParam("开线信号") private Integer onlineSignal; + @ApiParam("开线对象") + MesWcCheckRecord onlineSignalEqu; + @ApiParam("是否通过") private Integer isPass; @@ -57,12 +60,12 @@ public class WcCheckModel { @ApiParam("工单") private String workOrder; - @ApiParam("工单零件数量") - private Long qty; - @ApiParam("产品号") private String partNo; + @ApiParam("需要展示的数据") + private Map need2ShowMap; + public WcCheckModel initialWcCheckModel() { WcCheckModel wcCheckModel = new WcCheckModel(); @@ -76,6 +79,8 @@ public class WcCheckModel { wcCheckModel.setRoutesColumn(new HashMap<>()); wcCheckModel.setOnlineSignal(MesPcnEnumUtil.ONLINE_SIGNAL.NON_CHECK.getValue()); wcCheckModel.setIsPass(MesPcnEnumUtil.IS_WCCHECK_PASS.NON_PASS.getValue()); + onlineSignalEqu=new MesWcCheckRecord(); + wcCheckModel.setNeed2ShowMap(new HashMap<>()); Map dataColumnRelationMap = new HashMap<>(); dataColumnRelationMap.put("people", "peopleColumn"); diff --git a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/repository/MesDataObjectRepository.java b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/repository/MesDataObjectRepository.java new file mode 100644 index 0000000..c37b6ed --- /dev/null +++ b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/repository/MesDataObjectRepository.java @@ -0,0 +1,13 @@ +package cn.estsh.i3plus.pojo.mes.pcn.repository; + + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.mes.pcn.bean.MesDataObject; + +/** + * @Author: Wynne.Lu + * @CreateDate: 2019/9/27 1:59 PM + * @Description: + **/ +public interface MesDataObjectRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/repository/MesDbRepository.java b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/repository/MesDbRepository.java new file mode 100644 index 0000000..0b7d77e --- /dev/null +++ b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/repository/MesDbRepository.java @@ -0,0 +1,13 @@ +package cn.estsh.i3plus.pojo.mes.pcn.repository; + + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.mes.pcn.bean.MesDb; + +/** + * @Author: Wynne.Lu + * @CreateDate: 2019/9/27 1:58 PM + * @Description: + **/ +public interface MesDbRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/repository/MesObjectCfgRepository.java b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/repository/MesObjectCfgRepository.java new file mode 100644 index 0000000..c1a67b2 --- /dev/null +++ b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/repository/MesObjectCfgRepository.java @@ -0,0 +1,13 @@ +package cn.estsh.i3plus.pojo.mes.pcn.repository; + + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.mes.pcn.bean.MesObjectCfg; + +/** + * @Author: Wynne.Lu + * @CreateDate: 2019/9/27 1:59 PM + * @Description: + **/ +public interface MesObjectCfgRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/repository/MesPlcRepository.java b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/repository/MesPlcRepository.java new file mode 100644 index 0000000..add5aac --- /dev/null +++ b/modules/i3plus-pojo-mes-pcn/src/main/java/cn/estsh/i3plus/pojo/mes/pcn/repository/MesPlcRepository.java @@ -0,0 +1,15 @@ +package cn.estsh.i3plus.pojo.mes.pcn.repository; + + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.mes.pcn.bean.MesPlc; +import org.springframework.stereotype.Repository; + +/** + * @Author: Wynne.Lu + * @CreateDate: 2019/9/26 7:47 PM + * @Description: + **/ +@Repository +public interface MesPlcRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesDataObject.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesDataObject.java index 4b4f28a..cf14ce8 100644 --- a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesDataObject.java +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesDataObject.java @@ -39,4 +39,8 @@ public class MesDataObject extends BaseBean { @Column(name="DS_CODE") @ApiParam("数据源代码") private String dsCode; + + @Column(name="OPERATE_TYPE") + @ApiParam("操作类型") + private Integer operateType; } diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesDB.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesDb.java similarity index 97% rename from modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesDB.java rename to modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesDb.java index 2ce7819..de939b5 100644 --- a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesDB.java +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesDb.java @@ -25,7 +25,7 @@ import javax.persistence.Table; @EqualsAndHashCode(callSuper = true) @Table(name = "MES_DB") @Api("地址清单") -public class MesDB extends BaseBean { +public class MesDb extends BaseBean { @Column(name = "DS_CODE") @ApiParam("数据源代码") diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesObjectCfg.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesObjectCfg.java index d5764ed..a4bb5eb 100644 --- a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesObjectCfg.java +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesObjectCfg.java @@ -52,4 +52,8 @@ public class MesObjectCfg extends BaseBean { @ApiParam("主键标记") private String fieldPk; + @Column(name="POJO_ATTR") + @ApiParam("对应的pojo属性") + private String pojoAttr; + } diff --git a/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/wms/wmsCSOrderDetailsModel.java b/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/wms/wmsCSOrderDetailsModel.java new file mode 100644 index 0000000..9957a5f --- /dev/null +++ b/modules/i3plus-pojo-model/src/main/java/cn/estsh/i3plus/pojo/model/wms/wmsCSOrderDetailsModel.java @@ -0,0 +1,72 @@ +package cn.estsh.i3plus.pojo.model.wms; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class wmsCSOrderDetailsModel implements Serializable { + + + /****** + * + * 库位编码 + */ + public String locateNo; + + /****** + * + * 订单编码 + */ + public String orderNo; + + + /****** + * + * 物料代码 + */ + public String partNo; + + /****** + * + * 物料名称 + */ + public String partNameRdd; + + /****** + * + * 冻结数量 + */ + public String qty; + + /****** + * + * 实盘数量 + */ + public String factQty; + + /****** + * + * 条码 + */ + public String sn; + + + /****** + * + * 仓库编码 + */ + public String whNo; + + /****** + * + * 区域编码 + */ + public String zoneNo; + + /****** + * + * 状态 + */ + public String wmStatus; +} diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPartRelation.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPartRelation.java new file mode 100644 index 0000000..b31d80a --- /dev/null +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsPartRelation.java @@ -0,0 +1,51 @@ +package cn.estsh.i3plus.pojo.wms.bean; + +import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiParam; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +/** + * @Description : 物料关系表 + * @Reference : + * @Author : jimmy.zeng + * @CreateDate : 2019-09-27 14:44 + * @Modify: + **/ +@Data +@Entity +@Table(name="WMS_PART_RELATION") +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Api(value="物料关系表",description = "物料关系表") +public class WmsPartRelation extends BaseBean { + + @Column(name = "PART_NO") + @ApiParam(value = "物料编码") + private String partNo; + + @Column(name = "PART_NAME") + @ApiParam(value = "物料名称") + private String partName; + + @Column(name = "ASSOCIATE_CODE") + @ApiParam(value = "关联代码") + private String associateCode; + + @Column(name = "ASSOCIATE_NAME_ADD") + @ApiParam(value = "关联名称") + private String associateNameAdd; + + @Column(name = "ASSOCIATE_TYPE") + @ApiParam(value = "关联类型") + private Integer associateType; + +} diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsSnOperateRecord.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsSnOperateRecord.java new file mode 100644 index 0000000..5639a23 --- /dev/null +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/bean/WmsSnOperateRecord.java @@ -0,0 +1,75 @@ +package cn.estsh.i3plus.pojo.wms.bean; + +import cn.estsh.i3plus.pojo.base.bean.BaseBean; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiParam; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +/** + * @Description : 条码操作记录表 + * @Reference : + * @Author : jimmy.zeng + * @CreateDate : 2019-09-27 16:58 + * @Modify: + **/ +@Data +@Entity +@Table(name="WMS_SN_OPERATE_RECORD") +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Api(value="条码操作记录表",description = "条码操作记录表") +public class WmsSnOperateRecord extends BaseBean { + + @Column(name = "SN") + @ApiParam(value = "条码") + private String sn; + + @Column(name = "LINE_CODE") + @ApiParam(value = "产线代码") + private String lineCode; + + @Column(name = "ZONE_NO") + @ApiParam(value = "存储区编号") + private String zoneNo; + + @Column(name = "LOCATE_NO") + @ApiParam(value = "库位代码") + private String locateNo; + + @Column(name = "QTY") + @ApiParam(value = "数量", example = "0") + private Double qty = 0d; + + @Column(name = "PART_NO") + @ApiParam(value = "物料编号") + private String partNo; + + @Column(name = "PART_NAME_RDD") + @ApiParam(value = "物料名称") + private String partNameRdd; + + @Column(name = "CUST_NO") + @ApiParam(value = "客户编码") + private String custNo; + + @Column(name = "VENDOR_NO") + @ApiParam(value = "供应商编码") + public String vendorNo; + + @Column(name = "SHIPPING_FLAG") + @ApiParam(value = "发往地") + private String shippingFlag; + + @Column(name = "OPERATE_TYPE") + @ApiParam(value = "操作类型") + private Integer operateType; + +} diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/repository/WmsPartRelationRepository.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/repository/WmsPartRelationRepository.java new file mode 100644 index 0000000..e2108ed --- /dev/null +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/repository/WmsPartRelationRepository.java @@ -0,0 +1,16 @@ +package cn.estsh.i3plus.pojo.wms.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.wms.bean.WmsPartRelation; +import org.springframework.stereotype.Repository; + +/** + * @Description : 物料关系信息 + * @Reference : + * @Author : jimmy.zeng + * @CreateDate : 2019-09-27 15:18 + * @Modify: + **/ +@Repository +public interface WmsPartRelationRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/repository/WmsSnOperateRecordRepository.java b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/repository/WmsSnOperateRecordRepository.java new file mode 100644 index 0000000..fc4f25d --- /dev/null +++ b/modules/i3plus-pojo-wms/src/main/java/cn/estsh/i3plus/pojo/wms/repository/WmsSnOperateRecordRepository.java @@ -0,0 +1,16 @@ +package cn.estsh.i3plus.pojo.wms.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.wms.bean.WmsSnOperateRecord; +import org.springframework.stereotype.Repository; + +/** + * @Description : 条码操作记录信息 + * @Reference : + * @Author : jimmy.zeng + * @CreateDate : 2019-09-27 17:07 + * @Modify: + **/ +@Repository +public interface WmsSnOperateRecordRepository extends BaseRepository { +}