Merge branch 'dev' into test

yun-zuoyi
王杰 6 years ago
commit 52f4854621

@ -17,6 +17,10 @@
<groupId>i3plus.pojo</groupId>
<artifactId>i3plus-pojo-base</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
</dependency>
</dependencies>
</project>

@ -0,0 +1,20 @@
package cn.estsh.i3plus.pojo.aps.annotation;
import cn.estsh.i3plus.pojo.aps.validator.InsertGroup;
import cn.estsh.i3plus.pojo.aps.validator.MainKeyValidator;
import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy={MainKeyValidator.class})
public @interface MainKey {
String message() default "主键重复";
Class<?>[] groups() default {};
Class<? extends Payload>[] payload() default {};
}

@ -13,6 +13,8 @@ import lombok.EqualsAndHashCode;
import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import java.util.Date;
import java.util.List;
@ -37,6 +39,7 @@ public class BaseOrder extends BaseCode {
@Column(name="COUNT")
@ApiParam(value ="数量")
@FieldAnnotation(notEmpty = true)
@Min(0)
private Double count;
@Column(name="PRIORITY")

@ -1,6 +1,8 @@
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.base.enumutil.ApsEnumUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -11,6 +13,7 @@ import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.Min;
/**
* @Description :
@ -30,17 +33,21 @@ public class FurnaceCapacity extends BaseAPS {
@Column(name="RES_CODES")
@ApiParam(value ="资源编码")
@FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.MULTI_OBJECT, typeName = "Resource", notEmpty = true)
private String resCodes;
@Column(name="STAND_CODE")
@ApiParam(value ="标准工序编码")
@FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.MULTI_OBJECT, typeName = "StandOperation")
private String standCode;
@Column(name="MATERIAL_CODE")
@ApiParam(value ="物料编码")
@FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.MULTI_OBJECT, typeName = "Material")
private String materialCode;
@Column(name="CAPACITY")
@ApiParam(value ="容量限制")
@Min(0)
private Double capacity;
}

@ -1,6 +1,8 @@
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.base.enumutil.ApsEnumUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -30,6 +32,7 @@ public class FurnaceSetting extends BaseAPS {
@Column(name="RES_CODES")
@ApiParam(value ="资源编码")
@FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.MULTI_OBJECT, typeName = "Resource", notEmpty = true)
private String resCodes;
@Column(name="SAME_MATERIAL")

@ -1,6 +1,8 @@
package cn.estsh.i3plus.pojo.aps.common;
import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.aps.annotation.MainKey;
import cn.estsh.i3plus.pojo.aps.validator.InsertGroup;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -18,6 +20,7 @@ import javax.persistence.MappedSuperclass;
@Data
@EqualsAndHashCode(callSuper = true)
@MappedSuperclass
@MainKey(groups = {InsertGroup.class})
public abstract class BaseCode extends BaseAPS {
@Column(name="CODE")
@ApiParam(value ="编码")

@ -0,0 +1,4 @@
package cn.estsh.i3plus.pojo.aps.validator;
public interface InsertGroup {
}

@ -0,0 +1,14 @@
package cn.estsh.i3plus.pojo.aps.validator;
import cn.estsh.i3plus.pojo.aps.annotation.MainKey;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
public class MainKeyValidator implements ConstraintValidator<MainKey, BaseBean> {
@Override
public boolean isValid(BaseBean bean, ConstraintValidatorContext constraintValidatorContext) {
return false;
}
}

@ -1308,7 +1308,7 @@ public class MesEnumUtil {
MES_SHIFT(180, "班次"),
MES_SHIFT_GROUP(190, "班组"),
MES_WORK_CELL_PARAM_CFG(200, "工作单元参数配置"),
MES_PROCESS_BOM(210, "工序BOM表");
MES_STATION_BOM(210, "工位BOM表");
private int value;
private String description;
@ -1461,10 +1461,10 @@ public class MesEnumUtil {
}
/**
* mes
* mes Bom
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_IS_REPEAT {
public enum MES_STATION_BOM_IS_REPEAT {
REPEATABLE(1, "可重复"),
NOT_REPEAT(2, "不可重复");
@ -1472,7 +1472,7 @@ public class MesEnumUtil {
private int value;
private String description;
MES_IS_REPEAT(int value, String description) {
MES_STATION_BOM_IS_REPEAT(int value, String description) {
this.value = value;
this.description = description;
}
@ -1486,8 +1486,8 @@ public class MesEnumUtil {
}
// 根据value返回枚举类型,主要在switch中使用
public static MES_IS_REPEAT getByValue(int value) {
for (MES_IS_REPEAT mesInsertExcel : values()) {
public static MES_STATION_BOM_IS_REPEAT getByValue(int value) {
for (MES_STATION_BOM_IS_REPEAT mesInsertExcel : values()) {
if (mesInsertExcel.getValue() == value) {
return mesInsertExcel;
}
@ -1506,6 +1506,157 @@ 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;
}
}
/**
* mes Bom
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_STATION_BOM_IS_CHECK {
REPEATABLE(1, "是"),
NOT_REPEAT(2, "否");
private int value;
private String description;
MES_STATION_BOM_IS_CHECK(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 Bom
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_STATION_BOM_IS_FEED {
REPEATABLE(1, "是"),
NOT_REPEAT(2, "否");
private int value;
private String description;
MES_STATION_BOM_IS_FEED(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 Bom
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum MES_STATION_BOM_IS_BIND_KEY {
REPEATABLE(1, "是"),
NOT_REPEAT(2, "否");
private int value;
private String description;
MES_STATION_BOM_IS_BIND_KEY(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;
}
}
/**

@ -33,6 +33,8 @@ public class RequestModel {
private Integer destStatus; // 目的状态
private List<String> orderNoList;//工单编号
public RequestModel(List<MesQueueOrder> queueOrderList, Double currentSeq, Double nextSeq) {
this.queueOrderList = queueOrderList;
this.currentSeq = currentSeq;
@ -101,6 +103,14 @@ public class RequestModel {
this.queueOrderList = queueOrderList;
}
public void setOrderNoList(List<String> orderNoList) {
this.orderNoList = orderNoList;
}
public List<String> getOrderNoList() {
return orderNoList;
}
public Double getCurrentSeq() {
return currentSeq == null ? 0.0d : currentSeq;
}

@ -16,7 +16,7 @@ import javax.persistence.Table;
import javax.persistence.Transient;
/**
* @Description :
* @Description :
* @Reference :
* @Author : jack.jia
* @CreateDate : 2019-04-02
@ -28,7 +28,7 @@ import javax.persistence.Transient;
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_STATION_BOM")
@Api("工物料清单")
@Api("工物料清单")
public class MesStationBom extends BaseBean {
@Column(name = "PART_NO")
@ApiParam("零件号")

@ -32,6 +32,10 @@ public class RequestModel {
private Integer destStatus; // 目的状态
private List<String> orderNoList;//工单编号
private List<ActionRequestBean> requestBeanList;//工单下达
public RequestModel(List<MesQueueOrder> queueOrderList, Double currentSeq, Double nextSeq) {
this.queueOrderList = queueOrderList;
this.currentSeq = currentSeq;
@ -84,6 +88,20 @@ public class RequestModel {
this.queueOrderList = queueOrderList;
}
public void setOrderNoList(List<String> orderNoList) {
this.orderNoList = orderNoList;
}
public List<String> getOrderNoList() {
return orderNoList;
}
public void setRequestBeanList(List<ActionRequestBean> requestBeanList) {
this.requestBeanList = requestBeanList;
}
public List<ActionRequestBean> getRequestBeanList() { return requestBeanList; }
public Double getCurrentSeq() {
return currentSeq == null ? 0.0d : currentSeq;
}

Loading…
Cancel
Save