yun-zuoyi
wynne1005 4 years ago
commit 261d5b3655

3
.gitignore vendored

@ -13,4 +13,5 @@ target
.md .md
*.log *.log
*.properties *.properties
.DS_Store .DS_Store
pom.xml

@ -0,0 +1,26 @@
package cn.estsh.i3plus.pojo.aps.annotation;
import cn.estsh.i3plus.pojo.aps.validator.CalendarTimeValidator;
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;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2021-04-23
* @Modify:
**/
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy={CalendarTimeValidator.class})
public @interface CalendarTimeAnntation {
String message() default "日历时间格式错误,示例(多个以逗号分隔)2020-01-01~2020-02-01";
Class<?>[] groups() default {};
Class<? extends Payload>[] payload() default {};
}

@ -15,4 +15,6 @@ import java.lang.annotation.Target;
@Target(ElementType.TYPE) @Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
public @interface ExcludeImportExport { public @interface ExcludeImportExport {
boolean excludeImport() default true;
boolean excludeExport() default true;
} }

@ -0,0 +1,26 @@
package cn.estsh.i3plus.pojo.aps.annotation;
import cn.estsh.i3plus.pojo.aps.validator.ShiftTimeValidator;
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;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-11-29
* @Modify:
**/
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy={ShiftTimeValidator.class})
public @interface ShiftTimeAnnotation {
String message() default "班次时间格式错误示例多个以逗号分隔01:00-08:20";
Class<?>[] groups() default {};
Class<? extends Payload>[] payload() default {};
}

@ -8,6 +8,7 @@ import cn.estsh.i3plus.pojo.aps.common.BeanRelation;
import cn.estsh.i3plus.pojo.aps.holders.EBaseOrder; import cn.estsh.i3plus.pojo.aps.holders.EBaseOrder;
import cn.estsh.i3plus.pojo.aps.validator.InsertGroup; import cn.estsh.i3plus.pojo.aps.validator.InsertGroup;
import cn.estsh.i3plus.pojo.aps.validator.UpdateGroup; import cn.estsh.i3plus.pojo.aps.validator.UpdateGroup;
import cn.estsh.i3plus.pojo.base.enumutil.ApsEnumUtil;
import com.fasterxml.jackson.annotation.JsonBackReference; import com.fasterxml.jackson.annotation.JsonBackReference;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
@ -56,10 +57,10 @@ public class BaseOrder extends BaseAPS {
@Min(0) @Min(0)
private Double count; private Double count;
@Column(name="PRIORITY") @Column(name="PRIORITY_ID")
@ApiParam(value ="优先级") @ApiParam(value ="优先级")
@FieldAnnotation(defaultValue = "10") @FieldAnnotation(relation = "Priority")
private Integer priority; private Long priorityId;
@Column(name="LET") @Column(name="LET")
@ApiParam(value ="最晚结束时刻") @ApiParam(value ="最晚结束时刻")
@ -93,6 +94,21 @@ public class BaseOrder extends BaseAPS {
@ApiParam(value ="专料号") @ApiParam(value ="专料号")
private String specifyMaterialNum; private String specifyMaterialNum;
@Column(name="VALID_ORDER")
@ApiParam(value ="有效订单")
@FieldAnnotation(modify = false)
private Boolean validOrder = true;
@Column(name="INVALID_REASON")
@ApiParam(value ="无效原因")
@FieldAnnotation(modify = false)
private String invalidReason;
@Column(name="DELAY_TIME")
@ApiParam(value ="延期时间")
@FieldAnnotation(modify = false)
private Integer delayTime;
@JsonBackReference @JsonBackReference
public List<Work> getWorks() { public List<Work> getWorks() {
return BeanRelation.list(this, EBaseOrder.Works); return BeanRelation.list(this, EBaseOrder.Works);
@ -116,4 +132,11 @@ public class BaseOrder extends BaseAPS {
public List<WorkRelation> getPostRelations() { public List<WorkRelation> getPostRelations() {
return BeanRelation.list(this, EBaseOrder.PostRelations); return BeanRelation.list(this, EBaseOrder.PostRelations);
} }
public PriorityType getPriority() { return BeanRelation.get(this, EBaseOrder.Priority); }
public void setPriority(PriorityType priority) {
this.priorityId = priority != null ? priority.getId() : 0;
BeanRelation.set(this, EBaseOrder.Priority, priority);
}
} }

@ -2,7 +2,9 @@ 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.annotation.MainKey; import cn.estsh.i3plus.pojo.aps.annotation.MainKey;
import cn.estsh.i3plus.pojo.aps.annotation.ShiftTimeAnnotation;
import cn.estsh.i3plus.pojo.aps.common.BaseAPS; import cn.estsh.i3plus.pojo.aps.common.BaseAPS;
import cn.estsh.i3plus.pojo.aps.validator.ImportGroup;
import cn.estsh.i3plus.pojo.aps.validator.InsertGroup; import cn.estsh.i3plus.pojo.aps.validator.InsertGroup;
import cn.estsh.i3plus.pojo.aps.validator.UpdateGroup; import cn.estsh.i3plus.pojo.aps.validator.UpdateGroup;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -42,5 +44,6 @@ public class DayShift extends BaseAPS {
@Column(name="WORK_TIMES") @Column(name="WORK_TIMES")
@ApiParam(value ="工作时间") @ApiParam(value ="工作时间")
@FieldAnnotation(notEmpty = true) @FieldAnnotation(notEmpty = true)
@ShiftTimeAnnotation(groups = {InsertGroup.class, UpdateGroup.class, ImportGroup.class})
private String workTimes; private String workTimes;
} }

@ -27,7 +27,7 @@ public class FieldSetRule extends BaseRule {
private static final long serialVersionUID = 6880145972942618559L; private static final long serialVersionUID = 6880145972942618559L;
@Column(name="BEAN") @Column(name="BEAN")
@ApiParam(value ="实体名") @ApiParam(value ="实体名")
private ApsEnumUtil.FIELD_SET_BEAN bean; private String bean;
@Column(name="FILTER") @Column(name="FILTER")
@ApiParam(value ="筛选") @ApiParam(value ="筛选")

@ -20,4 +20,5 @@ import javax.persistence.Table;
@Table(name = "APS_FLUSH_PLAN_RULE") @Table(name = "APS_FLUSH_PLAN_RULE")
@Api("刷新计划规则") @Api("刷新计划规则")
public class FlushPlanRule extends BaseRule { public class FlushPlanRule extends BaseRule {
private static final long serialVersionUID = 4973034215598612466L;
} }

@ -37,6 +37,14 @@ public class FurnacePlan extends BaseAPS {
@ApiParam(value ="已占用的能力") @ApiParam(value ="已占用的能力")
private Double capacity; private Double capacity;
@Column(name="CAPACITY_LIMIT", columnDefinition = "decimal(18,8)")
@ApiParam(value ="容量限制")
private Double capacityLimit;
@Column(name="MIN_PRODUCT_BATCH")
@ApiParam(value ="最小加工批量")
private Integer minProductBatch;
@JsonBackReference @JsonBackReference
public List<WorkPlan> getWorkPlans() { return BeanRelation.list(this, EFurnacePlan.WorkPlans); } public List<WorkPlan> getWorkPlans() { return BeanRelation.list(this, EFurnacePlan.WorkPlans); }
} }

@ -0,0 +1,46 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.base.enumutil.ApsEnumUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Lob;
import javax.persistence.Table;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2021-03-24
* @Modify:
**/
@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "APS_HEURISTIC_OPTIMIZE")
@Api("排程优化规则")
public class HeuristicOptimize extends BaseRule {
private static final long serialVersionUID = -464821596740369199L;
@Column(name="WORK_FILTER")
@ApiParam(value ="工作筛选")
private String workFilter;
@Column(name="RES_FILTER")
@ApiParam(value ="资源筛选")
private String resFilter;
@Lob
@Column(name="RES_SELECT")
@ApiParam(value ="资源选择")
private String resSelect;
@Column(name="OPTIMIZE_INTERVAL")
@ApiParam(value ="优化间隔")
private String optimizeInterval;
}

@ -30,6 +30,10 @@ public class HeuristicRule extends BaseRule {
@ApiParam(value ="工作筛选") @ApiParam(value ="工作筛选")
private String workFilter; private String workFilter;
@Column(name="RES_FILTER")
@ApiParam(value ="资源筛选")
private String resFilter;
@Lob @Lob
@Column(name="WORK_SORT") @Column(name="WORK_SORT")
@ApiParam(value ="工作排序") @ApiParam(value ="工作排序")

@ -1,10 +1,15 @@
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.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.aps.annotation.MainKey;
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.holders.EImportDetail; import cn.estsh.i3plus.pojo.aps.holders.EImportDetail;
import cn.estsh.i3plus.pojo.aps.model.ImportDataModel;
import cn.estsh.i3plus.pojo.aps.validator.InsertGroup;
import cn.estsh.i3plus.pojo.aps.validator.UpdateGroup;
import cn.estsh.i3plus.pojo.base.enumutil.ApsEnumUtil; import cn.estsh.i3plus.pojo.base.enumutil.ApsEnumUtil;
import com.fasterxml.jackson.annotation.JsonBackReference;
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;
@ -12,7 +17,9 @@ import lombok.EqualsAndHashCode;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Lob;
import javax.persistence.Table; import javax.persistence.Table;
import java.util.List;
/** /**
* @Description : * @Description :
@ -26,20 +33,63 @@ import javax.persistence.Table;
@Entity @Entity
@Table(name = "APS_IMPORT_DETAIL") @Table(name = "APS_IMPORT_DETAIL")
@Api("数据导入明细") @Api("数据导入明细")
@MainKey(groups = {InsertGroup.class, UpdateGroup.class})
public class ImportDetail extends BaseAPS { public class ImportDetail extends BaseAPS {
private static final long serialVersionUID = 1264030397500660450L; private static final long serialVersionUID = 1264030397500660450L;
@Column(name="NAME")
@ApiParam(value ="名称")
@FieldAnnotation(notEmpty = true, mainkey = true)
private String name;
@Column(name="GROUP_NAME")
@ApiParam(value ="分组名称")
@FieldAnnotation(notEmpty = true)
private String groupName;
@Column(name="SUB_GROUP_NAME")
@ApiParam(value ="子分组名称")
@FieldAnnotation(notEmpty = true)
private String subGroupName;
@Column(name="LINK_TYPE")
@ApiParam(value ="链接类型")
@FieldAnnotation(defaultValue = "EXCEL", notEmpty = true)
private ApsEnumUtil.DATA_LINK_TYPE linkType;
@Column(name="PATH")
@ApiParam(value ="IP/文件路径")
private String path;
@Column(name="OUT_NAME") @Column(name="OUT_NAME")
@ApiParam(value ="外部表名") @ApiParam(value ="外部表名")
private String outName; private String outName;
@Column(name="IN_NAME") @Column(name="IN_NAME")
@ApiParam(value ="内部表名") @ApiParam(value ="内部表名")
@FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.QUERY_LIST, notEmpty = true)
private String inName; private String inName;
@Column(name="PORT")
@ApiParam(value ="端口")
private Integer port;
@Column(name="DB_NAME")
@ApiParam(value ="数据库名")
private String dbName;
@Column(name="USER_NAME")
@ApiParam(value ="用户名")
private String userName;
@Column(name="PASSWORD")
@ApiParam(value ="密码")
private String password;
@Column(name="IMPORT_TYPE") @Column(name="IMPORT_TYPE")
@ApiParam(value ="导入类型") @ApiParam(value ="导入类型")
@FieldAnnotation(defaultValue = "REPLACE") @FieldAnnotation(defaultValue = "DIFF")
private ApsEnumUtil.IMPORT_DETAIL_TYPE importType; private ApsEnumUtil.IMPORT_DETAIL_TYPE importType;
@Column(name="SKIP_ROWS") @Column(name="SKIP_ROWS")
@ -53,10 +103,23 @@ public class ImportDetail extends BaseAPS {
private Integer orderNumber; private Integer orderNumber;
@Column(name="PROJECT_ID") @Column(name="PROJECT_ID")
@ApiParam(value ="导入项目ID") @ApiParam(value ="导入项目")
@FieldAnnotation(relation = "Project") @FieldAnnotation(relation = "Project", property = false)
private Long projectId; private Long projectId;
@Lob
@Column(name="INNER_FILTER")
@ApiParam(value ="内部对象筛选")
private String innerFilter;
@Lob
@Column(name="OUTTER_FILTER")
@ApiParam(value ="外部对象筛选")
private String outterFilter;
@FieldAnnotation(property = false)
private transient ImportDataModel model;
public ImportProject getProject() { public ImportProject getProject() {
return BeanRelation.get(this, EImportDetail.Project); return BeanRelation.get(this, EImportDetail.Project);
} }
@ -65,4 +128,9 @@ public class ImportDetail extends BaseAPS {
this.projectId = project != null ? project.getId() : 0l; this.projectId = project != null ? project.getId() : 0l;
BeanRelation.set(this, EImportDetail.Project, project); BeanRelation.set(this, EImportDetail.Project, project);
} }
@JsonBackReference
public List<ImportField> getFields() {
return BeanRelation.list(this, EImportDetail.Fields);
}
} }

@ -0,0 +1,86 @@
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.BeanRelation;
import cn.estsh.i3plus.pojo.aps.holders.EImportDetail;
import cn.estsh.i3plus.pojo.aps.holders.EImportField;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-23
* @Modify:
**/
@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "APS_IMPORT_FIELD")
@Api("数据导入字段配置")
public class ImportField extends BaseAPS {
private static final long serialVersionUID = 8848879008582197564L;
@Column(name="FIELD_NAME")
@ApiParam("字段名")
private String fieldName;
@Column(name="LABEL_NAME")
@ApiParam("标签名称")
private String labelName;
@Column(name="DEFAULT_VALUE")
@ApiParam("默认值")
private String defaultValue;
/**
* 1-2-
*/
@Column(name="IS_REQUIRE")
@ApiParam(value = "是否必填", example = "0")
private Integer isRequire;
@Column(name="MAX_LENGTH")
@ApiParam(value = "最大长度", example = "0")
@FieldAnnotation(defaultValue = "255")
private Integer maxLength;
@Column(name="VALIDATOR")
@ApiParam("校验表达式")
private String validator;
@Column(name="VALIDATOR_MESSAGE")
@ApiParam("校验表达式报错")
private String validatorMessage;
@Column(name="RELATION_TABLE")
@ApiParam("关联表名")
private String relationTable;
@Column(name="RELATION_FIELD")
@ApiParam("关联字段")
private String relationField;
@Column(name="IMPORT_DETAIL_ID")
@ApiParam(value ="导入明细ID")
@FieldAnnotation(relation = "ImportDetail", notEmpty = true)
private Long importDetailId;
public ImportDetail getImportDetail() {
return BeanRelation.get(this, EImportField.ImportDetail);
}
public void setImportDetail(ImportDetail detail) {
this.importDetailId = detail != null ? detail.getId() : 0l;
BeanRelation.set(this, EImportField.ImportDetail, detail);
}
}

@ -0,0 +1,68 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.aps.common.BeanRelation;
import cn.estsh.i3plus.pojo.aps.holders.EBaseOrder;
import cn.estsh.i3plus.pojo.aps.holders.EInsertedOrder;
import cn.estsh.i3plus.pojo.base.enumutil.ApsEnumUtil;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2021-03-02
* @Modify:
**/
@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "APS_INSERTED_ORDER")
@Api("插单管理")
public class InsertedOrder extends BaseOrder {
private static final long serialVersionUID = -5036380772996107234L;
@Column(name="ORDER_STATUS")
@ApiParam(value ="订单状态")
@FieldAnnotation(defaultValue = "UNCOMMIT")
private ApsEnumUtil.INSERTED_ORDER_STATUS orderStatus = ApsEnumUtil.INSERTED_ORDER_STATUS.UNCOMMIT;
@Column(name="STAND_OPERATIONS")
@ApiParam("工序")
private String standOperations;
@Column(name="PRODUCT_ROUTING_ID")
@ApiParam(value ="工艺路线")
@FieldAnnotation(property = false)
private Long productRoutingId;
@Column(name="FINISH_COUNT")
@ApiParam(value ="完工数")
private Double finishCount;
@Column(name="REMARK")
@ApiParam(value ="备注")
private String remark;
public ProductRouting getProductRouting() {
return BeanRelation.get(this, EInsertedOrder.ProductRouting);
}
public void setProductRouting(ProductRouting routing) {
this.productRoutingId = routing != null ? routing.getId() : 0l;
BeanRelation.set(this, EInsertedOrder.ProductRouting, routing);
}
@JsonIgnore
public Work getWork() {
return BeanRelation.get(this, EBaseOrder.Works);
}
}

