yun-zuoyi
E 5 years ago
commit cc95fad3e8

@ -12,6 +12,41 @@ import com.fasterxml.jackson.annotation.JsonFormat;
public class MesEnumUtil {
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum CALENDAR_TYPE {
DAY(10, "日"),
WEEK(20, "周"),
MONTH(30, "月"),
YEAR(40, "年");
private int value;
private String description;
CALENDAR_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;
}
}
/**
* redis
*/
@ -1415,18 +1450,18 @@ public class MesEnumUtil {
MES_OBJECT_CFG(230, "对象结构"),
MES_WC_CHECK(240, "开线检查"),
MES_QC_CHECK_STANDARD(250, "质量检测标准"),
MES_FAULT_CAUSE(260,"设备故障原因"),
MES_FAULT_METHOD(270,"设备故障处理措施"),
MES_FAULT_PHENOMENON(280,"设备故障现象"),
MES_DEFECT(290,"缺陷"),
MES_DEFECT_CAUSE(300,"缺陷原因"),
MES_SCRAP(310,"报废原因"),
MES_REPAIR(320,"质量数据处理措施"),
MES_EQU_TASK_PLAN(330,"设备作业周期计划"),
MES_PART_OJBECT(340,"物料对象"),
MES_ROUTE_PROCESS_WORK_CELL(350,"工序工作单元"),
MES_DATASOURCE(360,"DB地址清单"),
MES_EQU_TASK_NOTIFY_CFG(370,"设备通知配置");
MES_FAULT_CAUSE(260, "设备故障原因"),
MES_FAULT_METHOD(270, "设备故障处理措施"),
MES_FAULT_PHENOMENON(280, "设备故障现象"),
MES_DEFECT(290, "缺陷"),
MES_DEFECT_CAUSE(300, "缺陷原因"),
MES_SCRAP(310, "报废原因"),
MES_REPAIR(320, "质量数据处理措施"),
MES_EQU_TASK_PLAN(330, "设备作业周期计划"),
MES_PART_OJBECT(340, "物料对象"),
MES_ROUTE_PROCESS_WORK_CELL(350, "工序工作单元"),
MES_DATASOURCE(360, "DB地址清单"),
MES_EQU_TASK_NOTIFY_CFG(370, "设备通知配置");
private int value;
private String description;
@ -3126,7 +3161,78 @@ public class MesEnumUtil {
return tmp;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum QUALITY_STANDARD_TYPE {
NG_RATE(10, "不良率"),
PPM(20, "PPM");
private int value;
private String description;
QUALITY_STANDARD_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 QUALITY_OBJECT_TYPE {
ORGANIZE(10, "工厂"),
WORK_CENTER_CODE(20, "产线"),
PRODUCT(30, "产品");
private int value;
private String description;
QUALITY_OBJECT_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;
}
}
/**
* MesProduceSnqcStatus
*/

@ -0,0 +1,52 @@
package cn.estsh.i3plus.pojo.mes.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
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.util.List;
/**
* @Description :
* @Reference :
* @Author : jack.jia
* @CreateDate : 2019-04-02
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_QUALITY_STANDARD_CFG")
@Api("质量标准配置")
public class MesQualityStandardCfg extends BaseBean {
@Column(name = "STANDARD_TYPE")
@ApiParam("标准类型")
private Integer standardType;
@Column(name = "OBJECT_TYPE")
@ApiParam("对象类型")
private Integer objectType;
@Column(name = "OBJECT_KEY_VALUE")
@ApiParam("对象键值")
private String objectKeyValue;
@Column(name = "OBJECT_KEY")
@ApiParam("对象键")
private String objectKey;
}

@ -4,6 +4,7 @@ import io.swagger.annotations.ApiParam;
import lombok.Data;
import java.util.List;
import java.util.Map;
/**
* @Description : 线
@ -39,7 +40,7 @@ public class ProductBiModel {
private double outputQty;
@ApiParam(value = "完成率")
private double CompleteRate;
private double completeRate;
@ApiParam(value = "合格数量")
private double passQty;
@ -53,6 +54,9 @@ public class ProductBiModel {
@ApiParam(value = "不良率")
private double ngRate;
@ApiParam(value = "警戒值")
private double sentinelValue;
@ApiParam("客户代码")
private String customerCode;
@ -65,12 +69,16 @@ public class ProductBiModel {
@ApiParam("图表显示的数据")
private List<ProductBiSeriesModel> series;
@ApiParam("列名")
private Map<String, String> colMap;
@Deprecated
public double getCompleteRate() {
if(this.planQty != 0) {
this.CompleteRate = outputQty / planQty;
if (this.planQty != 0) {
this.completeRate = outputQty / planQty;
} else {
this.CompleteRate = 0;
this.completeRate = 0;
}
return this.CompleteRate;
return this.completeRate;
}
}

@ -1,6 +1,5 @@
package cn.estsh.i3plus.pojo.mes.model;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;

@ -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.MesQualityStandardCfg;
/**
* @Description:
* @Reference:
* @Author: joke.wang
* @CreateDate: 2019\11\13 11:53
* @Modify:
**/
public interface MesQualityStandardCfgRepository extends BaseRepository<MesQualityStandardCfg, Long> {
}
Loading…
Cancel
Save