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 e126301..0629798 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 @@ -5174,4 +5174,226 @@ public class MesEnumUtil { } } + + /** + * 运算对象属性 运算类型 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum OPERATE_TYPE { + OEE(10, "OEE"), + MTBF(20, "MTBF平均故障间隔"), + MTTR(30, "MTTR平均修理时间"); + + private int value; + private String description; + + OPERATE_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; + } + } + + /** + * 运算对象属性 属性类型 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum ATTRIBUTE_TYPE { + STANDARD_ATTRIBUTE(10, "标准属性"), + CUSTOM_ATTRIBUTE(20, "自定义属性"); + + private int value; + private String description; + + ATTRIBUTE_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; + } + } + + /** + * 运算对象属性配置 赋值类型 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum VALUE_TYPE { + MANUAL_ASSIGNMENT(10, "手工赋值"), + SPEL_EXPRESSION(20, "spel表达式"), + FUNCTION_ASSIGNMENT(30, "函数赋值"), + JOB_ASSIGNMENT(40, "job赋值"); + + private int value; + private String description; + + VALUE_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; + } + } + + /** + * 运算对象 运算类型 + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum OBJECT_CODE { + ORGANIZE_OEE(10, "工厂OEE"), + WORK_CENTER_OEE(20, "产线OEE"), + WORK_CELL_CEE(30, "工位OEE"), + EQU_OEE(40, "设备OEE"); + + private int value; + private String description; + + OBJECT_CODE(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; + } + } + + /** + * 脚本类型(组件、表单、报表、JOB、其他) + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum SCRIPT_TYPE { + ORGANIZE_OEE(10, "组件"), + WORK_CENTER_OEE(20, "表单"), + WORK_CELL_CEE(30, "报表"), + JOB(40, "JOB"), + OTHER(50, "其他"); + + private int value; + private String description; + + SCRIPT_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; + } + } + + /** + * 语言类型(Groovy、Python、JavaScript、Scala、Ruby) + */ + @JsonFormat(shape = JsonFormat.Shape.OBJECT) + public enum SCRIPT_LANGUAGE { + GROOVY(10, "Groovy"), + PYTHON(20, "Python"), + JAVA_SCRIPT(30, "JavaScript"), + SCALA(40, "Scala"), + RUBY(50, "Ruby"); + + private int value; + private String description; + + SCRIPT_LANGUAGE(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; + } + } + } diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesOee.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesOee.java new file mode 100644 index 0000000..81b3951 --- /dev/null +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesOee.java @@ -0,0 +1,112 @@ +package cn.estsh.i3plus.pojo.mes.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; +import java.io.Serializable; + +/** + * @Description: + * @Author: jokelin + * @Date: 2020/4/28 4:19 下午 + * @Modify: + */ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name = "MES_OEE") +@Api("MES_OEE数据") +public class MesOee extends BaseBean implements Serializable { + + private static final long serialVersionUID = -9163026983140909748L; + + @Column(name = "OBJECT_CODE") + @ApiParam("运算对象代码") + private String objectCode; + + @Column(name = "STATUS") + @ApiParam("运算状态") + private Integer status; + + @Column(name = "WORK_CENTER_CODE") + @ApiParam("工作中心代码") + private String workCenterCode; + + @Column(name = "WORK_CELL_CODE") + @ApiParam("工作单元代码") + private String workCellCode; + + @Column(name = "EQU_CODE") + @ApiParam("设备代码") + private String equCode; + + @Column(name = "OEE_DATE") + @ApiParam("日期") + private String oeeDate; + + @Column(name = "SHIFT_CODE") + @ApiParam("班次代码") + private String shiftCode; + + @Column(name = "START_TIME") + @ApiParam("开始时段") + private String startTime; + + @Column(name = "END_TIME") + @ApiParam("结束时段") + private String endTime; + + @Column(name = "TOTAL_RUN_TIME") + @ApiParam("总生产时间") + private String totalRunTime; + + @Column(name = "TOTAL_STOP_TIME") + @ApiParam("总停机时间") + private String totalStopTime; + + @Column(name = "TOTAL_QTY") + @ApiParam("总生产数") + private Integer totalQty; + + @Column(name = "QUALIFIED_QTY") + @ApiParam("一次合格数") + private Integer qualifiedQty; + + @Column(name = "PLAN_TAKT") + @ApiParam("计划节拍") + private Integer planTakt; + + @Column(name = "ACTUAL_TAKT") + @ApiParam("实际节拍") + private Integer actualTakt; + + @Column(name = "TIME_RATE") + @ApiParam("时间开动率") + private String timeRate; + + @Column(name = "TAKT_RATE") + @ApiParam("性能开动率") + private String taktRate; + + @Column(name = "QUALIFIED_RATE") + @ApiParam("良品率") + private String qualifiedRate; + + @Column(name = "OEE") + @ApiParam("OEE") + private String oee; + + @Column(name = "BUSI_DATA") + @ApiParam("自定义数据") + private String busiData; +} diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesOperateObject.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesOperateObject.java new file mode 100644 index 0000000..99cc4bb --- /dev/null +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesOperateObject.java @@ -0,0 +1,45 @@ +package cn.estsh.i3plus.pojo.mes.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; +import java.io.Serializable; + +/** + * @Description: + * @Author: jokelin + * @Date: 2020/4/28 4:04 下午 + * @Modify: + */ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name = "MES_OPERATE_OBJECT") +@Api("MES_运算对象") +public class MesOperateObject extends BaseBean implements Serializable { + + private static final long serialVersionUID = 7829216855303543146L; + + @Column(name = "OBJECT_CODE") + @ApiParam("对象代码") + private String objectCode; + + @Column(name = "OBJECT_NAME") + @ApiParam("对象名称") + private String objectName; + + @Column(name = "OPERATE_TYPE") + @ApiParam("运算类型") + private Integer operateType; + +} diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesOperateObjectAttribute.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesOperateObjectAttribute.java new file mode 100644 index 0000000..56649b6 --- /dev/null +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesOperateObjectAttribute.java @@ -0,0 +1,48 @@ +package cn.estsh.i3plus.pojo.mes.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; +import java.io.Serializable; + +/** + * @Description: + * @Author: jokelin + * @Date: 2020/4/28 4:08 下午 + * @Modify:MES_OPERATE_OBJECT_CFG + */ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name = "MES_OPERATE_OBJECT_ATTRIBUTE") +@Api("MES_运算对象属性") +public class MesOperateObjectAttribute extends BaseBean implements Serializable { + + private static final long serialVersionUID = 3916105499867386686L; + + @Column(name = "ATTRIBUTE_CODE") + @ApiParam("属性代码") + private String attributeCode; + + @Column(name = "ATTRIBUTE_NAME") + @ApiParam("属性名称") + private String attributeName; + + @Column(name = "ATTRIBUTE_TYPE") + @ApiParam("属性类型") + private Integer attributeType; + + @Column(name = "OPERATE_TYPE") + @ApiParam("运算类型") + private Integer operateType; +} diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesOperateObjectCfg.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesOperateObjectCfg.java new file mode 100644 index 0000000..cc3a177 --- /dev/null +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesOperateObjectCfg.java @@ -0,0 +1,65 @@ +package cn.estsh.i3plus.pojo.mes.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; +import javax.persistence.Transient; +import java.io.Serializable; + +/** + * @Description: + * @Author: jokelin + * @Date: 2020/4/28 4:12 下午 + * @Modify: + */ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name = "MES_OPERATE_OBJECT_ATTRIBUTE") +@Api("MES_运算对象属性配置") +public class MesOperateObjectCfg extends BaseBean implements Serializable { + + private static final long serialVersionUID = -8066603810736365082L; + + @Column(name = "OBJECT_CODE") + @ApiParam("对象代码") + private String objectCode; + + @Column(name = "ATTRIBUTE_CODE") + @ApiParam("属性代码") + private String attributeCode; + + @Column(name = "VALUE_TYPE") + @ApiParam("赋值类型") + private String valueType; + + @Column(name = "METHOD_CODE") + @ApiParam("函数方法") + private String methodCode; + + @Column(name = "JOB_ID") + @ApiParam("job编号") + private String jobId; + + @Column(name = "SPEL_CONTENT") + @ApiParam("spel表达式") + private String spelContent; + + @Column(name = "SEQ") + @ApiParam("运算顺序") + private Integer seq; + + @Transient + @ApiParam("属性名称") + private String attributeName; +} diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesScriptPersistence.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesScriptPersistence.java new file mode 100644 index 0000000..945aa56 --- /dev/null +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/bean/MesScriptPersistence.java @@ -0,0 +1,56 @@ +package cn.estsh.i3plus.pojo.mes.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; +import java.io.Serializable; + +/** + * @Description: + * @Author: jokelin + * @Date: 2020/4/28 4:58 下午 + * @Modify: + */ +@Data +@Entity +@DynamicInsert +@DynamicUpdate +@EqualsAndHashCode(callSuper = true) +@Table(name = "MES_SCRIPT_PERSISTENCE") +@Api("动态脚本") +public class MesScriptPersistence extends BaseBean implements Serializable { + + private static final long serialVersionUID = 1941422535481564572L; + + @Column(name = "SCRIPT_NO") + @ApiParam("脚本编号") + private String scriptNo; + + @Column(name = "SCRIPT_NAME") + @ApiParam("脚本名称") + private String scriptName; + + @Column(name = "SCRIPT_REMARK") + @ApiParam("脚本描述") + private String scriptRemark; + + @Column(name = "SCRIPT_TYPE") + @ApiParam("脚本类型") + private Integer scriptType; + + @Column(name = "LANGUAGE_TYPE") + @ApiParam("语言类型") + private Integer languageType; + + @Column(name = "SCRIPT_CONTENT") + @ApiParam("脚本内容") + private String scriptContent; +} diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesOeeRepository.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesOeeRepository.java new file mode 100644 index 0000000..427d72e --- /dev/null +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesOeeRepository.java @@ -0,0 +1,15 @@ +package cn.estsh.i3plus.pojo.mes.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.mes.bean.MesOee; +import org.springframework.stereotype.Repository; + +/** + * @Description: + * @Author: jokelin + * @Date: 2020/4/28 5:04 下午 + * @Modify: + */ +@Repository +public interface MesOeeRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesOperateObjectAttributeRepository.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesOperateObjectAttributeRepository.java new file mode 100644 index 0000000..e8add57 --- /dev/null +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesOperateObjectAttributeRepository.java @@ -0,0 +1,15 @@ +package cn.estsh.i3plus.pojo.mes.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.mes.bean.MesOperateObjectAttribute; +import org.springframework.stereotype.Repository; + +/** + * @Description: + * @Author: jokelin + * @Date: 2020/4/28 5:05 下午 + * @Modify: + */ +@Repository +public interface MesOperateObjectAttributeRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesOperateObjectCfgRepository.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesOperateObjectCfgRepository.java new file mode 100644 index 0000000..70241ae --- /dev/null +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesOperateObjectCfgRepository.java @@ -0,0 +1,15 @@ +package cn.estsh.i3plus.pojo.mes.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.mes.bean.MesOperateObjectCfg; +import org.springframework.stereotype.Repository; + +/** + * @Description: + * @Author: jokelin + * @Date: 2020/4/28 5:04 下午 + * @Modify: + */ +@Repository +public interface MesOperateObjectCfgRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesOperateObjectRepository.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesOperateObjectRepository.java new file mode 100644 index 0000000..1d904cf --- /dev/null +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesOperateObjectRepository.java @@ -0,0 +1,15 @@ +package cn.estsh.i3plus.pojo.mes.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.mes.bean.MesOperateObject; +import org.springframework.stereotype.Repository; + +/** + * @Description: + * @Author: jokelin + * @Date: 2020/4/28 5:05 下午 + * @Modify: + */ +@Repository +public interface MesOperateObjectRepository extends BaseRepository { +} diff --git a/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesScriptPersistenceRepository.java b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesScriptPersistenceRepository.java new file mode 100644 index 0000000..d5ca681 --- /dev/null +++ b/modules/i3plus-pojo-mes/src/main/java/cn/estsh/i3plus/pojo/mes/repository/MesScriptPersistenceRepository.java @@ -0,0 +1,15 @@ +package cn.estsh.i3plus.pojo.mes.repository; + +import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository; +import cn.estsh.i3plus.pojo.mes.bean.MesScriptPersistence; +import org.springframework.stereotype.Repository; + +/** + * @Description: + * @Author: jokelin + * @Date: 2020/4/28 5:03 下午 + * @Modify: + */ +@Repository +public interface MesScriptPersistenceRepository extends BaseRepository { +}