@ -0,0 +1,50 @@
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.BeanRelation;
import cn.estsh.i3plus.pojo.aps.holders.EInterMediateDetail;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2021-04-27
* @Modify:
**/
@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "APS_INTER_MEDIATE_DETAIL")
@Api("计算中间结果")
public class InterMediateDetail extends BaseAPS {
private static final long serialVersionUID = -2588016171684238811L;
@Column(name="RESULT_ID")
@ApiParam(value ="中间结果")
@FieldAnnotation(relation = "InterMediateResult")
private Long resultId;
@Column(name="RULE")
@ApiParam(value ="评估规则")
private String rule;
@Column(name="EVALUATE_VALUE")
@ApiParam(value ="评估值")
private Double evaluateValue;
public InterMediateResult getResult() { return BeanRelation.get(this, EInterMediateDetail.Result); }
public void setResult(InterMediateResult result) {
this.resultId = result != null ? result.getId() : 0;
BeanRelation.set(this, EInterMediateDetail.Result, result);
}
}

@ -0,0 +1,67 @@
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.BeanRelation;
import cn.estsh.i3plus.pojo.aps.holders.EInterMediateResult;
import cn.estsh.i3plus.pojo.aps.holders.EWorkInput;
import cn.estsh.i3plus.pojo.aps.holders.EWorkPlan;
import com.fasterxml.jackson.annotation.JsonBackReference;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.List;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2021-04-25
* @Modify:
**/
@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "APS_INTER_MEDIATE_RESULT")
@Api("计算中间结果")
public class InterMediateResult extends BaseAPS {
private static final long serialVersionUID = -1869359887027950540L;
@Column(name="WORK_ID")
@ApiParam(value ="工作")
@FieldAnnotation(relation = "Work")
private Long workId;
@Column(name="RESOURCE_ID")
@ApiParam(value ="资源")
@FieldAnnotation(relation = "Resource")
private Long resourceId;
@Column(name="EVALUATE_VALUE")
@ApiParam(value ="评估值")
private Double evaluateValue;
public Work getWork() {
return BeanRelation.get(this, EInterMediateResult.Work);
}
public void setWork(Work work) {
this.workId = work != null ? work.getId() : 0l;
BeanRelation.set(this, EInterMediateResult.Work, work);
}
public Resource getResource() { return BeanRelation.get(this, EInterMediateResult.Resource); }
public void setResource(Resource resource) {
this.resourceId = resource != null ? resource.getId() : 0l;
BeanRelation.set(this, EInterMediateResult.Resource, resource);
}
@JsonBackReference
public List<InterMediateDetail> getDetails() { return BeanRelation.get(this, EInterMediateResult.Details); }
}

