Merge branch 'dev' into test

yun-zuoyi
王杰 6 years ago
commit 35cf3cf162

@ -1,5 +1,7 @@
package cn.estsh.i3plus.pojo.aps.annotation; package cn.estsh.i3plus.pojo.aps.annotation;
import cn.estsh.i3plus.pojo.aps.enums.EDIT_TYPE;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy; import java.lang.annotation.RetentionPolicy;
@ -22,4 +24,5 @@ public @interface FieldAnnotation {
boolean mainkey() default false; // 是否为主键 boolean mainkey() default false; // 是否为主键
String defaultValue() default ""; // 字段的默认值 String defaultValue() default ""; // 字段的默认值
boolean popSearch() default false; // 弹出选择对象时是否显示 boolean popSearch() default false; // 弹出选择对象时是否显示
EDIT_TYPE editType() default EDIT_TYPE.NONE; // 定义字段的编辑类型
} }

@ -1,6 +1,7 @@
package cn.estsh.i3plus.pojo.aps.bean; package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.common.BaseCode; import cn.estsh.i3plus.pojo.aps.common.BaseCode;
import cn.estsh.i3plus.pojo.aps.enums.EDIT_TYPE;
import cn.estsh.i3plus.pojo.aps.enums.FIELD_TYPE; import cn.estsh.i3plus.pojo.aps.enums.FIELD_TYPE;
import cn.estsh.i3plus.pojo.base.bean.BaseBean; import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnore;
@ -92,6 +93,10 @@ public class FieldInfo extends BaseCode {
@ApiParam(value ="弹出选择时是否显示") @ApiParam(value ="弹出选择时是否显示")
private Boolean popSearch; private Boolean popSearch;
@Column(name="EDIT_TYPE")
@ApiParam(value ="字段编辑类型")
private EDIT_TYPE editType;
@ApiParam(value ="枚举项内容") @ApiParam(value ="枚举项内容")
private transient Enum<?>[] enumItems; private transient Enum<?>[] enumItems;

@ -70,7 +70,7 @@ public class Material extends BaseCode {
@Column(name="LEVEL") @Column(name="LEVEL")
@ApiParam(value ="低阶码") @ApiParam(value ="低阶码")
@RippleAnnotation(dependence = {"OperOutputs.Operation.ProductRouting.Material"}, method = "calcLevel") @RippleAnnotation(dependence = {"OperInputs.Operation.ProductRouting.Material.level"}, method = "calcLevel")
@FieldAnnotation(modify = false) @FieldAnnotation(modify = false)
private Integer level; private Integer level;

@ -1,7 +1,9 @@
package cn.estsh.i3plus.pojo.aps.bean; package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.aps.common.BaseAPS; import cn.estsh.i3plus.pojo.aps.common.BaseAPS;
import cn.estsh.i3plus.pojo.aps.common.BeanRelation; import cn.estsh.i3plus.pojo.aps.common.BeanRelation;
import cn.estsh.i3plus.pojo.aps.enums.EDIT_TYPE;
import cn.estsh.i3plus.pojo.aps.holders.EResCalendar; import cn.estsh.i3plus.pojo.aps.holders.EResCalendar;
import com.fasterxml.jackson.annotation.JsonBackReference; import com.fasterxml.jackson.annotation.JsonBackReference;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -27,6 +29,7 @@ import java.util.List;
public class ResCalendar extends BaseAPS { public class ResCalendar extends BaseAPS {
@Column(name="RES_CODES") @Column(name="RES_CODES")
@ApiParam(value ="资源代码") @ApiParam(value ="资源代码")
@FieldAnnotation(editType = EDIT_TYPE.MULTI_OBJECT)
private String resCodes; private String resCodes;
@Column(name="WEEKS") @Column(name="WEEKS")

@ -2,6 +2,7 @@ package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation; import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.aps.common.BaseAPS; import cn.estsh.i3plus.pojo.aps.common.BaseAPS;
import cn.estsh.i3plus.pojo.aps.enums.ROUTING_VALID_TYPE;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import lombok.Data; import lombok.Data;
@ -31,6 +32,10 @@ public class SysParam extends BaseAPS {
@ApiParam(value ="最大中断次数") @ApiParam(value ="最大中断次数")
private Integer maxInterruptCount; private Integer maxInterruptCount;
@Column(name="TYPE")
@ApiParam(value ="工艺路径有效判断类型")
private ROUTING_VALID_TYPE type;
@Column(name="RULE_GROUP_ID") @Column(name="RULE_GROUP_ID")
@ApiParam(value ="规则组id") @ApiParam(value ="规则组id")
@FieldAnnotation(display = false) @FieldAnnotation(display = false)

@ -400,4 +400,38 @@ public class BeanRelation {
recursionImpl(relaBean, fun, holders, index + 1); recursionImpl(relaBean, fun, holders, index + 1);
} }
} }
/**
* targetbeanholders
* @param bean
* @param target
* @param holders
* @return
*/
public static boolean recursionContains(BaseBean bean, BaseBean target, Enum<?>... holders) {
if (holders.length == 0) {
return false;
}
return recursionContainsImpl(bean, target, holders, 0);
}
private final static boolean recursionContainsImpl(BaseBean bean, BaseBean target,
Enum<?>[] holders, int index) {
if (index >= holders.length) {
if (target == bean) {
return true;
}
index = 0;
}
List<BaseBean> relaBeans = list(bean, holders[index]);
for (BaseBean relaBean : relaBeans) {
if (recursionContainsImpl(relaBean, target, holders, index + 1)) {
return true;
}
}
return false;
}
} }

