【1472 工步-设备状态采集(原PLC采集【设备状态】)】

yun-zuoyi
qianhs 5 years ago
parent c53999b0d2
commit 564ba1e116

@ -148,6 +148,72 @@ public class MesEnumUtil {
return valueOf(val); return valueOf(val);
} }
} }
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum TOOLING_ACTION_RECORD_TYPE {
REPLACE(10, "REPLACE", "更换"),
WAREHOUSE(20, "WAREHOUSE", "入库"),
Use(30, "Use", "领用");
private int value;
private String code;
private String description;
TOOLING_ACTION_RECORD_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 codeOf(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 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;
}
public static String valueOfDescription(int val) {
return valueOf(val);
}
}
/** /**
* JIS * JIS
*/ */

@ -2482,7 +2482,8 @@ public class MesPcnEnumUtil {
FILE("file", "定制内容文件"), FILE("file", "定制内容文件"),
IMAGE("image", "图片"), IMAGE("image", "图片"),
BUTTON("button", "按钮"), BUTTON("button", "按钮"),
TABLES("tables", "多个表格"); TABLES("tables", "多个表格"),
DATA("data", "表格");
private String value; private String value;
private String description; private String description;

@ -105,4 +105,8 @@ public class MesPlc extends BaseBean implements Serializable {
@Transient @Transient
@ApiParam("设备名称") @ApiParam("设备名称")
private String equipmentName; private String equipmentName;
@Column(name = "TOOLING_CODE ")
@ApiParam("工装代码")
private String toolingCode;
} }

@ -12,6 +12,7 @@ import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Table; import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable; import java.io.Serializable;
/** /**
@ -62,6 +63,9 @@ public class MesEquipmentTooling extends BaseBean implements Serializable {
@ApiParam("更换结束时间") @ApiParam("更换结束时间")
private String endTime; private String endTime;
@Transient
@ApiParam("最大次数")
private Integer useCountMax;
public Integer getToolingType() { public Integer getToolingType() {
return this.toolingType == null ? 0 : this.toolingType; return this.toolingType == null ? 0 : this.toolingType;
@ -71,4 +75,14 @@ public class MesEquipmentTooling extends BaseBean implements Serializable {
return this.useCount == null ? 0 : this.useCount; return this.useCount == null ? 0 : this.useCount;
} }
public MesEquipmentTooling(){
}
public MesEquipmentTooling(MesTooling tooling, Integer useCount) {
this.toolingCode = tooling.getToolingCode();
this.toolingName = tooling.getToolingName();
this.useCount = useCount;
this.useCountMax = tooling.getUseCountMax();
}
} }

@ -128,4 +128,8 @@ public class MesPlc extends BaseBean implements Serializable {
@Transient @Transient
@ApiParam("OPC值") @ApiParam("OPC值")
private List opcValue; private List opcValue;
@Column(name = "TOOLING_CODE ")
@ApiParam("工装代码")
private String toolingCode;
} }

@ -88,6 +88,10 @@ public class MesQueueOrderDetail extends BaseBean implements Serializable {
@ApiParam("队列序号") @ApiParam("队列序号")
private Double queueSeq; private Double queueSeq;
@Column(name = "FINSIH_QTY")
@ApiParam("已生产数量")
private Double finsihQty;
public double getQueueSeqVal() { public double getQueueSeqVal() {
return this.queueSeq == null ? 0.0d : this.queueSeq; return this.queueSeq == null ? 0.0d : this.queueSeq;
} }

@ -0,0 +1,52 @@
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 :MES
* @Reference :
* @Author : qianhuasheng
* @CreateDate : 2020-03-19
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_TOOLING")
@Api("MES工装类型")
public class MesTooling extends BaseBean implements Serializable {
private static final long serialVersionUID = -5033127912658757665L;
@Column(name = "TOOLING_CODE ")
@ApiParam("工装代码")
private String toolingCode ;
@Column(name = "TOOLING_NAME")
@ApiParam("工装名称")
private String toolingName;
@Column(name = "TOOLING_TYPE")
@ApiParam("工装类型")
private Integer toolingType;
@Column(name = "USE_COUNT_MAX")
@ApiParam("最大使用次数")
private Integer useCountMax;
@Column(name = "USE_TIME_MAX")
@ApiParam("最大使用时间")
private String useTimeMax;
}

@ -15,7 +15,7 @@ import javax.persistence.Table;
import java.io.Serializable; import java.io.Serializable;
/** /**
* @Description : * @Description :
* @Reference : * @Reference :
* @Author :QianHuaSheng * @Author :QianHuaSheng
* @CreateDate : 2020-03-12 7:45 * @CreateDate : 2020-03-12 7:45

@ -49,6 +49,14 @@ public class QueueOrderModel implements Serializable {
private String workCenterCode; private String workCenterCode;
@ApiParam("工位") @ApiParam("工位")
private String workCellCode; private String workCellCode;
@ApiParam("队列类型")
private Integer queueType;
@ApiParam("已生产数量")
private Double finsihQty;
@ApiParam("包装数量")
private Double qty;
public QueueOrderModel() { public QueueOrderModel() {
} }
@ -68,6 +76,23 @@ public class QueueOrderModel implements Serializable {
} }
public QueueOrderModel(Long id, Double queueSeq, Double queDetailSeq, String custFlagNo, String prodCfgNameRdd, String categoryNameRdd, public QueueOrderModel(Long id, Double queueSeq, Double queDetailSeq, String custFlagNo, String prodCfgNameRdd, String categoryNameRdd,
String serialNumber, String partNo, String partNameRdd, Integer snStatus, String workType,Double finsihQty,Double qty) {
this.id = id;
this.queueSeq = queueSeq;
this.queDetailSeq = queDetailSeq;
this.custFlagNo = custFlagNo;
this.prodCfgNameRdd = prodCfgNameRdd;
this.categoryNameRdd = categoryNameRdd;
this.serialNumber = serialNumber;
this.partNo = partNo;
this.partNameRdd = partNameRdd;
this.snStatus = snStatus;
this.workType = workType;
this.finsihQty=finsihQty;
this.qty=qty;
}
public QueueOrderModel(Long id, Double queueSeq, Double queDetailSeq, String custFlagNo, String prodCfgNameRdd, String categoryNameRdd,
String serialNumber, String partNo, String partNameRdd, Integer snStatus, String workType) { String serialNumber, String partNo, String partNameRdd, Integer snStatus, String workType) {
this.id = id; this.id = id;
this.queueSeq = queueSeq; this.queueSeq = queueSeq;

@ -0,0 +1,14 @@
package cn.estsh.i3plus.pojo.mes.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.bean.MesTooling;
/**
* @Description :MES
* @Reference :
* @Author : qianhuasheng
* @CreateDate : 2020-03-19
* @Modify:
**/
public interface MesToolingRepository extends BaseRepository<MesTooling, Long> {
}
Loading…
Cancel
Save