@ -3,6 +3,9 @@ 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.BeanRelation; import cn.estsh.i3plus.pojo.aps.common.BeanRelation;
import cn.estsh.i3plus.pojo.aps.holders.EBaseOrder; import cn.estsh.i3plus.pojo.aps.holders.EBaseOrder;
import cn.estsh.i3plus.pojo.aps.holders.EInventory;
import cn.estsh.i3plus.pojo.base.enumutil.ApsEnumUtil;
import com.fasterxml.jackson.annotation.JsonBackReference;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
@ -12,6 +15,8 @@ import lombok.EqualsAndHashCode;
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 java.util.Date;
import java.util.List;
/** /**
* @Description : * @Description :
@ -27,6 +32,7 @@ import javax.persistence.Table;
@Api("库存") @Api("库存")
public class Inventory extends BaseOrder { public class Inventory extends BaseOrder {
private static final long serialVersionUID = 2378846162007550439L; private static final long serialVersionUID = 2378846162007550439L;
@Column(name="SPECIFY_TOP_ORDER") @Column(name="SPECIFY_TOP_ORDER")
@ApiParam(value ="指定顶层订单") @ApiParam(value ="指定顶层订单")
private String specifyTopOrder; private String specifyTopOrder;
@ -45,8 +51,27 @@ public class Inventory extends BaseOrder {
@FieldAnnotation(modify = false) @FieldAnnotation(modify = false)
private Double excessCount; private Double excessCount;
@Column(name="SINGLE_SUPPLY_COUNT", columnDefinition = "decimal(18,8)")
@ApiParam(value ="单次补充数量")
private Double singleSupplyCount;
@Column(name="SAFE_COUNT", columnDefinition = "decimal(18,8)")
@ApiParam(value ="安全库存数量")
private Double safeCount;
@Column(name="SUPPLY_INTERVAL")
@ApiParam(value ="补充间隔(天)")
private Integer supplyInterval;
@Column(name="LAST_SUPPLY")
@ApiParam(value ="最后补充时间")
private Date lastSupply;
@JsonIgnore @JsonIgnore
public Work getWork() { public Work getWork() {
return BeanRelation.get(this, EBaseOrder.Works); return BeanRelation.get(this, EBaseOrder.Works);
} }
@JsonBackReference
public List<SafeStockOrder> getSafeStockOrders() { return BeanRelation.list(this, EInventory.SafeStockOrders); }
} }

@ -29,6 +29,10 @@ public class MatCalcRule extends BaseRule {
@ApiParam(value ="物料筛选") @ApiParam(value ="物料筛选")
private String materialFilter; private String materialFilter;
@Column(name="ROUTING_FILTER")
@ApiParam(value ="工艺路线筛选")
private String routingFilter;
@Column(name="INPUT_FILTER") @Column(name="INPUT_FILTER")
@ApiParam(value ="输入筛选") @ApiParam(value ="输入筛选")
private String inputFilter; private String inputFilter;
@ -37,6 +41,14 @@ public class MatCalcRule extends BaseRule {
@ApiParam(value ="输出筛选") @ApiParam(value ="输出筛选")
private String outputFilter; private String outputFilter;
@Column(name="INPUT_MATCH")
@ApiParam(value ="输入匹配")
private String inputMatch;
@Column(name="OUTPUT_MATCH")
@ApiParam(value ="输出匹配")
private String outputMatch;
@Column(name="DEL_AUTO") @Column(name="DEL_AUTO")
@ApiParam(value ="自动删除补充订单") @ApiParam(value ="自动删除补充订单")
@FieldAnnotation(defaultValue = "1") @FieldAnnotation(defaultValue = "1")

@ -7,6 +7,7 @@ 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.holders.EBaseOrder; import cn.estsh.i3plus.pojo.aps.holders.EBaseOrder;
import cn.estsh.i3plus.pojo.aps.holders.EMaterial; import cn.estsh.i3plus.pojo.aps.holders.EMaterial;
import cn.estsh.i3plus.pojo.aps.holders.EResource;
import cn.estsh.i3plus.pojo.aps.validator.InsertGroup; import cn.estsh.i3plus.pojo.aps.validator.InsertGroup;
import cn.estsh.i3plus.pojo.aps.validator.UpdateGroup; import cn.estsh.i3plus.pojo.aps.validator.UpdateGroup;
import cn.estsh.i3plus.pojo.base.enumutil.ApsEnumUtil; import cn.estsh.i3plus.pojo.base.enumutil.ApsEnumUtil;
@ -157,6 +158,11 @@ public class Material extends BaseAPS {
@ApiParam(value ="标签颜色") @ApiParam(value ="标签颜色")
private String labelColor; private String labelColor;
@Column(name="WORK_SHOP_ID")
@ApiParam(value ="车间代码")
@FieldAnnotation(relation = "WorkShop")
private Long workShopId;
public Material getGroup() { public Material getGroup() {
return BeanRelation.get(this, EMaterial.Group); return BeanRelation.get(this, EMaterial.Group);
} }
@ -223,4 +229,11 @@ public class Material extends BaseAPS {
public List<ProductOrder> getProductOrders() { public List<ProductOrder> getProductOrders() {
return BeanRelation.listByClass(this, ProductOrder.class, EMaterial.Orders); return BeanRelation.listByClass(this, ProductOrder.class, EMaterial.Orders);
} }
public WorkShop getWorkShop() { return BeanRelation.get(this, EMaterial.WorkShop); }
public void setWorkShop(WorkShop workShop) {
this.workShopId = workShop != null ? workShop.getId() : 0l;
BeanRelation.set(this, EMaterial.WorkShop, workShop);
}
} }

@ -26,8 +26,9 @@ import java.util.Date;
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Entity @Entity
@Table(name = "APS_MATERIAL_DELIVERY_PROMISE") @Table(name = "APS_MATERIAL_DELIVERY_PROMISE")
@Api("物料") @Api("物料交期承诺")
public class MaterialDeliveryPromise extends BaseBean { public class MaterialDeliveryPromise extends BaseBean {
private static final long serialVersionUID = 831759543772896829L;
@Column(name="QTY") @Column(name="QTY")
@ApiParam(value ="到货数量") @ApiParam(value ="到货数量")
private Double count; private Double count;

@ -28,17 +28,17 @@ public class MaterialSetTime extends BaseAPS {
private static final long serialVersionUID = -7996431489447641539L; private static final long serialVersionUID = -7996431489447641539L;
@Column(name="RES_CODE") @Column(name="RES_CODE")
@ApiParam(value ="资源编码") @ApiParam(value ="资源编码")
@FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.MULTI_OBJECT, typeName = "Resource", notEmpty = true) @FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.MULTI_OBJECT, typeName = "Resource", notEmpty = true, mainkey = true)
private String resCode; private String resCode;
@Column(name="PREV_MATERIAL") @Column(name="PREV_MATERIAL")
@ApiParam(value ="前物料") @ApiParam(value ="前物料编码")
@FieldAnnotation(notEmpty = true) @FieldAnnotation(notEmpty = true, mainkey = true)
private String prevMaterial; private String prevMaterial;
@Column(name="POST_MATERIAL") @Column(name="POST_MATERIAL")
@ApiParam(value ="后物料") @ApiParam(value ="后物料编码")
@FieldAnnotation(notEmpty = true) @FieldAnnotation(notEmpty = true, mainkey = true)
private String postMaterial; private String postMaterial;
@Column(name="TIME") @Column(name="TIME")
@ -46,8 +46,8 @@ public class MaterialSetTime extends BaseAPS {
@FieldAnnotation(notEmpty = true) @FieldAnnotation(notEmpty = true)
private String time; private String time;
@Column(name="PRIORITY") // @Column(name="PRIORITY")
@ApiParam(value ="优先级") // @ApiParam(value ="优先级")
@FieldAnnotation(defaultValue = "10") // @FieldAnnotation(defaultValue = "10", mainkey = true)
private int priority; // private Integer priority;
} }

@ -0,0 +1,79 @@
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.BeanRelation;
import cn.estsh.i3plus.pojo.aps.holders.EOrderFeedback;
import cn.estsh.i3plus.pojo.aps.holders.EPlanFeedback;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2020-03-19
* @Modify:
**/
@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "APS_ORDER_FEEDBACK")
@Api("订单反馈")
public class OrderFeedback extends BaseAPS {
private static final long serialVersionUID = 7822380202121225936L;
@Column(name="ORDER_ID")
@ApiParam(value ="顶层订单号")
@FieldAnnotation(relation = "Order", modify = false)
private Long orderId;
@Column(name="DELIVER_RATE")
@ApiParam(value ="发货百分比")
private Double deliverRate;
@Column(name="QUALIFIED_RATE")
@ApiParam(value ="成品合格百分比")
private Double qualifiedRate;
@Column(name="INVENTORY_COUNT")
@ApiParam(value ="库存扣减数量")
private Double inventoryCount;
@Column(name="LAST_OPERATION_COUNT")
@ApiParam(value ="硫化报工数量")
private Double lastOperationCount;
@Column(name="UNQUALIFIED_COUNT")
@ApiParam(value ="不良数量")
private Double unqualifiedCount;
@Column(name="QUALIFIED_COUNT")
@ApiParam(value ="成品合格数量")
private Double qualifiedCount;
@Column(name="ADD_UNQUALIFIED_COUNT")
@ApiParam(value ="累加不良数量")
@FieldAnnotation(display = false)
private Double addUnqualifiedCount;
@Column(name="ADD_QUALIFIED_COUNT")
@ApiParam(value ="累加合格数量")
@FieldAnnotation(display = false)
private Double addQualifiedCount;
public BaseOrder getOrder() {
return BeanRelation.get(this, EOrderFeedback.Order);
}
public void setOrder(BaseOrder order) {
this.orderId = order != null ? order.getId() : 0l;
BeanRelation.set(this, EOrderFeedback.Order, order);
}
}