@ -25,7 +25,7 @@ public class DateDuration {
public static final double PRECISION = 0.00001; public static final double PRECISION = 0.00001;
private String value; private String value;
private long time = 0; private int time = 0;
private double rate = 0.0; private double rate = 0.0;
private boolean bValid = false; private boolean bValid = false;
@ -60,7 +60,7 @@ public class DateDuration {
* 0 * 0
* @return * @return
*/ */
public long getTime() { public int getTime() {
return this.time; return this.time;
} }
@ -68,7 +68,7 @@ public class DateDuration {
* *
* @return * @return
*/ */
public void setTime(long time) { public void setTime(int time) {
this.time = time; this.time = time;
} }

@ -0,0 +1,28 @@
package cn.estsh.i3plus.pojo.aps.enums;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
public enum EDIT_TYPE {
NONE,
BOOLEAN, // 布尔, 开关编辑
CHAR, // 字符, 文本框编辑
SHORT, // 短整型, 数字编辑
INTEGER, // 整型, 数字编辑
LONG, // 长整型, 数字编辑
DOUBLE, // 浮点型, 文本框编辑
DATE, // 日期类型(2019-09-16)
TIME, // 时间类型(17:35:30)
DATE_TIME, // 日期时间类型(2019-09-16 17:35:30)
DURATION, // 时间段(1H),文本框编辑
ENUM, // 枚举,下拉选择
MULTI_ENUM, // 多选枚举, 下拉多选
STRING, // 字符串,文本框编辑
OBJECT, // 关联对象下来选择关联对象的Code值
LIST, // 对象集合,不可编辑。
MULTI_OBJECT // 多选对象,弹出框选择,可以选择全部对象,以*表示选择全部
}

@ -0,0 +1,14 @@
package cn.estsh.i3plus.pojo.aps.enums;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-10-29
* @Modify:
**/
public enum ROUTING_VALID_TYPE {
ORDER_CALC_LET, // 与订单的最晚结束时刻计算值做比较
CALC_LET_LT, // 与最晚结束时刻计算值-提前期做比较
BASE_TIME // 与基准时刻做比较
}

@ -12,6 +12,43 @@ import com.fasterxml.jackson.annotation.JsonFormat;
public class MesEnumUtil { public class MesEnumUtil {
/** /**
* MesScrap
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SCRAP_TYPE {
SCRAP_TYPE(10, "过期"),
SCRAP_TYPE2(20, "不合格"),
SCRAP_TYPE3(30, "缺失");
private int value;
private String description;
SCRAP_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;
}
}
/**
* mes * mes
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)

@ -12,6 +12,82 @@ import org.apache.commons.lang3.StringUtils;
**/ **/
public class MesPcnEnumUtil { public class MesPcnEnumUtil {
/**
* MesScrap
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SCRAP_TYPE {
SCRAP_TYPE(10, "过期"),
SCRAP_TYPE2(20, "不合格"),
SCRAP_TYPE3(30, "缺失");
private int value;
private String description;
SCRAP_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
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PRODUCE_SN_QC_STATUS {
QUALIFIED(10, "合格"),
DEFECTED(20, "不合格"),
SCRAPED(30, "报废"),
DISMANTLED(40, "已拆解");
private int value;
private String description;
PRODUCE_SN_QC_STATUS(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;
}
}
/** /**
* mes * mes
*/ */

@ -53,6 +53,10 @@ public class MesDefectRecord extends BaseBean {
@ApiParam("缺陷位置") @ApiParam("缺陷位置")
private String defectLocation; private String defectLocation;
@Column(name = "SIDE_LOCATION")
@ApiParam("面位")
private String sideLocation;
@Column(name="REPAIR_STATUS") @Column(name="REPAIR_STATUS")
@ApiParam("维修状态") @ApiParam("维修状态")
private Integer repairStatus; private Integer repairStatus;

@ -36,4 +36,8 @@ public class MesScrap extends BaseBean {
@ApiParam("报废名称") @ApiParam("报废名称")
private String scrapName; private String scrapName;
@Column(name = "SCRAP_TYPE")
@ApiParam("报废类型")
private String scrapType;
} }

@ -60,10 +60,6 @@ public class MesScrapRecord extends BaseBean {
@ApiParam("工位") @ApiParam("工位")
private String workCellCode; private String workCellCode;
@Column(name = "SCRAP_REASON")
@ApiParam("报废原因")
private String scrapReason;
@Column(name = "MEMO") @Column(name = "MEMO")
@ApiParam("备注") @ApiParam("备注")
private String memo; private String memo;

@ -36,6 +36,16 @@ public class MesProdBindRecordModel {
private Integer missQty; private Integer missQty;
@ApiParam("报废数") @ApiParam("报废数")
private Integer scrapQty; private Integer scrapQty;
@ApiParam("创建时间")
private String createUser;
@ApiParam("创建时间")
private String createDatetime;
@ApiParam("修改人")
private String modifyUser;
@ApiParam("修改时间")
private String modifyDatetime;
@ApiParam("产品条码")
private String serialNumber;
public MesProdBindRecordModel() { public MesProdBindRecordModel() {
} }
@ -72,4 +82,26 @@ public class MesProdBindRecordModel {
this.parentPartNo = parentPartNo; this.parentPartNo = parentPartNo;
this.parentPartName = parentPartName; this.parentPartName = parentPartName;
} }
public MesProdBindRecordModel(Long id, String itemPartNo, String itemPartName, Double qty, Integer isValid, Integer isDeleted, String organizeCode, Integer isFeed, String workCenterCode, String workCellCode, String kpSn, String parentPartNo, String parentPartName, String createUser, String createDatetime, String modifyUser, String modifyDatetime, String serialNumber) {
this.id = id;
this.itemPartNo = itemPartNo;
this.itemPartName = itemPartName;
this.qty = qty;
this.isValid = isValid;
this.isDeleted = isDeleted;
this.organizeCode = organizeCode;
this.isFeed = isFeed;
this.workCenterCode = workCenterCode;
this.workCellCode = workCellCode;
this.kpSn = kpSn;
this.parentPartNo = parentPartNo;
this.parentPartName = parentPartName;
this.createUser = createUser;
this.createDatetime = createDatetime;
this.modifyUser = modifyUser;
this.modifyDatetime = modifyDatetime;
this.serialNumber = serialNumber;
}
} }

@ -220,4 +220,64 @@ public class MesHqlPack {
return packBean; return packBean;
} }
/**
* MES PCN
*
* @param mesRepair
* @return
*/
public static DdlPackBean getMesRepair(MesRepair mesRepair, String organizeCode) {
DdlPackBean packBean = getAllBaseData(organizeCode);
if (StringUtils.isNotEmpty(mesRepair.getRepairCode())) {
DdlPreparedPack.getStringLikerPack(mesRepair.getRepairCode(), "repairCode", packBean);
}
if (StringUtils.isNotEmpty(mesRepair.getRepairName())) {
DdlPreparedPack.getStringLikerPack(mesRepair.getRepairName(), "repairName", packBean);
}
if (mesRepair.getRepairType() != null) {
DdlPreparedPack.getNumEqualPack(mesRepair.getRepairType(), "repairType", packBean);
}
return packBean;
}
/**
* MES PCN
*
* @param mesScrap
* @return
*/
public static DdlPackBean getMesScrap(MesScrap mesScrap, String organizeCode) {
DdlPackBean packBean = getAllBaseData(organizeCode);
if (StringUtils.isNotEmpty(mesScrap.getScrapCode())) {
DdlPreparedPack.getStringLikerPack(mesScrap.getScrapCode(), "scrapCode", packBean);
}
if (StringUtils.isNotEmpty(mesScrap.getScrapName())) {
DdlPreparedPack.getStringLikerPack(mesScrap.getScrapName(), "scrapName", packBean);
}
if (StringUtils.isNotEmpty(mesScrap.getScrapType())) {
DdlPreparedPack.getStringLikerPack(mesScrap.getScrapType(), "scrapType", packBean);
}
return packBean;
}
/**
* MES PCN
*
* @param mesDefectCause
* @return
*/
public static DdlPackBean getMesDefectCause(MesDefectCause mesDefectCause, String organizeCode) {
DdlPackBean packBean = getAllBaseData(organizeCode);
if (StringUtils.isNotEmpty(mesDefectCause.getDcCode())) {
DdlPreparedPack.getStringLikerPack(mesDefectCause.getDcCode(), "dcCode", packBean);
}
if (StringUtils.isNotEmpty(mesDefectCause.getDcName())) {
DdlPreparedPack.getStringLikerPack(mesDefectCause.getDcName(), "dcName", packBean);
}
if (mesDefectCause.getDcType() != null) {
DdlPreparedPack.getNumEqualPack(mesDefectCause.getDcType(), "dcType", packBean);
}
return packBean;
}
} }

Loading…
Cancel
Save