Merge branch 'dev' into test

yun-zuoyi
王杰 6 years ago
commit 2ed8ebdbd7

@ -11,6 +11,150 @@ import com.fasterxml.jackson.annotation.JsonFormat;
**/
public class MesEnumUtil {
/**
* mes-
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_INSERT_EXCEL {
MES_PLAN_ORDER(10, "生产计划"),
MES_EQUIPMENT(20, "设备台账"),
MES_EQU_TASK_STANDARD(30, "设备作业要求");
private int value;
private String description;
MES_INSERT_EXCEL(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_INSERT_EXCEL getByValue(int value) {
for (MES_INSERT_EXCEL 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;
}
}
/**
* mes-
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_EQU_TASK_STANDARD_TASK_TYPE {
CHECK(10, "点检"),
MAINTAIN(20, "保养"),
REPAIR(30, "维修");
private int value;
private String description;
MES_EQU_TASK_STANDARD_TASK_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;
}
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
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_QC_CHECK_TYPE {
FIRST_CHECK(10, "首检"),
ON_SITE_CHECK(20, "巡检"),
END_CHECK(30, "尾检");
private int value;
private String description;
MES_QC_CHECK_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;
}
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
*/

@ -817,7 +817,8 @@ public class MesPcnEnumUtil {
OPEN(30, "启动"),
PAUSE(40, "暂停"),
CANCEL(50, "取消"),
CLOSE(60, "关闭");
CLOSE(60, "关闭"),
COMPLETE(70, "完成");
private int value;
private String description;
@ -1163,6 +1164,80 @@ public class MesPcnEnumUtil {
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum COMPANY_TYPE {
RULECODE("ruleCode", "规则编码"),
PREFIX("prefix", "前缀"),
PART_NO("partNo", "物料号"),
CUST_PART_NO("custPartNo", "客户物料号"),
CUST_CODE("custCode", "客户代码"),
PROD_LOCATION("prodLocation", "产地"),
YEAR("year", "年"),
MOTH("month", "月"),
DAY("day", "日"),
HOUR("hour", "小时"),
MINUTE("minute", "分钟"),
SECOND("second", "秒"),
SERIAL("serialNo", "序列号");
private String value;
private String description;
COMPANY_TYPE(String value, String description) {
this.value = value;
this.description = description;
}
public String getValue() {
return value;
}
public String getDescription() {
return description;
}
}
/**
* mes
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_STEP_TYPE {
AUTO_RUN(10, "自动执行"),
SCAN_RUN(20, "扫描执行");
private Integer value;
private String description;
MES_STEP_TYPE(Integer value, String description) {
this.value = value;
this.description = description;
}
public Integer 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 (values()[i].value.equals(val)) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
* MesRoute
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)

@ -0,0 +1,64 @@
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;
/**
* @Description :
* @Reference :
* @Author : wangjie
* @CreateDate : 2019-10-11
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="MES_EQU_TASK_STANDARD")
@Api("设备作业要求")
public class MesEquTaskStandard extends BaseBean {
@Column(name="EQUIPMENT_CODE")
@ApiParam("设备代码")
private String equipmentCode;
@Column(name="EQUIPMENT_NAME")
@ApiParam("设备名称")
private String equipmentName;
@Column(name="TASK_TYPE")
@ApiParam("作业类型")
private Integer taskType;
@Column(name="ACTION_ITEM")
@ApiParam("操作项")
private String actionItem;
@Column(name="ACTION_STANDARD")
@ApiParam("操作标准")
private String actionStandard;
@Column(name="ACTION_GUIDE")
@ApiParam("操作指导")
private String actionGuide;
@Transient
@ApiParam(value="生产线")
private String workCenterCode;
@Transient
@ApiParam(value="设备类别")
private String equipmentCategory;
}

@ -0,0 +1,77 @@
package cn.estsh.i3plus.pojo.mes.model;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import java.io.Serializable;
@Data
public class MesEquTaskStandardModel implements Serializable {
@ApiParam("id")
private Long id;
@ApiParam("设备代码")
private String equipmentCode;
@ApiParam("设备名称")
private String equipmentName;
@ApiParam("作业类型")
private Integer taskType;
@ApiParam("操作项")
private Integer actionItem;
@ApiParam("操作标准")
private String actionStandard;
@ApiParam("操作指导")
private String actionGuide;
@ApiParam("生产线")
private String workCenterCode;
@ApiParam(value ="组织代码")
public String organizeCode;
@ApiParam(value = "有效性")
public Integer isValid;
@ApiParam(value = "是否已删除")
public Integer isDeleted;
@ApiParam(value = "创建用户")
public String createUser;
@ApiParam(value = "创建日期")
public String createDatetime;
@ApiParam(value = "修改人")
public String modifyUser;
@ApiParam(value = "修改日期")
public String modifyDatetime;
public MesEquTaskStandardModel() {
}
public MesEquTaskStandardModel(Long id, String equipmentCode, String equipmentName, Integer taskType, Integer actionItem, String actionStandard, String actionGuide, String workCenterCode, String organizeCode, Integer isValid, Integer isDeleted, String createUser, String createDatetime, String modifyUser, String modifyDatetime) {
this.id = id;
this.equipmentCode = equipmentCode;
this.equipmentName = equipmentName;
this.taskType = taskType;
this.actionItem = actionItem;
this.actionStandard = actionStandard;
this.actionGuide = actionGuide;
this.workCenterCode = workCenterCode;
this.organizeCode = organizeCode;
this.isValid = isValid;
this.isDeleted = isDeleted;
this.createUser = createUser;
this.createDatetime = createDatetime;
this.modifyUser = modifyUser;
this.modifyDatetime = modifyDatetime;
}
}

@ -7,7 +7,7 @@ import java.io.Serializable;
@Data
public class MesEquipmentModel implements Serializable {
@ApiParam(value ="id")
@ApiParam("id")
private Long id;
@ApiParam("设备代码")
@ -19,34 +19,34 @@ public class MesEquipmentModel implements Serializable {
@ApiParam("设备状态")
private Integer status;
@ApiParam(value ="生产线")
@ApiParam("生产线")
private String workCenterCode;
@ApiParam(value ="工位")
@ApiParam("工位")
private String workCellCode;
@ApiParam(value ="区域")
@ApiParam("区域")
private String areaCode;
@ApiParam(value ="设备工位关联ID")
@ApiParam("设备工位关联ID")
private Long wcId;
@ApiParam(value ="设备&工位")
@ApiParam("设备&工位")
private String equipmentNameAndworkCellName;
@ApiParam("设备类型")
private Integer equipmentType;
@ApiParam(value ="设备类别")
@ApiParam("设备类别")
private String equipmentCategory;
@ApiParam(value ="备注")
@ApiParam("备注")
private String memo;
@ApiParam(value ="设备型号")
@ApiParam("设备型号")
private String equipmentModel;
@ApiParam(value ="设备规格")
@ApiParam("设备规格")
private String equipmentSpec;
@ApiParam("制造商")
@ -64,25 +64,25 @@ public class MesEquipmentModel implements Serializable {
@ApiParam("连接类型")
private Integer connectType;
@ApiParam(value ="组织代码")
@ApiParam("组织代码")
public String organizeCode;
@ApiParam(value = "有效性")
@ApiParam( "有效性")
public Integer isValid;
@ApiParam(value = "是否已删除")
@ApiParam( "是否已删除")
public Integer isDeleted;
@ApiParam(value = "创建用户")
@ApiParam( "创建用户")
public String createUser;
@ApiParam(value = "创建日期")
@ApiParam( "创建日期")
public String createDatetime;
@ApiParam(value = "修改人")
@ApiParam( "修改人")
public String modifyUser;
@ApiParam(value = "修改日期")
@ApiParam( "修改日期")
public String modifyDatetime;

@ -0,0 +1,16 @@
package cn.estsh.i3plus.pojo.mes.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.bean.MesEquTaskStandard;
import org.springframework.stereotype.Repository;
/**
* @Description :
* @Reference :
* @Author :
* @CreateDate : 2019-10-11
* @Modify:
**/
@Repository
public interface MesEquTaskStandardRepository extends BaseRepository<MesEquTaskStandard, Long> {
}
Loading…
Cancel
Save