@ -37,6 +37,11 @@ public class ParentWork extends BaseAPS {
@ApiParam(value ="数量") @ApiParam(value ="数量")
private Double count; private Double count;
@Column(name="SERIAL_NUMBER")
@ApiParam(value ="拆分工作流水号")
@FieldAnnotation(property = false)
private Integer serialNumber = 0;
@Column(name="PRODUCT_ORDER_ID") @Column(name="PRODUCT_ORDER_ID")
@ApiParam(value ="订单") @ApiParam(value ="订单")
@FieldAnnotation(property = false) @FieldAnnotation(property = false)

@ -4,6 +4,7 @@ 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.holders.EPlanFeedback; import cn.estsh.i3plus.pojo.aps.holders.EPlanFeedback;
import cn.estsh.i3plus.pojo.base.enumutil.ApsEnumUtil;
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;
@ -28,11 +29,24 @@ import javax.persistence.Table;
public class PlanFeedback extends BaseAPS { public class PlanFeedback extends BaseAPS {
private static final long serialVersionUID = 2520555825093741381L; private static final long serialVersionUID = 2520555825093741381L;
@Column(name="WORK_ID") @Column(name="WORK_ID")
@ApiParam(value ="工作") @ApiParam(value ="工作")
@FieldAnnotation(property = false) @FieldAnnotation(property = false)
private Long workId; private Long workId;
@Column(name="STATUS")
@ApiParam(value ="状态")
private ApsEnumUtil.FEED_BACK_STATUS status;
@Column(name="ACTUAL_COUNT")
@ApiParam(value ="实际完成数量")
private Double actualCount;
@Column(name="REMARK")
@ApiParam(value ="备注")
private String remark;
public Work getWork() { public Work getWork() {
return BeanRelation.get(this, EPlanFeedback.Work); return BeanRelation.get(this, EPlanFeedback.Work);
} }

@ -0,0 +1,38 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.aps.common.BaseAPS;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2021-04-08
* @Modify:
**/
@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "APS_PRIORITY_TYPE")
@Api("优先级")
public class PriorityType extends BaseAPS {
private static final long serialVersionUID = 445577901076659576L;
@Column(name="CODE")
@ApiParam(value ="标识")
@FieldAnnotation(mainkey = true, popSearch = true)
private String code;
@Column(name="VALUE")
@ApiParam(value ="值")
@FieldAnnotation(notEmpty = true, popSearch = true)
private Integer value;
}

@ -98,11 +98,20 @@ public class ProductOrder extends BaseOrder {
@FieldAnnotation(defaultValue = "false", display = false) @FieldAnnotation(defaultValue = "false", display = false)
private Boolean autoSupply; private Boolean autoSupply;
@Column(name="FINISH_COUNT")
@ApiParam(value ="完工数")
private Double finishCount;
@Column(name="PRODUCT_ROUTING_ID") @Column(name="PRODUCT_ROUTING_ID")
@ApiParam(value ="工艺路线") @ApiParam(value ="工艺路线")
@FieldAnnotation(property = false) @FieldAnnotation(property = false)
private Long productRoutingId; private Long productRoutingId;
@Column(name="SRC_INSERTED_ORDER")
@ApiParam(value ="需求单为插单")
@FieldAnnotation(property = false)
private Long srcInsertedOrder;
public ProductRouting getProductRouting() { public ProductRouting getProductRouting() {
return BeanRelation.get(this, EProductOrder.ProductRouting); return BeanRelation.get(this, EProductOrder.ProductRouting);
} }

@ -1,9 +1,13 @@
package cn.estsh.i3plus.pojo.aps.bean; package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.annotation.CalendarTimeAnntation;
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.common.BeanRelation; import cn.estsh.i3plus.pojo.aps.common.BeanRelation;
import cn.estsh.i3plus.pojo.aps.holders.EResCalendar; import cn.estsh.i3plus.pojo.aps.holders.EResCalendar;
import cn.estsh.i3plus.pojo.aps.validator.ImportGroup;
import cn.estsh.i3plus.pojo.aps.validator.InsertGroup;
import cn.estsh.i3plus.pojo.aps.validator.UpdateGroup;
import cn.estsh.i3plus.pojo.base.enumutil.ApsEnumUtil; import cn.estsh.i3plus.pojo.base.enumutil.ApsEnumUtil;
import com.fasterxml.jackson.annotation.JsonBackReference; import com.fasterxml.jackson.annotation.JsonBackReference;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -13,6 +17,7 @@ import lombok.EqualsAndHashCode;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.Lob;
import javax.persistence.Table; import javax.persistence.Table;
import java.util.List; import java.util.List;
@ -30,6 +35,7 @@ import java.util.List;
@Api("日历") @Api("日历")
public class ResCalendar extends BaseAPS { public class ResCalendar extends BaseAPS {
private static final long serialVersionUID = 8338930205816433211L; private static final long serialVersionUID = 8338930205816433211L;
@Lob
@Column(name="RES_CODES") @Column(name="RES_CODES")
@ApiParam(value ="资源编码") @ApiParam(value ="资源编码")
@FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.MULTI_OBJECT, typeName = "Resource", notEmpty = true) @FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.MULTI_OBJECT, typeName = "Resource", notEmpty = true)
@ -42,6 +48,7 @@ public class ResCalendar extends BaseAPS {
@Column(name="DATES") @Column(name="DATES")
@ApiParam(value ="时间") @ApiParam(value ="时间")
@CalendarTimeAnntation(groups = {InsertGroup.class, UpdateGroup.class, ImportGroup.class})
private String dates; private String dates;
@Column(name="SHIFT_CODES") @Column(name="SHIFT_CODES")

@ -60,6 +60,11 @@ public class Resource extends BaseAPS {
@FieldAnnotation(defaultValue = "1.0", notEmpty = true) @FieldAnnotation(defaultValue = "1.0", notEmpty = true)
private Double efficiency; private Double efficiency;
@Column(name="WORK_SHOP_ID")
@ApiParam(value ="车间代码")
@FieldAnnotation(relation = "WorkShop")
private Long workShopId;
@Column(name="PREV_BUFFER") @Column(name="PREV_BUFFER")
@ApiParam(value ="前缓冲时间") @ApiParam(value ="前缓冲时间")
@FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.DURATION) @FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.DURATION)
@ -122,6 +127,13 @@ public class Resource extends BaseAPS {
@Transient @Transient
private boolean hasConflict; private boolean hasConflict;
public WorkShop getWorkShop() { return BeanRelation.get(this, EResource.WorkShop); }
public void setWorkShop(WorkShop workShop) {
this.workShopId = workShop != null ? workShop.getId() : 0l;
BeanRelation.set(this, EResource.WorkShop, workShop);
}
@JsonBackReference @JsonBackReference
public List<WorkPlan> getWorkPlans() { return BeanRelation.list(this, EResource.WorkPlans); } public List<WorkPlan> getWorkPlans() { return BeanRelation.list(this, EResource.WorkPlans); }
} }

@ -33,7 +33,7 @@ public class RuleDetail extends BaseAPS {
private static final long serialVersionUID = -6433950357039396107L; private static final long serialVersionUID = -6433950357039396107L;
@Column(name="TYPE") @Column(name="TYPE")
@ApiParam(value ="规则类型") @ApiParam(value ="规则类型")
private ApsEnumUtil.RULE_TYPE type; private String type;
@Column(name="ORDER_NUMBER") @Column(name="ORDER_NUMBER")
@ApiParam(value ="序号") @ApiParam(value ="序号")

@ -0,0 +1,59 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.aps.common.BeanRelation;
import cn.estsh.i3plus.pojo.aps.holders.EBaseOrder;
import cn.estsh.i3plus.pojo.aps.holders.ESafeStockOrder;
import cn.estsh.i3plus.pojo.base.enumutil.ApsEnumUtil;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2021-02-23
* @Modify:
**/
@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "APS_SAFE_STOCK_ORDER")
@Api("安全库存订单")
public class SafeStockOrder extends BaseOrder {
private static final long serialVersionUID = 5944067344390531794L;
@Column(name="ORDER_STATUS")
@ApiParam(value ="订单状态")
@FieldAnnotation(defaultValue = "UNCOMMIT")
private ApsEnumUtil.SAFE_STOCK_ORDER_STATUS orderStatus = ApsEnumUtil.SAFE_STOCK_ORDER_STATUS.UNCOMMIT;
@Column(name="INVENTORY_ID")
@ApiParam(value ="库存")
@FieldAnnotation(relation = "Inventory", notEmpty = true)
private Long inventoryId;
@Column(name="FINISH_COUNT")
@ApiParam(value ="完工数")
private Double finishCount;
@JsonIgnore
public Work getWork() {
return BeanRelation.get(this, EBaseOrder.Works);
}
public Inventory getInventory() { return BeanRelation.get(this, ESafeStockOrder.Inventory); }
public void setInventory(Inventory inventory) {
this.inventoryId = inventory != null ? inventory.getId() : 0;
BeanRelation.set(this, ESafeStockOrder.Inventory, inventory);
}
}

@ -56,6 +56,19 @@ public class SalesOrder extends BaseOrder {
@FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.DURATION) @FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.DURATION)
private String allowDelayTime; private String allowDelayTime;
@Column(name="ORDER_STATUS")
@ApiParam(value ="订单状态")
@FieldAnnotation(defaultValue = "WAITING")
private ApsEnumUtil.SALES_ORDER_STATUS orderStatus;
@Column(name="DELIVER_RATE")
@ApiParam(value ="发货百分比")
private Double deliverRate;
@Column(name="FINISH_COUNT")
@ApiParam(value ="完工数")
private Double finishCount;
@JsonIgnore @JsonIgnore
public Work getWork() { public Work getWork() {
return BeanRelation.get(this, EBaseOrder.Works); return BeanRelation.get(this, EBaseOrder.Works);

@ -10,6 +10,7 @@ import lombok.EqualsAndHashCode;
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 java.util.Date;
/** /**
* @Description : * @Description :
@ -27,7 +28,31 @@ import javax.persistence.Table;
public class SerialNumber extends BaseAPS { public class SerialNumber extends BaseAPS {
private static final long serialVersionUID = 312483211086701109L; private static final long serialVersionUID = 312483211086701109L;
@Column(name="NUMBER") @Column(name="S_NUMBER")
@ApiParam(value ="流水号") @ApiParam(value ="销售订单流水号")
private Integer number; private Integer sNumber = 0;
@Column(name="M_NUMBER")
@ApiParam(value ="生产订单流水号")
private Integer mNumber = 0;
@Column(name="P_NUMBER")
@ApiParam(value ="采购订单流水号")
private Integer pNumber = 0;
@Column(name="W_NUMBER")
@ApiParam(value ="库存订单流水号")
private Integer wNumber = 0;
@Column(name="Q_NUMBER")
@ApiParam(value ="安全库存订单流水号")
private Integer qNumber = 0;
@Column(name="H_NUMBER")
@ApiParam(value ="插单流水号")
private Integer hNumber = 0;
@Column(name="LAST_DATE")
@ApiParam(value ="最后生成日期")
private Date lastDate;
} }

@ -3,6 +3,8 @@ 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.annotation.MainKey; import cn.estsh.i3plus.pojo.aps.annotation.MainKey;
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.holders.EStandOperation;
import cn.estsh.i3plus.pojo.aps.validator.InsertGroup; import cn.estsh.i3plus.pojo.aps.validator.InsertGroup;
import cn.estsh.i3plus.pojo.aps.validator.UpdateGroup; import cn.estsh.i3plus.pojo.aps.validator.UpdateGroup;
import cn.estsh.i3plus.pojo.base.enumutil.ApsEnumUtil; import cn.estsh.i3plus.pojo.base.enumutil.ApsEnumUtil;
@ -65,4 +67,20 @@ public class StandOperation extends BaseAPS {
@ApiParam(value ="生产组合方式") @ApiParam(value ="生产组合方式")
@FieldAnnotation(defaultValue = "MAX_ALL_RESOURCE") @FieldAnnotation(defaultValue = "MAX_ALL_RESOURCE")
private ApsEnumUtil.RES_COMB_TIME_TYPE combType; private ApsEnumUtil.RES_COMB_TIME_TYPE combType;
@Column(name="WORK_SHOP_ID")
@ApiParam(value ="车间代码")
@FieldAnnotation(relation = "WorkShop")
private Long workShopId;
@Column(name="TYPE")
@ApiParam(value ="工序类型")
private ApsEnumUtil.SANLUX_OPERATION_TYPE type = ApsEnumUtil.SANLUX_OPERATION_TYPE.NORMAL;
public WorkShop getWorkShop() { return BeanRelation.get(this, EStandOperation.WorkShop); }
public void setWorkShop(WorkShop workShop) {
this.workShopId = workShop != null ? workShop.getId() : 0l;
BeanRelation.set(this, EStandOperation.WorkShop, workShop);
}
} }

@ -45,4 +45,12 @@ public class SysParam extends BaseAPS {
@ApiParam(value ="规则组id") @ApiParam(value ="规则组id")
@FieldAnnotation(display = false) @FieldAnnotation(display = false)
private Long ruleGroupId; private Long ruleGroupId;
@Column(name="INVENTORY_RATE")
@ApiParam(value ="库存误差百分比")
private Double inventoryRate;
@Column(name="RECORD_RESULT")
@ApiParam(value ="记录资源评估结果")
private Boolean recordResult;
} }

@ -5,6 +5,7 @@ import cn.estsh.i3plus.pojo.aps.annotation.MainKey;
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.holders.EWork; import cn.estsh.i3plus.pojo.aps.holders.EWork;
import cn.estsh.i3plus.pojo.aps.tool.APSDoubleTool;
import cn.estsh.i3plus.pojo.aps.validator.InsertGroup; import cn.estsh.i3plus.pojo.aps.validator.InsertGroup;
import cn.estsh.i3plus.pojo.aps.validator.UpdateGroup; import cn.estsh.i3plus.pojo.aps.validator.UpdateGroup;
import cn.estsh.i3plus.pojo.base.enumutil.ApsEnumUtil; import cn.estsh.i3plus.pojo.base.enumutil.ApsEnumUtil;
@ -47,7 +48,7 @@ public class Work extends BaseAPS {
@Column(name="WORK_TYPE") @Column(name="WORK_TYPE")
@ApiParam(value ="工作类型") @ApiParam(value ="工作类型")
@FieldAnnotation(property = false) @FieldAnnotation(display = false)
private ApsEnumUtil.WORK_TYPE workType; private ApsEnumUtil.WORK_TYPE workType;
@Column(name="count", columnDefinition = "decimal(18,8)") @Column(name="count", columnDefinition = "decimal(18,8)")
@ -159,6 +160,15 @@ public class Work extends BaseAPS {
@FieldAnnotation(property = false) @FieldAnnotation(property = false)
private Long mainPlanId; private Long mainPlanId;
@Column(name="ORIGIN_WORK_ID")
@ApiParam(value ="动态拆分工作ID")
private Long originWorkId;
// 排程时,找插入位置的评估值
private transient double evaluateValue = 0;
private transient boolean hasOptimized = false;
public BaseOrder getOrder() { public BaseOrder getOrder() {
return BeanRelation.get(this, EWork.Order); return BeanRelation.get(this, EWork.Order);
} }
@ -212,10 +222,11 @@ public class Work extends BaseAPS {
} }
@JsonBackReference @JsonBackReference
public List<PlanFeedback> getPlanFeedbacks() { public PlanFeedback getPlanFeedback() {
return BeanRelation.list(this, EWork.PlanFeedbacks); return BeanRelation.get(this, EWork.PlanFeedback);
} }
@JsonBackReference
public WorkPlan getMainPlan() { return BeanRelation.get(this, EWork.MainPlan); } public WorkPlan getMainPlan() { return BeanRelation.get(this, EWork.MainPlan); }
public void setMainPlan(WorkPlan plan) { public void setMainPlan(WorkPlan plan) {
@ -234,4 +245,23 @@ public class Work extends BaseAPS {
this.specifyResourceId = resource != null ? resource.getId() : 0; this.specifyResourceId = resource != null ? resource.getId() : 0;
BeanRelation.set(this, EWork.SpecifyResource, resource); BeanRelation.set(this, EWork.SpecifyResource, resource);
} }
public double getWorkCount() {
if (!APSDoubleTool.isZero(getSpecifyCount())) {
return getSpecifyCount();
}
return getCount();
}
@JsonBackReference
public List<Work> getDynSplitWorks() { return BeanRelation.list(this, EWork.DynSplitWorks); }
public Work getOriginWork() {
return BeanRelation.get(this, EWork.OriginWork);
}
public void setOriginWork(Work work) {
this.originWorkId = work != null ? work.getId() : 0;
BeanRelation.set(this, EWork.OriginWork, work);
}
} }

@ -6,6 +6,7 @@ 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.holders.EWorkPlan; import cn.estsh.i3plus.pojo.aps.holders.EWorkPlan;
import cn.estsh.i3plus.pojo.base.enumutil.ApsEnumUtil; import cn.estsh.i3plus.pojo.base.enumutil.ApsEnumUtil;
import com.fasterxml.jackson.annotation.JsonBackReference;
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;
@ -18,7 +19,6 @@ import javax.persistence.Entity;
import javax.persistence.Table; import javax.persistence.Table;
import javax.persistence.Transient; import javax.persistence.Transient;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
* @Description : * @Description :
@ -77,6 +77,8 @@ public class WorkPlan extends BaseAPS {
@Column(name="PRODUCE_END") @Column(name="PRODUCE_END")
@ApiParam(value ="生产结束时间") @ApiParam(value ="生产结束时间")
@FieldAnnotation(modify = false) @FieldAnnotation(modify = false)
@RippleAnnotation(dependence = {"MainWork.PostRelations.PostWork.MainPlan.produceEnd",
"PostPlan.produceEnd"}, method = "calcReverse")
private Date produceEnd; private Date produceEnd;
@Column(name="PRODUCE_TIME") @Column(name="PRODUCE_TIME")
@ -99,11 +101,6 @@ public class WorkPlan extends BaseAPS {
@FieldAnnotation(modify = false, editType = ApsEnumUtil.EDIT_TYPE.DURATION) @FieldAnnotation(modify = false, editType = ApsEnumUtil.EDIT_TYPE.DURATION)
private Integer postSetTime; private Integer postSetTime;
@Column(name="FORCE_POST_SET_ZERO")
@ApiParam(value ="是否将后设置时间强制设置成0")
@FieldAnnotation(property = false)
private Boolean forcePostSetZero;
@Column(name="WORK_RESOURCE_ID") @Column(name="WORK_RESOURCE_ID")
@ApiParam(value ="工作资源对象id") @ApiParam(value ="工作资源对象id")
@FieldAnnotation(property = false) @FieldAnnotation(property = false)
@ -114,7 +111,16 @@ public class WorkPlan extends BaseAPS {
@FieldAnnotation(property = false) @FieldAnnotation(property = false)
private Long furnacePlanId; private Long furnacePlanId;
@Column(name="PRINTED")
@ApiParam(value ="已打印")
private Boolean printed = false;
@Column(name="PRINT_TIME")
@ApiParam(value ="打印时间")
private Date printTime;
@Transient @Transient
@FieldAnnotation(property = false)
private boolean hasCominbed = false; private boolean hasCominbed = false;
public Work getWork() { return BeanRelation.get(this, EWorkPlan.Work); } public Work getWork() { return BeanRelation.get(this, EWorkPlan.Work); }
@ -145,6 +151,7 @@ public class WorkPlan extends BaseAPS {
BeanRelation.set(this, EWorkPlan.FurnacePlan, plan); BeanRelation.set(this, EWorkPlan.FurnacePlan, plan);
} }
@JsonBackReference
public Work getMainWork() { public Work getMainWork() {
return BeanRelation.get(this, EWorkPlan.MainWork); return BeanRelation.get(this, EWorkPlan.MainWork);
} }

@ -13,6 +13,7 @@ import lombok.EqualsAndHashCode;
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.validation.constraints.Min;
/** /**
* @Description : * @Description :
@ -89,6 +90,20 @@ public class WorkResource extends BaseAPS {
@FieldAnnotation(property = false) @FieldAnnotation(property = false)
private Long operResourceId; private Long operResourceId;
@Column(name="CAPACITY", columnDefinition = "decimal(18,8)")
@ApiParam(value ="容量限制")
@Min(0)
private Double capacity;
@Column(name="MIN_PRODUCT_BATCH")
@ApiParam(value ="最小加工批量")
private Integer minProductBatch;
@Column(name="RES_CAPACITY_ID")
@ApiParam(value ="设备能力id")
@FieldAnnotation(property = false)
private Long resCapacityId = 0l;
public Work getWork() { public Work getWork() {
return BeanRelation.get(this, EWorkResource.Work); return BeanRelation.get(this, EWorkResource.Work);
} }

@ -0,0 +1,40 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.aps.common.BaseAPS;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2021-03-22
* @Modify:
**/
@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "APS_WORK_SHOP")
@Api("车间")
public class WorkShop extends BaseAPS {
private static final long serialVersionUID = 5627016086816721284L;
@Column(name="CODE")
@ApiParam(value ="编码")
@FieldAnnotation(popSearch = true, mainkey = true)
private String code;
@Column(name="NAME")
@ApiParam(value ="名称")
@FieldAnnotation(popSearch = true, notEmpty = true)
private String name;
}

@ -37,6 +37,9 @@ public abstract class BaseAPS extends BaseBean {
@Transient @Transient
private String key; private String key;
@FieldAnnotation(property = false)
private transient Long updateId = 0l;
public Object getCustomField(String code) { public Object getCustomField(String code) {
return customFields.get(code); return customFields.get(code);
} }
@ -44,4 +47,40 @@ public abstract class BaseAPS extends BaseBean {
public void setCustomField(String code, Object value) { public void setCustomField(String code, Object value) {
customFields.put(code, value); customFields.put(code, value);
} }
public String getCustomString(String code) {
Object value = customFields.get(code);
if (value == null) {
return "";
}
return value.toString();
}
public Integer getCustomInteger(String code) {
Object value = customFields.get(code);
if (value == null) {
return null;
}
if (value.getClass() == String.class) {
return Integer.valueOf((String) value);
} else if(value.getClass() == Integer.class) {
return (Integer)value;
}
return null;
}
public Boolean getCustomBoolean(String code) {
Object value = customFields.get(code);
if (value == null) {
return null;
}
if (value.getClass() == Boolean.class) {
return (Boolean) value;
} else if(value.getClass() == Integer.class) {
return (Integer)value == 1;
}
return null;
}
} }

@ -271,6 +271,8 @@ public class BeanInfo {
type = ApsEnumUtil.FIELD_TYPE.ENUM; type = ApsEnumUtil.FIELD_TYPE.ENUM;
} else if (BaseBean.class.isAssignableFrom(cls)) { } else if (BaseBean.class.isAssignableFrom(cls)) {
type = ApsEnumUtil.FIELD_TYPE.OBJECT; type = ApsEnumUtil.FIELD_TYPE.OBJECT;
} else if (List.class.isAssignableFrom(cls)) {
type = ApsEnumUtil.FIELD_TYPE.LIST;
} }
return type; return type;
} }

