Merge branch 'dev' into test

yun-zuoyi
王杰 6 years ago
commit e9055e3c5d

@ -12,6 +12,100 @@ import com.fasterxml.jackson.annotation.JsonFormat;
public class MesEnumUtil {
/**
* PCNMES
* 10.
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SYNC_TYPE {
GET_MES_DATA(1, "pcn获取mes数据"),
DATA_TO_MES(2, "pcn推送数据至mes");
private int value;
private String description;
SYNC_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;
}
}
/**
* PCNMES
* 10.
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SYNC_PATTERN {
UPDATE(1, "修改或新增"),
INSERT(2, "新增");
private int value;
private String description;
SYNC_PATTERN(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_TYPE_CFG
@ -443,6 +537,16 @@ public class MesEnumUtil {
}
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;
}
}
/**
@ -1132,7 +1236,9 @@ public class MesEnumUtil {
MES_PLAN_ORDER(10, "生产计划"),
MES_EQUIPMENT(20, "设备台账"),
MES_EQU_TASK_STANDARD(30, "设备作业要求"),
MES_CUST_ORDER(40, "客户订单");
MES_CUST_ORDER(40, "客户订单"),
MES_PCN_SYNC_CFG(50, "PCN同步配置"),
MES_PART(60, "物料表");
private int value;
private String description;

@ -1,6 +1,7 @@
package cn.estsh.i3plus.pojo.mes.pcn.model;
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesProduceSn;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;

@ -0,0 +1,35 @@
package cn.estsh.i3plus.pojo.mes.model;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Author: wangjie
* @CreateDate: 2019/8/21 9:19 AM
* @Description:
**/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Api("MesPcnSyncCfg数据同步抽取条件model")
public class DataSyncExtractConditionModel implements Serializable {
@ApiParam("字段")
private String field;
@ApiParam("条件")
private String condition;
@ApiParam("值")
private Object value;
@ApiParam("数据类型")
private Integer innerType;
}

@ -18,7 +18,7 @@ import java.io.Serializable;
@NoArgsConstructor
@AllArgsConstructor
@Api("mes导入异常结果model")
public class MesExcelErrorModel implements Serializable {
public class ExcelImportErrorModel implements Serializable {
@ApiParam("错误的行号")
private int rowNum;

@ -19,7 +19,7 @@ import java.util.List;
@NoArgsConstructor
@AllArgsConstructor
@Api("mes导入结果model")
public class MesExcelResultModel<T> implements Serializable {
public class ExcelImportResultModel<T> implements Serializable {
@ApiParam("结果")
private boolean result;
@ -31,7 +31,7 @@ public class MesExcelResultModel<T> implements Serializable {
private int failRowNum;
@ApiParam("错误信息集合")
private List<MesExcelErrorModel> mesExcelErrorModel;
private List<ExcelImportErrorModel> excelImportErrorModels;
@ApiParam("错误的行号")
private String errorRows;
Loading…
Cancel
Save