@ -48,7 +48,7 @@ public class BeanRelation {
return result; return result;
} }
for (Enum<?> holder : beanInfo.getAllHolders()) { for (Enum<?> holder : beanInfo.getAllHolders()) {
result.put(holder, new LinkedList<>()); result.put(holder, new ArrayList<>());
} }
return result; return result;
} }
@ -313,6 +313,24 @@ public class BeanRelation {
} }
/** /**
*
*
* @param bean
*/
public static void remove(BaseBean bean) {
if (bean == null) {
return;
}
BeanInfo beanInfo = BeanInfo.getBeanInfo(bean.getClass());
if (beanInfo != null) {
List<Enum<?>> holders = beanInfo.getAllHolders();
for (Enum<?> holder :holders) {
remove(bean, holder);
}
}
}
/**
* *
* *
* @param bean * @param bean

@ -5,4 +5,5 @@ public enum EBaseOrder {
Material, Material,
PrevRelations, PrevRelations,
PostRelations, PostRelations,
Priority,
} }

@ -1,5 +1,6 @@
package cn.estsh.i3plus.pojo.aps.holders; package cn.estsh.i3plus.pojo.aps.holders;
public enum EImportDetail { public enum EImportDetail {
Project Project,
Fields
} }

@ -0,0 +1,5 @@
package cn.estsh.i3plus.pojo.aps.holders;
public enum EImportField {
ImportDetail
}

@ -0,0 +1,5 @@
package cn.estsh.i3plus.pojo.aps.holders;
public enum EInsertedOrder {
ProductRouting
}

@ -0,0 +1,5 @@
package cn.estsh.i3plus.pojo.aps.holders;
public enum EInterMediateDetail {
Result
}

@ -0,0 +1,7 @@
package cn.estsh.i3plus.pojo.aps.holders;
public enum EInterMediateResult {
Work,
Resource,
Details
}

@ -0,0 +1,5 @@
package cn.estsh.i3plus.pojo.aps.holders;
public enum EInventory {
SafeStockOrders
}

@ -9,5 +9,6 @@ public enum EMaterial {
WorkInputs, WorkInputs,
WorkOutputs, WorkOutputs,
WorkRelations, WorkRelations,
Orders Orders,
WorkShop
} }

@ -0,0 +1,5 @@
package cn.estsh.i3plus.pojo.aps.holders;
public enum EOrderFeedback {
Order
}

@ -1,5 +1,6 @@
package cn.estsh.i3plus.pojo.aps.holders; package cn.estsh.i3plus.pojo.aps.holders;
public enum EResource { public enum EResource {
WorkShop,
WorkPlans WorkPlans
} }

@ -0,0 +1,5 @@
package cn.estsh.i3plus.pojo.aps.holders;
public enum ESafeStockOrder {
Inventory
}

@ -1,4 +1,5 @@
package cn.estsh.i3plus.pojo.aps.holders; package cn.estsh.i3plus.pojo.aps.holders;
public enum EStandOperation { public enum EStandOperation {
WorkShop
} }

@ -9,8 +9,10 @@ public enum EWork {
PrevRelations, // 前关联 PrevRelations, // 前关联
PostRelations, // 后关联 PostRelations, // 后关联
Operation, // 工序 Operation, // 工序
PlanFeedbacks, // 工作计划反馈 PlanFeedback, // 工作计划反馈
MainPlan, // 关联的为主资源的计划 MainPlan, // 关联的为主资源的计划
WorkPlans, // 关联的工作计划 WorkPlans, // 关联的工作计划
SpecifyResource, // 指定资源 SpecifyResource, // 指定资源
DynSplitWorks, // 动态拆分后的工作
OriginWork, // 动态拆分前的工作
} }

@ -0,0 +1,21 @@
package cn.estsh.i3plus.pojo.aps.model;
import io.swagger.annotations.Api;
import lombok.Data;
import java.util.List;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2020-02-25
* @Modify:
**/
@Data
@Api("表格导出查询参数")
public class ExportModelRequest {
private String filter;
private List<APSPager.SortData> sorts;
private String tableName;
}

@ -0,0 +1,30 @@
package cn.estsh.i3plus.pojo.aps.model;
import io.swagger.annotations.ApiParam;
import lombok.Data;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2020-04-01
* @Modify:
**/
@Data
public class ImportDataModel {
@ApiParam(value ="当前执行进度")
private Integer curProcess = 0;
@ApiParam(value ="总行数")
private Integer totalSize = 0;
@ApiParam(value ="进度消息")
private String processMsg = "";
private Boolean finish = false;
@ApiParam(value ="异常消息")
private String exception = "";
private ImportErrorInfo errorInfo;
}

@ -0,0 +1,25 @@
package cn.estsh.i3plus.pojo.aps.model;
import io.swagger.annotations.Api;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2021-02-25
* @Modify:
**/
@Data
@Api("导入校验错误信息")
public class ImportErrorInfo {
private List<String> headers = new ArrayList<>();
private List<List<String>> errorData = new ArrayList<>(100);
public boolean hasErrorData() {
return !errorData.isEmpty();
}
}

@ -0,0 +1,34 @@
package cn.estsh.i3plus.pojo.aps.model;
import cn.estsh.i3plus.pojo.aps.bean.FurnacePlan;
import cn.estsh.i3plus.pojo.aps.bean.Resource;
import cn.estsh.i3plus.pojo.aps.bean.WorkPlan;
import lombok.Data;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2021-04-15
* @Modify:
**/
@Data
public class PlanRecord {
/**
*
*/
private WorkPlan plan;
/**
*
*/
private Resource resource;
/**
*
*/
private WorkPlan postPlan;
/**
*
*/
private FurnacePlan furnacePlan;
}

@ -0,0 +1,22 @@
package cn.estsh.i3plus.pojo.aps.model;
import cn.estsh.i3plus.pojo.aps.bean.Work;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2021-04-15
* @Modify:
**/
@Data
public class WorkRecord {
private Work work;
private Work splitWork;
private PlanRecord mainPlan;
private List<PlanRecord> assPlans = new ArrayList<>();
}

@ -0,0 +1,9 @@
package cn.estsh.i3plus.pojo.aps.repository;
import cn.estsh.i3plus.pojo.aps.bean.HeuristicOptimize;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface HeuristicOptimizeRepository extends CrudRepository<HeuristicOptimize, Long> {
}

@ -0,0 +1,9 @@
package cn.estsh.i3plus.pojo.aps.repository;
import cn.estsh.i3plus.pojo.aps.bean.OrderFeedback;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface IOrderFeedbackRepository extends CrudRepository<OrderFeedback, Long> {
}

@ -0,0 +1,9 @@
package cn.estsh.i3plus.pojo.aps.repository;
import cn.estsh.i3plus.pojo.aps.bean.ImportField;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface ImportFieldRepository extends CrudRepository<ImportField, Long> {
}

@ -0,0 +1,9 @@
package cn.estsh.i3plus.pojo.aps.repository;
import cn.estsh.i3plus.pojo.aps.bean.InsertedOrder;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface InsertedOrderRepository extends CrudRepository<InsertedOrder, Long> {
}

@ -0,0 +1,9 @@
package cn.estsh.i3plus.pojo.aps.repository;
import cn.estsh.i3plus.pojo.aps.bean.PriorityType;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface PriorityTypeRepository extends CrudRepository<PriorityType, Long> {
}

@ -0,0 +1,9 @@
package cn.estsh.i3plus.pojo.aps.repository;
import cn.estsh.i3plus.pojo.aps.bean.SafeStockOrder;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface SafeStockOrderRepository extends CrudRepository<SafeStockOrder, Long> {
}

@ -0,0 +1,9 @@
package cn.estsh.i3plus.pojo.aps.repository;
import cn.estsh.i3plus.pojo.aps.bean.WorkShop;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface WorkShopRepository extends CrudRepository<WorkShop, Long> {
}

@ -0,0 +1,7 @@
package cn.estsh.i3plus.pojo.aps.tool;
public class APSDoubleTool {
public static boolean isZero(Double value) {
return (value == null) || (value > -0.000001 && value < 0.000001);
}
}

@ -0,0 +1,43 @@
package cn.estsh.i3plus.pojo.aps.validator;
import cn.estsh.i3plus.pojo.aps.annotation.CalendarTimeAnntation;
import cn.estsh.i3plus.pojo.aps.model.TimeBlock;
import cn.estsh.i3plus.pojo.base.util.StringUtil;
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
import java.text.ParseException;
import java.text.SimpleDateFormat;
public class CalendarTimeValidator implements ConstraintValidator<CalendarTimeAnntation, String> {
SimpleDateFormat timeFormat = new SimpleDateFormat("yyyy-MM-dd");
@Override
public boolean isValid(String s, ConstraintValidatorContext constraintValidatorContext) {
for (String strTime : s.split(",")) {
if (StringUtil.isEmpty(strTime)) {
continue;
}
String[] times = strTime.split("~");
if (times.length == 1) {
try {
timeFormat.parse(times[0]);
} catch (ParseException e) {
return false;
}
} else if (times.length == 2) {
try {
TimeBlock timeBlock = new TimeBlock();
timeBlock.setBegin(timeFormat.parse(times[0]));
timeBlock.setEnd(timeFormat.parse(times[1]));
} catch (ParseException e) {
return false;
}
} else {
return false;
}
}
return true;
}
}

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

@ -0,0 +1,36 @@
package cn.estsh.i3plus.pojo.aps.validator;
import cn.estsh.i3plus.pojo.aps.annotation.ShiftTimeAnnotation;
import cn.estsh.i3plus.pojo.aps.model.TimeBlock;
import cn.estsh.i3plus.pojo.base.util.StringUtil;
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
import java.text.ParseException;
import java.text.SimpleDateFormat;
public class ShiftTimeValidator implements ConstraintValidator<ShiftTimeAnnotation, String> {
SimpleDateFormat timeFormat = new SimpleDateFormat("HH:mm");
@Override
public boolean isValid(String s, ConstraintValidatorContext constraintValidatorContext) {
if (StringUtil.isEmpty(s)) {
return false;
}
for (String strTime : s.split(",")) {
String[] times = strTime.split("-");
if (times.length != 2) {
return false;
}
try {
TimeBlock timeBlock = new TimeBlock();
timeBlock.setBegin(timeFormat.parse(times[0]));
timeBlock.setEnd(timeFormat.parse(times[1]));
} catch (ParseException e) {
return false;
}
}
return true;
}
}

@ -8,4 +8,6 @@
</Relation> </Relation>
<Relation field="PrevRelations" name="WorkRelation" reverse="PostOrder" type="ONE_TO_MULTI" owner="false"> <Relation field="PrevRelations" name="WorkRelation" reverse="PostOrder" type="ONE_TO_MULTI" owner="false">
</Relation> </Relation>
<Relation field="priority" name="PriorityType" type="MULTI_TO_ONE" owner="false">
</Relation>
</Class> </Class>

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Class name="ImportDetail">
<Relation field="Fields" name="ImportField" reverse="ImportDetail" type="ONE_TO_MULTI" owner="true">
</Relation>
</Class>

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Class name="InsertedOrder" extends="BaseOrder">
<Relation field="ProductRouting" name="ProductRouting" type="ONE_TO_ONE" owner="true">
</Relation>
</Class>

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<Class name="InterMediateResult">
<Relation field="Work" name="Work" type="MULTI_TO_ONE">
</Relation>
<Relation field="Resource" name="Resource" type="MULTI_TO_ONE">
</Relation>
<Relation field="Details" name="InterMediateDetail" reverse="Result" type="ONE_TO_MULTI" owner="true">
</Relation>
</Class>

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Class name="Inventory" extends="BaseOrder">
<Relation field="SafeStockOrders" name="SafeStockOrder" reverse="Inventory" type="ONE_TO_MULTI" owner="true">
</Relation>
</Class>

@ -1,7 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Class name="Material"> <Class name="Material">
<Relation field="ProductRoutings" name="ProductRouting" reverse="Material" type="ONE_TO_MULTI" owner="true"> <Relation field="ProductRoutings" name="ProductRouting" reverse="Material" type="ONE_TO_MULTI" owner="true">
</Relation> </Relation>
<Relation field="Childs" name="Material" reverse="Group" type="ONE_TO_MULTI" owner="false"> <Relation field="Childs" name="Material" reverse="Group" type="ONE_TO_MULTI" owner="false">
</Relation> </Relation>
<Relation field="WorkShop" name="WorkShop" type="MULTI_TO_ONE" owner="false">
</Relation>
</Class> </Class>

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Class name="OrderFeedback">
<Relation field="Order" name="BaseOrder" type="ONE_TO_ONE" owner="false">
</Relation>
</Class>

@ -1,3 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Class name="PlanFeedback">
</Class>

@ -1,5 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Class name="Resource"> <Class name="Resource">
<Relation field="WorkShop" name="WorkShop" type="MULTI_TO_ONE" owner="false">
</Relation>
<Relation field="WorkPlans" name="WorkPlan" reverse="Resource" type="ONE_TO_MULTI" owner="true"> <Relation field="WorkPlans" name="WorkPlan" reverse="Resource" type="ONE_TO_MULTI" owner="true">
</Relation> </Relation>
</Class> </Class>

@ -1,3 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Class name="StandOperation"> <Class name="StandOperation">
<Relation field="WorkShop" name="WorkShop" type="MULTI_TO_ONE" owner="false">
</Relation>
</Class> </Class>

@ -16,8 +16,10 @@
</Relation> </Relation>
<Relation field="WorkPlans" name="WorkPlan" reverse="Work" type="ONE_TO_MULTI" owner="true"> <Relation field="WorkPlans" name="WorkPlan" reverse="Work" type="ONE_TO_MULTI" owner="true">
</Relation> </Relation>
<Relation field="PlanFeedbacks" name="PlanFeedback" reverse="Work" type="ONE_TO_MULTI" owner="true"> <Relation field="PlanFeedback" name="PlanFeedback" reverse="Work" type="ONE_TO_ONE" owner="true">
</Relation> </Relation>
<Relation field="SpecifyResource" name="Resource" type="MULTI_TO_ONE"> <Relation field="SpecifyResource" name="Resource" type="MULTI_TO_ONE">
</Relation> </Relation>
<Relation field="DynSplitWorks" name="Work" reverse="OriginWork" type="ONE_TO_MULTI">
</Relation>
</Class> </Class>

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-DEV-SNAPSHOT</version> <version>1.0-DEV-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -81,6 +81,31 @@ public class ApsEnumUtil {
} }
/** /**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum ORDER_VALID_TYPE {
VALID("VALID", "有效"),
INVALID("INVALID", "无效");
private String value;
private String description;
ORDER_VALID_TYPE(String value, String description) {
this.value = value;
this.description = description;
}
public String getValue() {
return value;
}
public String getDescription() {
return description;
}
}
/**
* *
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
@ -406,11 +431,15 @@ public class ApsEnumUtil {
} }
} }
public interface IRESOURCE_RULE {
String getValue();
String getDescription();
}
/** /**
* *
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum RESOURCE_CHOISE_RULE { public enum RESOURCE_CHOISE_RULE implements IRESOURCE_RULE {
PREV_SET_TIME("PREV_SET_TIME", "前设置时间"), PREV_SET_TIME("PREV_SET_TIME", "前设置时间"),
PRODUCE_TIME("PRODUCE_TIME", "生产时间"), PRODUCE_TIME("PRODUCE_TIME", "生产时间"),
POST_SET_TIME("POST_SET_TIME", "后设置时间"), POST_SET_TIME("POST_SET_TIME", "后设置时间"),
@ -433,10 +462,12 @@ public class ApsEnumUtil {
this.description = description; this.description = description;
} }
@Override
public String getValue() { public String getValue() {
return value; return value;
} }
@Override
public String getDescription() { public String getDescription() {
return description; return description;
} }
@ -638,13 +669,14 @@ public class ApsEnumUtil {
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum WORK_SORT_RULE { public enum WORK_SORT_RULE {
ORDER_LET("ORDER_LET", "订单交货期"), ORDER_LET("ORDER_LET", "订单最晚结束时刻计算值"),
ORDER_PRIORITY("ORDER_PRIORITY", "订单优先级"), ORDER_PRIORITY("ORDER_PRIORITY", "订单优先级"),
ORDER_EST("ORDER_EST", "订单最早开始时刻"), ORDER_EST("ORDER_EST", "订单最早开始时刻"),
ORDER_COUNT("ORDER_COUNT", "订单数量"), ORDER_COUNT("ORDER_COUNT", "订单数量"),
ORDER_RECEIVE_DATE("ORDER_RECEIVE_DATE", "订单接单日期"), ORDER_RECEIVE_DATE("ORDER_RECEIVE_DATE", "订单接单日期"),
ORDER_LET_SUB_EST("ORDER_LET_SUB_EST", "订单交货期与订单最早开始时刻之差"), ORDER_LET_SUB_EST("ORDER_LET_SUB_EST", "订单交货期与订单最早开始时刻之差"),
ORDER_SURPLUS("ORDER_SURPLUS", "订单余裕度"), ORDER_SURPLUS("ORDER_SURPLUS", "订单余裕度"),
ORDER_CODE("ORDER_CODE", "订单编码"),
NOPLAN_OPERATION_SIZE("NOPLAN_OPERATION_SIZE", "残留工序数"), NOPLAN_OPERATION_SIZE("NOPLAN_OPERATION_SIZE", "残留工序数"),
REMAIN_PRODUCE_TIME("REMAIN_PRODUCE_TIME", "残留生产时间"), REMAIN_PRODUCE_TIME("REMAIN_PRODUCE_TIME", "残留生产时间"),
MIN_OPERATION_REMAIN_TIME("MIN_OPERATION_REMAIN_TIME", "最小工序宽裕时间"), MIN_OPERATION_REMAIN_TIME("MIN_OPERATION_REMAIN_TIME", "最小工序宽裕时间"),
@ -654,7 +686,7 @@ public class ApsEnumUtil {
HAVE_HIGH_WORK("HAVE_HIGH_WORK", "订单中含有高级别工作"), HAVE_HIGH_WORK("HAVE_HIGH_WORK", "订单中含有高级别工作"),
WORK_RESOURCE_SIZE("WORK_RESOURCE_SIZE", "工作的可用资源数"), WORK_RESOURCE_SIZE("WORK_RESOURCE_SIZE", "工作的可用资源数"),
TOP_ORDER_LET("TOP_ORDER_LET", "顶层订单的交货期"), TOP_ORDER_LET("TOP_ORDER_LET", "顶层订单的交货期"),
TOP_ORDER_CODE("TOP_ORDER_CODE", "顶层订单码"), TOP_ORDER_CODE("TOP_ORDER_CODE", "顶层订单码"),
TOP_ORDER_PRIORITY("TOP_ORDER_PRIORITY", "顶层订单优先级"), TOP_ORDER_PRIORITY("TOP_ORDER_PRIORITY", "顶层订单优先级"),
CUST_EXPRESSION("CUST_EXPRESSION", "自定义表达式"); CUST_EXPRESSION("CUST_EXPRESSION", "自定义表达式");
@ -710,9 +742,9 @@ public class ApsEnumUtil {
public enum WORK_STATUS { public enum WORK_STATUS {
NOPLAN("NOPLAN", "未计划"), NOPLAN("NOPLAN", "未计划"),
PLANDONE("PLANDONE", "计划完毕"), PLANDONE("PLANDONE", "计划完毕"),
INDICATIONDONE("INDICATIONDONE", "指示完毕"), INDICATIONDONE("INDICATIONDONE", "锁定"),
CONFIRM("CONFIRM", "确认"), CONFIRM("CONFIRM", "下发"),
STARTPRODUCT("STARTPRODUCT", "开始生产"), STARTPRODUCT("STARTPRODUCT", "生产"),
FINISH("FINISH", "完成"); FINISH("FINISH", "完成");
private String value; private String value;
@ -737,7 +769,11 @@ public class ApsEnumUtil {
*/ */
@JsonFormat(shape = JsonFormat.Shape.OBJECT) @JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum WORK_TYPE { public enum WORK_TYPE {
// 工作不参与排程
FICTITIOUS("FICTITIOUS", "虚拟工作"), FICTITIOUS("FICTITIOUS", "虚拟工作"),
// 动态虚拟工作为不计算生产时间。
DYNAMIC_FICTITIOUS("DYNAMIC_FICTITIOUS", "动态虚拟工作"),
// 此工作参与排程
NORMAL("NORMAL", "普通工作"); NORMAL("NORMAL", "普通工作");
private String value; private String value;
@ -999,7 +1035,8 @@ public class ApsEnumUtil {
STRING("STRING", "字符串,文本框编辑"), STRING("STRING", "字符串,文本框编辑"),
OBJECT("OBJECT", "关联对象下来选择关联对象的Code值"), OBJECT("OBJECT", "关联对象下来选择关联对象的Code值"),
LIST("LIST", "对象集合,不可编辑。"), LIST("LIST", "对象集合,不可编辑。"),
MULTI_OBJECT("MULTI_OBJECT", "多选对象,弹出框选择,可以选择全部对象,以*表示选择全部"); MULTI_OBJECT("MULTI_OBJECT", "多选对象,弹出框选择,可以选择全部对象,以*表示选择全部"),
QUERY_LIST("QUERY_LIST", "通过接口获取下拉选项");
private String value; private String value;
private String description; private String description;
@ -1116,4 +1153,160 @@ public class ApsEnumUtil {
return description; return description;
} }
} }
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SALES_ORDER_STATUS {
WAITING("WAITING", "待处理"),
CHANGE("CHANGE", "改带"),
COMMIT("COMMIT", "确认");
private String value;
private String description;
SALES_ORDER_STATUS(String value, String description) {
this.value = value;
this.description = description;
}
public String getValue() {
return value;
}
public String getDescription() {
return description;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SAFE_STOCK_ORDER_STATUS {
UNCOMMIT("UNCOMMIT", "待处理"),
COMMIT("COMMIT", "确认");
private String value;
private String description;
SAFE_STOCK_ORDER_STATUS(String value, String description) {
this.value = value;
this.description = description;
}
public String getValue() {
return value;
}
public String getDescription() {
return description;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum INSERTED_ORDER_STATUS {
UNCOMMIT("UNCOMMIT", "待处理"),
COMMIT("COMMIT", "确认");
private String value;
private String description;
INSERTED_ORDER_STATUS(String value, String description) {
this.value = value;
this.description = description;
}
public String getValue() {
return value;
}
public String getDescription() {
return description;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum FEED_BACK_STATUS {
UNCOMMIT("UNCOMMIT", "未提交"),
COMMIT("COMMIT", "提交");
private String value;
private String description;
FEED_BACK_STATUS(String value, String description) {
this.value = value;
this.description = description;
}
public String getValue() {
return value;
}
public String getDescription() {
return description;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum APS_ORDER_TYPE {
SALES_ORDER("S", "销售订单"),
PRODUCT_ORDER("M", "生产订单"),
PURCHASE_ORDER("P", "采购订单"),
INVENTORY("W", "库存订单"),
SAFE_STOCK_ORDER("Q", "安全库存订单"),
INSERTED_ORDER("I", "插单");
private String value;
private String description;
APS_ORDER_TYPE(String value, String description) {
this.value = value;
this.description = description;
}
public String getValue() {
return value;
}
public String getDescription() {
return description;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum SANLUX_OPERATION_TYPE {
NORMAL("NORMAL", "正常工序"),
FOUR_SULFIDATION("FOUR_SULFIDATION", "四车间硫化"),
FOUR_TRAINBEARER("FOUR_TRAINBEARER", "四车间牵纱");
private String value;
private String description;
SANLUX_OPERATION_TYPE(String value, String description) {
this.value = value;
this.description = description;
}
public String getValue() {
return value;
}
public String getDescription() {
return description;
}
}
} }

@ -2100,7 +2100,8 @@ public class MesEnumUtil {
MES_SCATTER_PART_CFG_BOM(620, "scatterPartCfgBomExcelService", "车型散件配置清单导入"), MES_SCATTER_PART_CFG_BOM(620, "scatterPartCfgBomExcelService", "车型散件配置清单导入"),
MES_SPARE_PARTS(630, "sparePartsExcelService", "备件计划导入"), MES_SPARE_PARTS(630, "sparePartsExcelService", "备件计划导入"),
MES_JISA(640, "jisaExcelService", "JISA导入"), MES_JISA(640, "jisaExcelService", "JISA导入"),
MES_CONTROL_PLAN(650, "controlPlanExcelService", "控制计划导入"); MES_CONTROL_PLAN(650, "controlPlanExcelService", "控制计划导入"),
MES_HOLIDAY_VACATION(660, "holidayVacationExcelService", "节假日导入");
private int value; private int value;
private String service; private String service;

@ -3693,6 +3693,7 @@ public class MesPcnEnumUtil {
WS_CMD_INIT_MODULE(10, "initModule", "actorReceiveStrategyInitService", "展示组件初始化"), WS_CMD_INIT_MODULE(10, "initModule", "actorReceiveStrategyInitService", "展示组件初始化"),
WS_CMD_DO_SCAN(20, "doScan", "actorReceiveStrategyScanService", "执行扫描"), WS_CMD_DO_SCAN(20, "doScan", "actorReceiveStrategyScanService", "执行扫描"),
WS_CMD_DO_MODULE(30, "doModule", "actorReceiveStrategyModuleService", "展示组件执行方法"), WS_CMD_DO_MODULE(30, "doModule", "actorReceiveStrategyModuleService", "展示组件执行方法"),
WS_CMD_DO_FUNCTION(30, "doFunction", "actorReceiveStrategyFunctionService", "展示组件业务功能方法"),
WS_CMD_JUMP_PROCESS(40, "jumpProcess", "actorReceiveStrategyJumpProcessService", "跳过工序"), WS_CMD_JUMP_PROCESS(40, "jumpProcess", "actorReceiveStrategyJumpProcessService", "跳过工序"),
WS_CMD_STOP_CELL_MONITOR(50, "stopCellMonitor", "actorReceiveStrategyStopCellMonitorService", "停止执行监听组件"); WS_CMD_STOP_CELL_MONITOR(50, "stopCellMonitor", "actorReceiveStrategyStopCellMonitorService", "停止执行监听组件");

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-DEV-SNAPSHOT</version> <version>1.0-DEV-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -137,6 +137,17 @@ public class BfElement extends BaseBean {
public boolean isOrganizeIsolation(){ public boolean isOrganizeIsolation(){
return isOrganizeIsolation != null && isOrganizeIsolation == BlockFormEnumUtil.ELEMENT_ORGANIZE_ISOLATION_STATUS.ON.getValue(); return isOrganizeIsolation != null && isOrganizeIsolation == BlockFormEnumUtil.ELEMENT_ORGANIZE_ISOLATION_STATUS.ON.getValue();
} }
@Column(name = "ELEMENT_ORGANIZE_ISOLATION_ATTR_ID")
@ApiParam(value = "组织隔离属性id")
private Long elementOrganizeIsolationAttrId;
public Long getElementOrganizeIsolationAttrId() {
return elementOrganizeIsolationAttrId;
}
public void setElementOrganizeIsolationAttrId(Long elementOrganizeIsolationAttrId) {
this.elementOrganizeIsolationAttrId = elementOrganizeIsolationAttrId;
}
@Column(name = "IS_OBJECT_EXPORT") @Column(name = "IS_OBJECT_EXPORT")
@ApiParam(value = "是否导出") @ApiParam(value = "是否导出")

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-DEV-SNAPSHOT</version> <version>1.0-DEV-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-DEV-SNAPSHOT</version> <version>1.0-DEV-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-DEV-SNAPSHOT</version> <version>1.0-DEV-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-DEV-SNAPSHOT</version> <version>1.0-DEV-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -22,6 +22,7 @@ public class MdmHqlPack {
DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean(mdmBean); DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean(mdmBean);
DdlPreparedPack.getNumEqualPack(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue(), "isMdmPublished", ddlPackBean); DdlPreparedPack.getNumEqualPack(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue(), "isMdmPublished", ddlPackBean);
DdlPreparedPack.getNumEqualPack(mdmBean.isValid, "isValid", ddlPackBean);
return ddlPackBean; return ddlPackBean;
} }

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId>
<version>1.0-DEV-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>i3plus-pojo-mes-pcn</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>i3plus.pojo</groupId>
<artifactId>i3plus-pojo-base</artifactId>
</dependency>
</dependencies>
<profiles>
<profile>
<id>dev</id>
<properties>
<profileActive>DEV</profileActive>
</properties>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
<profile>
<id>test</id>
<properties>
<profileActive>TEST</profileActive>
</properties>
</profile>
<profile>
<id>docker</id>
<properties>
<profileActive>DOCKER</profileActive>
</properties>
</profile>
<profile>
<id>prod</id>
<properties>
<profileActive>PROD</profileActive>
</properties>
</profile>
</profiles>
<build>
<finalName>${project.artifactId}-${project.version}</finalName>
</build>
</project>

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>i3plus-pojo</artifactId> <artifactId>i3plus-pojo</artifactId>
<groupId>i3plus.pojo</groupId> <groupId>i3plus.pojo</groupId>
<version>1.0-DEV-SNAPSHOT</version> <version>1.0-DEV-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

@ -111,4 +111,25 @@ public class IfDismantleRecord extends BaseBean implements Serializable {
@Column(name = "DEFECT_CODE") @Column(name = "DEFECT_CODE")
@ApiParam("缺陷代码") @ApiParam("缺陷代码")
private String defectCode; private String defectCode;
@Column(name = "DEFECT_NAME")
@ApiParam("缺陷名称")
private String defectName;
@Column(name = "DC_CODE")
@ApiParam("缺陷原因代码")
private String dcCode;
@Column(name = "DC_NAME")
@ApiParam("缺陷原因名称")
private String dcName;
@Column(name = "REPAIR_CODE")
@ApiParam("维修代码")
private String repairCode;
@Column(name = "REPAIR_NAME")
@ApiParam("维修名称")
private String repairName;
} }

@ -5,17 +5,13 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import org.hibernate.annotations.ColumnDefault; import org.hibernate.annotations.ColumnDefault;
import org.hibernate.annotations.DynamicInsert; import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate; import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column; import javax.persistence.*;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable; import java.io.Serializable;
/** /**
@ -31,7 +27,9 @@ import java.io.Serializable;
@DynamicUpdate @DynamicUpdate
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Inheritance(strategy = InheritanceType.JOINED) @Inheritance(strategy = InheritanceType.JOINED)
@Table(name = "IF_PRODUCT_OFF_LINE") @Table(name = "IF_PRODUCT_OFF_LINE", uniqueConstraints = {
@UniqueConstraint(columnNames = {"ORGANIZE_CODE", "PACKAGE_NO", "ITEM_PART_NO"})
})
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@Api("生产报工表") @Api("生产报工表")

@ -63,4 +63,8 @@ public class MesContainer extends BaseBean {
@Column(name = "TIME_SECOND") @Column(name = "TIME_SECOND")
@ApiParam(value = "处理时间(秒)") @ApiParam(value = "处理时间(秒)")
private String timeSecond; private String timeSecond;
@Column(name = "SYNC_STATUS")
@ApiParam("同步状态")
private Integer syncStatus = 10;
} }

@ -0,0 +1,55 @@
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.*;
import java.io.Serializable;
/**
* @Description:
* @Reference:
* @Author: Crish
* @CreateDate:2019-04-16-17:36
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Inheritance(strategy = InheritanceType.JOINED)
@Table(name = "MES_CONTAINER_SN_RECORD", indexes = {
@Index(columnList = "SERIAL_NUMBER"),
@Index(columnList = "PART_NO"),
@Index(columnList = "CT_NO")
})
@Api("容器条码记录表")
public class MesContainerSnRecord extends BaseBean implements Serializable {
private static final long serialVersionUID = -303802118993255101L;
@Column(name = "SERIAL_NUMBER")
@ApiParam("过程条码")
private String serialNumber;
@Column(name = "PART_NO")
@ApiParam("物料号")
private String partNo;
@Column(name = "PART_NAME")
@ApiParam("物料名称")
private String partName;
@Column(name = "CT_NO")
@ApiParam("容器号")
private String ctNo;
@Column(name = "QTY")
@ApiParam("数量")
private Double qty;
}

@ -55,4 +55,8 @@ public class MesContainerType extends BaseBean {
@Column(name = "LIMIT_UOM") @Column(name = "LIMIT_UOM")
@ApiParam(value = "期限单位") @ApiParam(value = "期限单位")
private String limitUom; private String limitUom;
@Column(name = "SYNC_STATUS")
@ApiParam("同步状态")
private Integer syncStatus = 10;
} }

@ -0,0 +1,42 @@
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.*;
import java.io.Serializable;
/**
* @Author: Wynne.Lu
* @CreateDate: 2019/10/18 2:55
* @Description:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Inheritance(strategy = InheritanceType.JOINED)
@Table(name = "MES_HOLIDAY_VACTION")
@Api("节假日")
public class MesHolidayVacation extends BaseBean implements Serializable {
private static final long serialVersionUID = -1620451254243818560L;
@Column(name = "YEAR")
@ApiParam("年")
private String year;
@Column(name = "MONTH")
@ApiParam("月")
private String month;
@Column(name = "DAY")
@ApiParam("日")
private String day;
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save