Merge remote-tracking branch 'origin/dev' into dev

yun-zuoyi
crish 6 years ago
commit 7ea051b42e

@ -8,7 +8,9 @@ import java.lang.annotation.Target;
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface FieldAnnotation {
boolean property() default true;
boolean modify() default true;
boolean display() default true;
int pric() default 2;
boolean mainkey() default false;
}

@ -1,5 +1,6 @@
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.EBaseOrder;
@ -53,7 +54,37 @@ public class BaseOrder extends BaseAPS {
@ApiParam(value ="接单日期")
private Date receiveDate;
@Column(name="MATERIAL_ID")
@ApiParam(value ="物料")
@FieldAnnotation(property = false)
private Long materialId;
public List<Work> getWorks() {
return BeanRelation.list(this, EBaseOrder.Works);
}
public Material getMaterial() {
return BeanRelation.get(this, EBaseOrder.Material);
}
public void setMaterial(Material material) {
this.materialId = material != null ? material.getId() : 0l;
BeanRelation.set(this, EBaseOrder.Material, material);
}
public List<WorkRelation> getPrevRelations() {
return BeanRelation.list(this, EBaseOrder.PrevRelations);
}
public List<WorkRelation> getPostRelations() {
return BeanRelation.list(this, EBaseOrder.PostRelations);
}
public List<BaseOrder> getUpperOrders() {
return BeanRelation.list(this, EBaseOrder.UpperOrders);
}
public List<BaseOrder> getLowerOrders() {
return BeanRelation.list(this, EBaseOrder.LowerOrders);
}
}

@ -1,5 +1,6 @@
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.EExportDetail;
@ -41,6 +42,7 @@ public class ExportDetail extends BaseAPS {
@Column(name="PROJECT_ID")
@ApiParam(value ="导出项目ID")
@FieldAnnotation(property = false)
private Long projectId;
public ExportProject getProject() {

@ -1,8 +1,10 @@
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.EExportProject;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -29,7 +31,9 @@ public class ExportProject extends BaseAPS {
private String name;
@Column(name="LINK_ID")
@ApiParam(value ="数据源连接")
@ApiParam(value ="数据连接对象")
@FieldAnnotation(property = false)
@JsonIgnore
private Long linkId;
public DataLink getLink() {

@ -71,6 +71,10 @@ public class FieldInfo extends BaseCode {
@ApiParam(value ="位置")
private String position;
@Column(name="MAIN_KEY")
@ApiParam(value ="主键标识")
private Boolean mainKey;
@JsonIgnore
private transient Class<? extends BaseBean> clazz;
@JsonIgnore

@ -1,7 +1,11 @@
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.enums.IMPORT_DETAIL_TYPE;
import cn.estsh.i3plus.pojo.aps.holders.EExportDetail;
import cn.estsh.i3plus.pojo.aps.holders.EImportDetail;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -33,4 +37,18 @@ public class ImportDetail extends BaseAPS {
@Column(name="IN_NAME")
@ApiParam(value ="内部表名")
private String inName;
@Column(name="PROJECT_ID")
@ApiParam(value ="导入项目ID")
@FieldAnnotation(property = false)
private Long projectId;
public ImportProject getProject() {
return BeanRelation.get(this, EImportDetail.Project);
}
public void setProject(ImportProject project) {
this.projectId = project != null ? project.getId() : 0l;
BeanRelation.set(this, EImportDetail.Project, project);
}
}

@ -1,6 +1,9 @@
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.EImportProject;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -8,6 +11,7 @@ import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.List;
/**
* @Description :
@ -24,4 +28,22 @@ public class ImportProject extends BaseAPS {
@Column(name="NAME")
@ApiParam(value ="标识名")
private String name;
@Column(name="LINK_ID")
@ApiParam(value ="数据连接对象")
@FieldAnnotation(property = false)
private Long linkId;
public DataLink getLink() {
return BeanRelation.get(this, EImportProject.Link);
}
public void setLink(DataLink link) {
this.linkId = link != null ? link.getId() : 0l;
BeanRelation.set(this, EImportProject.Link, link);
}
public List<ImportDetail> getDetails() {
return BeanRelation.list(this, EImportProject.Details);
}
}

@ -1,9 +1,11 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.common.BaseCode;
import cn.estsh.i3plus.pojo.aps.common.BeanRelation;
import cn.estsh.i3plus.pojo.aps.enums.MATERIAL_TYPE;
import cn.estsh.i3plus.pojo.aps.enums.PREPARE_TYPE;
import cn.estsh.i3plus.pojo.aps.enums.REPLENISHMENT_TYPE;
import cn.estsh.i3plus.pojo.aps.holders.EMaterial;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -11,6 +13,7 @@ import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.List;
/**
* @Description :
@ -103,4 +106,32 @@ public class Material extends BaseCode {
@Column(name="MAX_STOCK_COUNT")
@ApiParam(value ="最大库存数量")
private Double maxStockCount;
public List<ProductRouting> getProductRoutings() {
return BeanRelation.list(this, EMaterial.ProductRoutings);
}
public List<OperInput> getOperInputs() {
return BeanRelation.list(this, EMaterial.OperInputs);
}
public List<OperOutput> getOperOutputs() {
return BeanRelation.list(this, EMaterial.OperOutputs);
}
public List<WorkInput> getWorkInputs() {
return BeanRelation.list(this, EMaterial.WorkInputs);
}
public List<WorkOutput> getWorkOutputs() {
return BeanRelation.list(this, EMaterial.WorkOutputs);
}
public List<WorkRelation> getWorkRelations() {
return BeanRelation.list(this, EMaterial.WorkRelations);
}
public List<BaseOrder> getOrders() {
return BeanRelation.list(this, EMaterial.Orders);
}
}

@ -1,7 +1,10 @@
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.enums.CONSTRAINT_TYPE;
import cn.estsh.i3plus.pojo.aps.holders.EOperInput;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -9,6 +12,7 @@ import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.List;
/**
* @Description :
@ -45,4 +49,36 @@ public class OperInput extends BaseAPS {
@Column(name="MIN_SPACE_TIME")
@ApiParam(value ="最小时间间隔")
private String minSpaceTime;
@Column(name="OPERATION_ID")
@ApiParam(value ="工序")
@FieldAnnotation(property = false)
private Long operationId;
@Column(name="MATERIAL_ID")
@ApiParam(value ="物料")
@FieldAnnotation(property = false)
private Long materialId;
public Operation getOperation() {
return BeanRelation.get(this, EOperInput.Operation);
}
public void setOperation(Operation oper) {
this.operationId = oper != null ? oper.getId() : 0l;
BeanRelation.set(this, EOperInput.Operation, oper);
}
public Material getMaterial() {
return BeanRelation.get(this, EOperInput.Material);
}
public void setMaterial(Material material) {
this.materialId = material != null ? material.getId() : 0l;
BeanRelation.set(this, EOperInput.Material, material);
}
public List<WorkInput> getWorkInputs() {
return BeanRelation.list(this, EOperInput.WorkInputs);
}
}

@ -1,6 +1,9 @@
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.EOperOutput;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -8,6 +11,7 @@ import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.List;
/**
* @Description :
@ -21,15 +25,47 @@ import javax.persistence.Table;
@Table(name = "APS_OPER_OUTPUT")
@Api("工序输出")
public class OperOutput extends BaseAPS {
@Column(name="output_Count")
@Column(name="OUTPUT_COUNT")
@ApiParam(value ="输出数量")
private Double outputCount;
@Column(name="yield")
@Column(name="YIELD")
@ApiParam(value ="成品率")
private Double yield;
@Column(name="fix_Scrap_Count")
@Column(name="FIX_SCRAP_COUNT")
@ApiParam(value ="固定报废数")
private Double fixScrapCount;
@Column(name="OPERATION_ID")
@ApiParam(value ="工序")
@FieldAnnotation(property = false)
private Long operationId;
@Column(name="MATERIAL_ID")
@ApiParam(value ="物料")
@FieldAnnotation(property = false)
private Long materialId;
public Operation getOperation() {
return BeanRelation.get(this, EOperOutput.Operation);
}
public void setOperation(Operation oper) {
this.operationId = oper != null ? oper.getId() : 0l;
BeanRelation.set(this, EOperOutput.Operation, oper);
}
public Material getMaterial() {
return BeanRelation.get(this, EOperOutput.Material);
}
public void setMaterial(Material material) {
this.materialId = material != null ? material.getId() : 0l;
BeanRelation.set(this, EOperOutput.Material, material);
}
public List<WorkOutput> getWorkOutputs() {
return BeanRelation.list(this, EOperOutput.WorkOutputs);
}
}

@ -1,7 +1,10 @@
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.enums.USE_TYPE;
import cn.estsh.i3plus.pojo.aps.holders.EOperResource;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -9,6 +12,7 @@ import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.List;
/**
* @Description :
@ -53,4 +57,36 @@ public class OperResource extends BaseAPS {
@Column(name="PRIORITY")
@ApiParam(value ="优先级")
private Integer priority;
@Column(name="OPERATION_ID")
@ApiParam(value ="工序")
@FieldAnnotation(property = false)
private Long operationId;
@Column(name="RESOURCE_ID")
@ApiParam(value ="资源")
@FieldAnnotation(property = false)
private Long resourceId;
public Operation getOperation() {
return BeanRelation.get(this, EOperResource.Operation);
}
public void setOperation(Operation oper) {
this.operationId = oper != null ? oper.getId() : 0l;
BeanRelation.set(this, EOperResource.Operation, oper);
}
public Resource getResource() {
return BeanRelation.get(this, EOperResource.Resource);
}
public void setResource(Resource res) {
this.resourceId = res != null ? res.getId() : 0l;
BeanRelation.set(this, EOperResource.Resource, res);
}
public List<WorkResource> getWorkResources() {
return BeanRelation.list(this, EOperResource.WorkResources);
}
}

@ -1,15 +1,20 @@
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.enums.CONSTRAINT_TYPE;
import cn.estsh.i3plus.pojo.aps.enums.TAIL_DEAL;
import cn.estsh.i3plus.pojo.aps.holders.EOperation;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import org.springframework.context.annotation.Bean;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.List;
/**
* @Description :
@ -71,4 +76,48 @@ public class Operation extends BaseAPS {
@Column(name="MIN_SPACE_TIME")
@ApiParam(value ="最小时间间隔")
private String minSpaceTime;
@Column(name="PRODUCT_ROUTING_ID")
@ApiParam(value ="工艺路线")
@FieldAnnotation(property = false)
private Long productRoutingId;
@Column(name="STAND_OPERATION_ID")
@ApiParam(value ="标准工序")
@FieldAnnotation(property = false)
private Long standOperationId;
public ProductRouting getProductRouting() {
return BeanRelation.get(this, EOperation.ProductRouting);
}
public void setProductRouting(ProductRouting routing) {
this.productRoutingId = routing != null ? routing.getId() : 0l;
BeanRelation.set(this, EOperation.ProductRouting, routing);
}
public List<OperInput> getOperInputs() {
return BeanRelation.list(this, EOperation.OperInputs);
}
public List<OperOutput> getOperOutputs() {
return BeanRelation.list(this, EOperation.OperOutputs);
}
public List<Resource> getOperResources() {
return BeanRelation.list(this, EOperation.OperResources);
}
public StandOperation getStandOperation() {
return BeanRelation.get(this, EOperation.StandOperation);
}
public void setStandOperation(StandOperation std) {
this.standOperationId = std != null ? std.getId() : 0l;
BeanRelation.set(this, EOperation.StandOperation, std);
}
public List<Work> getWorks() {
return BeanRelation.list(this, EOperation.Works);
}
}

@ -1,9 +1,14 @@
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.EPlanFeedback;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
@ -19,4 +24,18 @@ import javax.persistence.Table;
@Table(name = "APS_PLAN_FEEDBACK")
@Api("物料")
public class PlanFeedback extends BaseAPS {
@Column(name="WORK_ID")
@ApiParam(value ="工作")
@FieldAnnotation(property = false)
private Long workId;
public Work getWork() {
return BeanRelation.get(this, EPlanFeedback.Work);
}
public void setWork(Work work) {
this.workId = work != null ? work.getId() : 0l;
BeanRelation.set(this, EPlanFeedback.Work, work);
}
}

@ -1,5 +1,9 @@
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.EProductOrder;
import cn.estsh.i3plus.pojo.aps.holders.EProductRouting;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -80,4 +84,18 @@ public class ProductOrder extends BaseOrder {
@Column(name="LACK_COUNT")
@ApiParam(value ="缺少量")
private Double lackCount;
@Column(name="PRODUCT_ROUTING_ID")
@ApiParam(value ="工艺路线")
@FieldAnnotation(property = false)
private Long productRoutingId;
public ProductRouting getProductRouting() {
return BeanRelation.get(this, EProductOrder.ProductRouting);
}
public void setProductRouting(ProductRouting routing) {
this.productRoutingId = routing != null ? routing.getId() : 0l;
BeanRelation.set(this, EProductOrder.ProductRouting, routing);
}
}

@ -1,6 +1,9 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.aps.common.BaseCode;
import cn.estsh.i3plus.pojo.aps.common.BeanRelation;
import cn.estsh.i3plus.pojo.aps.holders.EProductRouting;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -9,6 +12,7 @@ import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
import java.util.List;
/**
* @Description :线
@ -33,4 +37,26 @@ public class ProductRouting extends BaseCode {
@Column(name="PRIORITY")
@ApiParam(value ="优先级")
private Integer priority;
@Column(name="MATERIAL_ID")
@ApiParam(value ="物料")
@FieldAnnotation(property = false)
private Long materialId;
public Material getMaterial() {
return BeanRelation.get(this, EProductRouting.Material);
}
public void setMaterial(Material material) {
this.materialId = material != null ? material.getId() : 0l;
BeanRelation.set(this, EProductRouting.Material, material);
}
public List<Operation> getOperations() {
return BeanRelation.list(this, EProductRouting.Operations);
}
public List<ProductOrder> getProductOrders() {
return BeanRelation.list(this, EProductRouting.ProductOrders);
}
}

@ -26,7 +26,7 @@ public class SysParam extends BaseAPS {
@ApiParam(value ="基准时间")
private Date baseTime;
@Column(name="max_Interrupt_Count")
@Column(name="MAX_INTERRUPT_COUNT")
@ApiParam(value ="最大中断次数")
private Integer maxInterruptCount;
}

@ -1,5 +1,6 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.aps.common.BaseCode;
import cn.estsh.i3plus.pojo.aps.common.BeanRelation;
import cn.estsh.i3plus.pojo.aps.enums.WORK_STATUS;
@ -13,6 +14,7 @@ import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
import java.util.List;
/**
* @Description :
@ -96,8 +98,14 @@ public class Work extends BaseCode {
@Column(name="ORDER_ID")
@ApiParam(value ="订单")
@FieldAnnotation(property = false)
private Long orderId;
@Column(name="OPERATION_ID")
@ApiParam(value ="工序")
@FieldAnnotation(property = false)
private Long operationId;
public BaseOrder getOrder() {
return BeanRelation.get(this, EWork.Order);
}
@ -106,4 +114,37 @@ public class Work extends BaseCode {
this.orderId = order != null ? order.getId() : 0l;
BeanRelation.set(this, EWork.Order, order);
}
public List<WorkResource> getWorkResources() {
return BeanRelation.list(this, EWork.WorkResources);
}
public List<WorkInput> getWorkInputs() {
return BeanRelation.list(this, EWork.WorkInputs);
}
public List<WorkOutput> getWorkOutputs() {
return BeanRelation.list(this, EWork.WorkOutputs);
}
public List<WorkRelation> getWorkRelationInputs() {
return BeanRelation.list(this, EWork.WorkRelationInputs);
}
public List<WorkRelation> getWorkRelationOutputs() {
return BeanRelation.list(this, EWork.WorkRelationOutputs);
}
public Operation getOperation() {
return BeanRelation.get(this, EWork.Operation);
}
public void setOperation(Operation oper) {
this.operationId = oper != null ? oper.getId() : 0l;
BeanRelation.set(this, EWork.Operation, oper);
}
public List<PlanFeedback> getPlanFeedbacks() {
return BeanRelation.list(this, EWork.PlanFeedbacks);
}
}

@ -1,6 +1,9 @@
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.EWorkInput;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -9,6 +12,7 @@ import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
import java.util.List;
/**
* @Description :
@ -33,4 +37,50 @@ public class WorkInput extends BaseAPS {
@Column(name="SHORT_COUNT")
@ApiParam(value ="短缺数量")
private Double shortCount;
@Column(name="WORK_ID")
@ApiParam(value ="工作")
@FieldAnnotation(property = false)
private Long workId;
@Column(name="MATERIAL_ID")
@ApiParam(value ="物料")
@FieldAnnotation(property = false)
private Long materialId;
@Column(name="OPER_INPUT_ID")
@ApiParam(value ="工序输入")
@FieldAnnotation(property = false)
private Long operInputId;
public Work getWork() {
return BeanRelation.get(this, EWorkInput.Work);
}
public void setWork(Work work) {
this.workId = work != null ? work.getId() : 0l;
BeanRelation.set(this, EWorkInput.Work, work);
}
public List<WorkRelation> getWorkRelations() {
return BeanRelation.list(this, EWorkInput.WorkRelations);
}
public Material getMaterial() {
return BeanRelation.get(this, EWorkInput.Material);
}
public void setMaterial(Material material) {
this.materialId = material != null ? material.getId() : 0l;
BeanRelation.set(this, EWorkInput.Material, material);
}
public OperInput getOperInput() {
return BeanRelation.get(this, EWorkInput.OperInput);
}
public void setOperInput(OperInput input) {
this.operInputId = input != null ? input.getId() : 0l;
BeanRelation.set(this, EWorkInput.OperInput, input);
}
}

@ -1,14 +1,19 @@
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.EWorkOutput;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import org.springframework.context.annotation.Bean;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
import java.util.List;
/**
* @Description :
@ -33,4 +38,50 @@ public class WorkOutput extends BaseAPS {
@Column(name="REMAIN_COUNT")
@ApiParam(value ="多余数量")
private Double remainCount;
@Column(name="WORK_ID")
@ApiParam(value ="工作")
@FieldAnnotation(property = false)
private Long workId;
@Column(name="MATERIAL_ID")
@ApiParam(value ="物料")
@FieldAnnotation(property = false)
private Long materialId;
@Column(name="OPER_OUTPUT_ID")
@ApiParam(value ="工序输出")
@FieldAnnotation(property = false)
private Long operOutputId;
public Work getWork() {
return BeanRelation.get(this, EWorkOutput.Work);
}
public void setWork(Work work) {
this.workId = work != null ? work.getId() : 0l;
BeanRelation.set(this, EWorkOutput.Work, work);
}
public List<WorkRelation> getWorkRelations() {
return BeanRelation.list(this, EWorkOutput.WorkRelations);
}
public Material getMaterial() {
return BeanRelation.get(this, EWorkOutput.Material);
}
public void setMaterial(Material material) {
this.materialId = material != null ? material.getId() : 0l;
BeanRelation.set(this, EWorkOutput.Material, material);
}
public OperOutput getOperOutput() {
return BeanRelation.get(this, EWorkOutput.OperOutput);
}
public void setOperOutput(OperOutput output) {
this.operOutputId = output != null ? output.getId() : 0l;
BeanRelation.set(this, EWorkOutput.OperOutput, output);
}
}

@ -1,8 +1,12 @@
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.enums.CONSTRAINT_TYPE;
import cn.estsh.i3plus.pojo.aps.enums.WORK_RELATION_TYPE;
import cn.estsh.i3plus.pojo.aps.holders.EWork;
import cn.estsh.i3plus.pojo.aps.holders.EWorkRelation;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -50,4 +54,102 @@ public class WorkRelation extends BaseAPS {
@Column(name="FIX_COUNT")
@ApiParam(value ="是否固定数量")
private Boolean fixCount;
@Column(name="WORK_INPUT_ID")
@ApiParam(value ="工作输入")
@FieldAnnotation(property = false)
private Long workInputId;
@Column(name="WORK_OUTPUT_ID")
@ApiParam(value ="工作输出")
@FieldAnnotation(property = false)
private Long workOutputId;
@Column(name="PREV_WORK_ID")
@ApiParam(value ="前工作")
@FieldAnnotation(property = false)
private Long prevWorkId;
@Column(name="POST_WORK_ID")
@ApiParam(value ="后工作")
@FieldAnnotation(property = false)
private Long postWorkId;
@Column(name="PREV_ORDER_ID")
@ApiParam(value ="前订单")
@FieldAnnotation(property = false)
private Long prevOrderId;
@Column(name="POST_ORDER_ID")
@ApiParam(value ="后订单")
@FieldAnnotation(property = false)
private Long postOrderId;
@Column(name="MATERIAL_ID")
@ApiParam(value ="物料")
@FieldAnnotation(property = false)
private Long materialId;
public WorkInput getWorkInput() {
return BeanRelation.get(this, EWorkRelation.WorkInput);
}
public void setWorkInput(WorkInput input) {
this.workInputId = input != null ? input.getId() : 0l;
BeanRelation.set(this, EWorkRelation.WorkInput, input);
}
public WorkOutput getWorkOutput() {
return BeanRelation.get(this, EWorkRelation.WorkOutput);
}
public void setWorkOutput(WorkOutput output) {
this.workOutputId = output != null ? output.getId() : 0l;
BeanRelation.set(this, EWorkRelation.WorkOutput, output);
}
public Work getPrevWork() {
return BeanRelation.get(this, EWorkRelation.PrevWork);
}
public void setPrevWork(Work work) {
this.prevWorkId = work != null ? work.getId() : 0l;
BeanRelation.set(this, EWorkRelation.PrevWork, work);
}
public Work getPostWork() {
return BeanRelation.get(this, EWorkRelation.PostWork);
}
public void setPostWork(Work work) {
this.postWorkId = work != null ? work.getId() : 0l;
BeanRelation.set(this, EWorkRelation.PostWork, work);
}
public BaseOrder getPrevOrder() {
return BeanRelation.get(this, EWorkRelation.PrevOrder);
}
public void setPrevOrder(BaseOrder order) {
this.prevOrderId = order != null ? order.getId() : 0l;
BeanRelation.set(this, EWorkRelation.PrevOrder, order);
}
public BaseOrder getPostOrder() {
return BeanRelation.get(this, EWorkRelation.PostOrder);
}
public void setPostOrder(BaseOrder order) {
this.postOrderId = order != null ? order.getId() : 0l;
BeanRelation.set(this, EWorkRelation.PostOrder, order);
}
public Material getMaterial() {
return BeanRelation.get(this, EWorkRelation.Material);
}
public void setMaterial(Material material) {
this.materialId = material != null ? material.getId() : 0l;
BeanRelation.set(this, EWorkRelation.Material, material);
}
}

@ -1,7 +1,11 @@
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.enums.USE_TYPE;
import cn.estsh.i3plus.pojo.aps.holders.EWorkRelation;
import cn.estsh.i3plus.pojo.aps.holders.EWorkResource;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -53,4 +57,46 @@ public class WorkResource extends BaseAPS {
@Column(name="MAX_POST_SD_TIME")
@ApiParam(value ="最大后设置中断时间")
private String maxPostSdTime;
@Column(name="WORK_ID")
@ApiParam(value ="工作")
@FieldAnnotation(property = false)
private Long workId;
@Column(name="RESOURCE_ID")
@ApiParam(value ="资源")
@FieldAnnotation(property = false)
private Long resourceId;
@Column(name="OPER_RESOURCE_ID")
@ApiParam(value ="工序资源")
@FieldAnnotation(property = false)
private Long operResourceId;
public Work getWork() {
return BeanRelation.get(this, EWorkResource.Work);
}
public void setWork(Work work) {
this.workId = work != null ? work.getId() : 0l;
BeanRelation.set(this, EWorkResource.Work, work);
}
public Resource getResource() {
return BeanRelation.get(this, EWorkResource.Resource);
}
public void setResource(Resource res) {
this.resourceId = res != null ? res.getId() : 0l;
BeanRelation.set(this, EWorkResource.Resource, res);
}
public OperResource getOperResource() {
return BeanRelation.get(this, EWorkResource.OperResource);
}
public void setOperResource(OperResource res) {
this.operResourceId = res != null ? res.getId() : 0l;
BeanRelation.set(this, EWorkResource.OperResource, res);
}
}

@ -1,6 +1,5 @@
package cn.estsh.i3plus.pojo.aps.common;
import cn.estsh.i3plus.pojo.aps.bean.DateDuration;
import cn.estsh.i3plus.pojo.aps.enums.FIELD_TYPE;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;

@ -12,6 +12,12 @@ import java.util.function.Predicate;
public class BeanRelation {
Map<Class<? extends BaseBean>, Map<Long, Map<Enum<?>, List<BaseBean>>>> caches = new HashMap<>();
private void init() {
for (Class<? extends BaseBean> cls : BeanInfo.getBeanClasses()) {
caches.put(cls, new ConcurrentHashMap<>());
}
}
private static Map<Long, BeanRelation> relations = new ConcurrentHashMap<>();
private static BeanRelation get() {
Long userId = 0l;
@ -21,6 +27,7 @@ public class BeanRelation {
relation = relations.get(userId);
if (relation == null) {
relation = new BeanRelation();
relation.init();
relations.put(userId, relation);
}
}
@ -30,7 +37,15 @@ public class BeanRelation {
}
private static Map<Enum<?>, List<BaseBean>> createRelation(Class<? extends BaseBean> cls) {
return null;
Map<Enum<?>, List<BaseBean>> result = new HashMap<>();
BeanInfo beanInfo = BeanInfo.getBeanInfo(cls);
if (beanInfo == null) {
return result;
}
for (Enum<?> holder : beanInfo.getAllHolders()) {
result.put(holder, new ArrayList<>());
}
return result;
}
public static Map<Enum<?>, List<BaseBean>> get(BaseBean bean) {
@ -46,10 +61,6 @@ public class BeanRelation {
return temp;
}
public static void init() {
}
public static <T extends BaseBean> T get(BaseBean bean, Enum<?> holder) {
List<T> beans = (List<T>)get(bean).get(holder);
if (beans == null || beans.isEmpty()) {
@ -72,7 +83,13 @@ public class BeanRelation {
return (T)bean;
}
} else {
//List<BaseAPS> relaBeans =
List<BaseBean> relaBeans = list(bean, args[index]);
for (BaseBean relaBean : relaBeans) {
T temp = getImpl(relaBean, pred, args, index + 1);
if (temp != null) {
return temp;
}
}
}
return null;

@ -1,4 +1,4 @@
package cn.estsh.i3plus.pojo.aps.bean;
package cn.estsh.i3plus.pojo.aps.common;
import java.util.AbstractMap;
import java.util.ArrayList;
@ -80,7 +80,8 @@ public class DateDuration {
return this.time * 1000;
}
public String getString() {
@Override
public String toString() {
if (this.rate > PRECISION)
return this.getValue();
@ -130,7 +131,7 @@ public class DateDuration {
if (this.time >= 0)
this.time /= val;
this.rate /= val;
this.value = getString();
this.value = toString();
}
/**

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

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

@ -1,7 +1,7 @@
package cn.estsh.i3plus.pojo.aps.holders;
public enum EMaterial {
ProductRouting,
ProductRoutings,
OperInputs,
OperOutputs,
WorkInputs,

@ -1,6 +1,4 @@
package cn.estsh.i3plus.pojo.aps.holders;
public enum EResCalendar {
DayShifts,
Resources,
}

@ -1,6 +1,4 @@
package cn.estsh.i3plus.pojo.aps.holders;
public enum EResource {
OperResources,
WorkResources
}

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

@ -8,5 +8,5 @@ public enum EWork {
WorkRelationInputs,
WorkRelationOutputs,
Operation,
PlanFeedback
PlanFeedbacks
}

@ -2,6 +2,6 @@
<Class name="ExportProject">
<Relation field="Link" name="DataLink" type="MULTI_TO_ONE">
</Relation>
<Relation field="Details" name="ExportDetail" type="ONE_TO_MULTI" owner="true">
<Relation field="Details" name="ExportDetail" reverse="Project" type="ONE_TO_MULTI" owner="true">
</Relation>
</Class>

@ -2,6 +2,6 @@
<Class name="ImportProject">
<Relation field="Link" name="DataLink" type="MULTI_TO_ONE">
</Relation>
<Relation field="Details" name="ImportDetail" type="ONE_TO_MULTI" owner="true">
<Relation field="Details" name="ImportDetail" reverset="Project" type="ONE_TO_MULTI" owner="true">
</Relation>
</Class>

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Class name="Material">
<Relation field="ProductRouting" name="ProductRouting" reverse="Material" type="ONE_TO_MULTI" owner="true">
<Relation field="ProductRoutings" name="ProductRouting" reverse="Material" type="ONE_TO_MULTI" owner="true">
</Relation>
</Class>

@ -1,7 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<Class name="ResCalendar">
<Relation field="DayShifts" name="DayShift" reverse="ResCalendar" type="MULTI_TO_MULTI" owner="false">
</Relation>
<Relation field="Resources" name="Resource" type="MULTI_TO_MULTI" owner="false">
</Relation>
</Class>

@ -0,0 +1,38 @@
package cn.estsh.i3plus.pojo.mes.pcn.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.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @Description :mes
* @Reference :
* @Author : jack.jia
* @CreateDate : 2019-04-12
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="MES_CUST_PROD_LINE")
@Api("客户产线代码")
public class MesCustProdLine extends BaseBean {
@Column(name="CUST_PROD_LINE_CODE")
@ApiParam("客户产线代码")
private String custProdLineCode;
@Column(name="CUST_PROD_LINE_NAME")
@ApiParam("客户产线名称")
private String custProdLineName;
}

@ -0,0 +1,54 @@
package cn.estsh.i3plus.pojo.mes.pcn.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.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @Description :mes
* @Reference :
* @Author : crish
* @CreateDate : 2019-04-22
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="MES_CUSTOMER")
@Api("客户产线代码")
public class MesCustomer extends BaseBean {
@Column(name="CUSTOMER_CODE")
@ApiParam("客户代码")
private String customerCode;
@Column(name="CUSTOMER_NAME")
@ApiParam("客户名称")
private String customerName;
@Column(name="BRIEF_TEXT")
@ApiParam("客户简称")
private String briefText;
@Column(name="ADDRESS")
@ApiParam("客户地址")
private String address;
@Column(name="CONTACT")
@ApiParam("客户联系人")
private String contact;
@Column(name="TELEPHONE")
@ApiParam("客户电话")
private String telephone;
}

@ -0,0 +1,141 @@
package cn.estsh.i3plus.pojo.mes.pcn.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
/**
* @Description:
* @Reference:
* @Author: Crish
* @CreateDate:2019-04-16-17:36
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="MES_PLAN_ORDER")
@Api("生产主计划")
public class MesPlanOrder extends BaseBean {
@Column(name="ORDER_NO")
@ApiParam("生产计划单号")
private String orderNo;
@Column(name="PO_TYPE")
@ApiParam("计划类型")
private Integer planType;
@Column(name="PROD_CFG_CODE")
@ApiParam("产品配置代码")
private String prodCfgCode;
@Column(name="PART_NO")
@ApiParam("物料号")
private String partNo;
@Column(name="PART_NAME_RDD")
@ApiParam("物料名称")
private String partNameRdd;
@Column(name="PLAN_QTY")
@ApiParam("计划数量")
private Double planQty;
@Column(name="DECOMPOSE_QTY")
@ApiParam("分解数量")
private Double decomposeQty;
@Column(name="STATUS")
@ApiParam("状态")
private Integer status;
@Column(name="START_TIME")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiParam("计划开始时间")
private String startTime;
@Column(name="END_TIME")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiParam("计划结束时间")
private String endTime;
@Column(name="DELIVERY_DATE")
@ApiParam("交货日期")
private String deliveryDate;
@Column(name="CUST_CODE")
@ApiParam("客户代码")
private String custCode;
@Column(name="CUST_ORDER_NO")
@ApiParam("客户订单号")
private String custOrderNo;
@Column(name="SOURCE")
@ApiParam("计划来源")
private String source;
@Column(name="MEMO")
@ApiParam("备注")
private String memo;
@Column(name="WORK_CENTER_CODE")
@ApiParam("工作中心代码")
private String workCenterCode;
/********************** 冗余字段 *********************************/
@Transient
@ApiParam(value="区域")
public String areaCode;
@Transient
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiParam(value="创建日期查询用,查询结束日期",example = "2018-12-31 23:59:59")
public String startTimeStart;
@Transient
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiParam(value="创建日期查询用,查询结束日期",example = "2018-12-31 23:59:59")
public String startTimeEnd;
@Transient
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiParam(value="计划结束日期查询用,查询结束日期",example = "2018-12-31 23:59:59")
public String endTimeStart;
@Transient
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiParam(value="计划结束日期查询用,查询结束日期",example = "2018-12-31 23:59:59")
public String endTimeEnd;
public double getPlanQtyVal() {
return this.planQty == null ? 0.0d : this.planQty;
}
public double getDecomposeQtyVal() {
return this.decomposeQty == null ? 0.0d : this.decomposeQty;
}
public int getStatusVal() {
return this.status == null ? 0 : this.status;
}
public int getPlanTypeVal() {
return this.planType == null ? 0 : this.planType;
}
}

@ -0,0 +1,42 @@
package cn.estsh.i3plus.pojo.mes.pcn.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.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @Description :
* @Reference :
* @Author : jack.jia
* @CreateDate : 2019-04-02
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="MES_PROD_CFG")
@Api("产品配置")
public class MesProdCfg extends BaseBean {
@Column(name="PROD_CFG_CODE")
@ApiParam("产品配置代码")
private String prodCfgCode;
@Column(name="PROD_CFG_NAME")
@ApiParam("产品配置名称")
private String prodCfgName;
@Column(name="PROD_CFG_Type_CODE")
@ApiParam("产品配置类型代码")
private String prodCfgTypeCode;
}

@ -1,6 +1,7 @@
package cn.estsh.i3plus.pojo.mes.pcn.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import cn.estsh.i3plus.pojo.mes.pcn.model.MesWorkOrderButtonModel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -11,6 +12,7 @@ import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
/**
* @Description:
@ -35,6 +37,10 @@ public class MesWorkOrder extends BaseBean {
@ApiParam("物料号")
private String partNo;
@Column(name="PART_NAME_RDD")
@ApiParam("物料名称")
private String partNameRdd;
@Column(name="PROD_CFG_CODE")
@ApiParam("产品配置代码")
private String prodCfgCode;
@ -79,6 +85,10 @@ public class MesWorkOrder extends BaseBean {
@ApiParam("工作中心代码")
private String workCenterCode;
@Column(name="AREA_CODE")
@ApiParam("区域代码")
private String areaCode;
@Column(name="WORK_CELL_CODE")
@ApiParam("工作单元代码")
private String workCellCode;
@ -127,6 +137,56 @@ public class MesWorkOrder extends BaseBean {
@ApiParam("客户订单号")
private String custOrderNo;
/********************** 冗余字段 *********************************/
@Transient
@ApiParam(value="工作中心名称")
public String workCenterName;
@Transient
@ApiParam(value="工作单元名称")
public String workCellName;
@Transient
@ApiParam(value="客户产线名称")
public String custProdLineName;
@Transient
@ApiParam(value="班次名称")
public String shiftName;
@Transient
@ApiParam(value="班组名称")
public String shiftGroupName;
@Transient
@ApiParam(value="产品配置名称")
public String prodCfgName;
@Transient
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiParam(value="计划开始日期查询用,查询开始日期",example = "2018-12-31 23:59:59")
public String startTimeStart;
@Transient
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiParam(value="计划开始日期查询用,查询截至日期",example = "2018-12-31 23:59:59")
public String startTimeEnd;
@Transient
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiParam(value="计划结束日期查询用,查询结束日期起始",example = "2018-12-31 23:59:59")
public String endTimeStart;
@Transient
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiParam(value="计划结束日期查询用,查询结束日期截至",example = "2018-12-31 23:59:59")
public String endTimeEnd;
@Transient
@ApiParam("mes生产工单页面按钮控制")
private MesWorkOrderButtonModel workOrderButtonModel;
public double getQtyVal() {
return this.qty == null ? 0.0d : this.qty;
}

@ -0,0 +1,216 @@
package cn.estsh.i3plus.pojo.mes.pcn.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.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
/**
* @Description:
* @Reference:
* @Author: wangjie
* @CreateDate:2019-09-19-17:36
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="MES_WORK_ORDER_LOG")
@Api("生产工单日志")
public class MesWorkOrderLog extends BaseBean {
@Column(name="ORDER_NO")
@ApiParam("工单号")
private String orderNo;
@Column(name="PART_NO")
@ApiParam("物料号")
private String partNo;
@Column(name="PART_NAME_RDD")
@ApiParam("物料名称")
private String partNameRdd;
@Column(name="PROD_CFG_CODE")
@ApiParam("产品配置代码")
private String prodCfgCode;
@Column(name="QTY")
@ApiParam("数量")
private Double qty;
@Column(name="COMPLETE_QTY")
@ApiParam("完成数量")
private Double completeQty;
@Column(name="REPAIR_QTY")
@ApiParam("返修数量")
private Double repairQty;
@Column(name="SCRAP_QTY")
@ApiParam("报废数量")
private Double scrapQty;
@Column(name="SEQ")
@ApiParam("工单序号")
private Double seq;
@Column(name="WO_STATUS")
@ApiParam("工单状态")
private Integer workOrderStatus;
@Column(name="WO_TYPE")
@ApiParam("工单类型")
private Integer workOrderType;
@Column(name="NEXT_ORDER")
@ApiParam("下一工单")
private String nextOrder;
@Column(name="PLAN_ORDER_NO")
@ApiParam("生产计划单号")
private String planOrderNo;
@Column(name="WORK_CENTER_CODE")
@ApiParam("工作中心代码")
private String workCenterCode;
@Column(name="AREA_CODE")
@ApiParam("区域代码")
private String areaCode;
@Column(name="WORK_CELL_CODE")
@ApiParam("工作单元代码")
private String workCellCode;
@Column(name="SCHEDULE_DATE")
@ApiParam("排产日期")
private String scheduleDate;
@Column(name="CUST_PROD_LINE_CODE")
@ApiParam("客户产线代码")
private String custProdLineCode;
@Column(name="SHIFT_CODE")
@ApiParam("班次")
private String shiftCode;
@Column(name="START_TIME")
@ApiParam("开始时间")
private String startTime;
@Column(name="END_TIME")
@ApiParam("结束时间")
private String endTime;
@Column(name="WO_SOURCE")
@ApiParam("工单来源")
private String workOrderSource;
@Column(name="MEMO")
@ApiParam("备注")
private String memo;
@Column(name="SHIFT_GROUP")
@ApiParam("班组")
private String shiftGroup;
@Column(name="APPROVAL_STATUS")
@ApiParam("审批状态")
private Integer approvalStatus;
@Column(name="CUST_CODE")
@ApiParam("客户代码")
private String custCode;
@Column(name="CUST_ORDER_NO")
@ApiParam("客户订单号")
private String custOrderNo;
/********************** 冗余字段 *********************************/
@Transient
@ApiParam(value="工作中心名称")
public String workCenterName;
@Transient
@ApiParam(value="工作单元名称")
public String workCellName;
@Transient
@ApiParam(value="客户产线名称")
public String custProdLineName;
@Transient
@ApiParam(value="班次名称")
public String shiftName;
@Transient
@ApiParam(value="班组名称")
public String shiftGroupName;
@Transient
@ApiParam(value="产品配置名称")
public String prodCfgName;
@Transient
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiParam(value="计划开始日期查询用,查询开始日期",example = "2018-12-31 23:59:59")
public String startTimeStart;
@Transient
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiParam(value="计划开始日期查询用,查询截至日期",example = "2018-12-31 23:59:59")
public String startTimeEnd;
@Transient
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiParam(value="计划结束日期查询用,查询结束日期起始",example = "2018-12-31 23:59:59")
public String endTimeStart;
@Transient
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiParam(value="计划结束日期查询用,查询结束日期截至",example = "2018-12-31 23:59:59")
public String endTimeEnd;
public double getQtyVal() {
return this.qty == null ? 0.0d : this.qty;
}
public double getCompleteQtyVal() {
return this.completeQty == null ? 0.0d : this.completeQty;
}
public double getRepairQtyVal() {
return this.repairQty == null ? 0.0d : this.repairQty;
}
public double getScrapQtyVal() {
return this.scrapQty == null ? 0.0d : this.scrapQty;
}
public double getSeqVal() {
return this.seq == null ? 0.0d : this.seq;
}
public int getWorkOrderStatusVal() {
return this.workOrderStatus == null ? 0 : this.workOrderStatus;
}
public int getWorkOrderTypeVal() {
return this.workOrderType == null ? 0 : this.workOrderType;
}
public int getApprovalStatusVal() {
return this.approvalStatus == null ? 0 : this.approvalStatus;
}
}

@ -0,0 +1,69 @@
package cn.estsh.i3plus.pojo.mes.pcn.model;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Author: Wynne.Lu
* @CreateDate: 2019/8/23 11:42 AM
* @Description:
**/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Api("生成条码模型")
public class GenSerialNoModel {
@ApiParam("规则代码")
private String ruleCode;
@ApiParam("规则描述")
private String ruleDesc;
@ApiParam("物料号")
private String partNo;
@ApiParam("客户物料号")
private String custPartNo;
@ApiParam("客户代码")
private String custCode;
@ApiParam("产地")
private String prodLocation;
@ApiParam("前缀")
private String prefix;
@ApiParam("编码规则")
private String numberRule;
@ApiParam("序号长度")
private Integer serialnoLength;
@ApiParam("增量")
private Integer serialnoIncrement;
@ApiParam("最大值后循环")
private Integer isCycle;
@ApiParam("当前编号前缀")
private String currentNumberPrefix;
@ApiParam("当前序号")
private Integer currentSerialno;
@ApiParam("当前编号")
private String currentNumber;
public GenSerialNoModel(String ruleCode){
this.ruleCode=ruleCode;
}
}

@ -0,0 +1,39 @@
package cn.estsh.i3plus.pojo.mes.pcn.model;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Author: wangjie
* @CreateDate: 2019/8/21 9:19 AM
* @Description:
**/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Api("mes生产工单页面按钮控制model")
public class MesWorkOrderButtonModel implements Serializable {
@ApiParam("修改按钮")
private boolean updateButton;
@ApiParam("启动按钮")
private boolean startUpButton;
@ApiParam("暂停按钮")
private boolean suspendButton;
@ApiParam("取消按钮")
private boolean revokeButton;
@ApiParam("关闭按钮")
private boolean closeButton;
}

@ -0,0 +1,107 @@
package cn.estsh.i3plus.pojo.mes.pcn.model;
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesPart;
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesQueueOrder;
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesWorkOrder;
import java.util.List;
/**
* @Description:
* @Reference:
* @Author: Crish
* @CreateDate:2019-04-29-11:58
* @Modify:
**/
public class RequestModel {
private List<MesWorkOrder> workOrderList; // 工单数据集
private List<MesPart> partList; // 物料数据集
private List<MesQueueOrder> queueOrderList; // 生产队列数据集
private Double currentSeq; // 生产队列中的当前序列号
private Double nextSeq; // 生产队列中的下一个序列号
private Integer srcStatus; // 源状态
private Integer destStatus; // 目的状态
public RequestModel(List<MesQueueOrder> queueOrderList, Double currentSeq, Double nextSeq) {
this.queueOrderList = queueOrderList;
this.currentSeq = currentSeq;
this.nextSeq = nextSeq;
}
public RequestModel(List<MesQueueOrder> queueOrderList, Integer srcStatus, Integer destStatus) {
this.queueOrderList = queueOrderList;
this.srcStatus = srcStatus;
this.destStatus = destStatus;
}
public RequestModel(List<MesWorkOrder> workOrderList, List<MesPart> partList) {
this.workOrderList = workOrderList;
this.partList = partList;
}
public List<MesWorkOrder> getWorkOrderList() {
return workOrderList;
}
public RequestModel() {
}
public void setWorkOrderList(List<MesWorkOrder> workOrderList) {
this.workOrderList = workOrderList;
}
public List<MesPart> getPartList() {
return partList;
}
public void setPartList(List<MesPart> partList) {
this.partList = partList;
}
public List<MesQueueOrder> getQueueOrderList() {
return queueOrderList;
}
public void setQueueOrderList(List<MesQueueOrder> queueOrderList) {
this.queueOrderList = queueOrderList;
}
public Double getCurrentSeq() {
return currentSeq == null ? 0.0d : currentSeq;
}
public void setCurrentSeq(Double currentSeq) {
this.currentSeq = currentSeq;
}
public Double getNextSeq() {
return nextSeq == null ? 0.0d : nextSeq;
}
public void setNextSeq(Double nextSeq) {
this.nextSeq = nextSeq;
}
public Integer getSrcStatus() {
return srcStatus == null ? 0 : srcStatus;
}
public void setSrcStatus(Integer srcStatus) {
this.srcStatus = srcStatus;
}
public Integer getDestStatus() {
return destStatus == null ? 0 : destStatus;
}
public void setDestStatus(Integer destStatus) {
this.destStatus = destStatus;
}
}

@ -0,0 +1,16 @@
package cn.estsh.i3plus.pojo.mes.pcn.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesCustProdLine;
import org.springframework.stereotype.Repository;
/**
* @Description:
* @Reference:
* @Author: Crish
* @CreateDate:2019-04-19-11:15
* @Modify:
**/
@Repository
public interface MesCustProdLineRepository extends BaseRepository<MesCustProdLine, Long> {
}

@ -0,0 +1,17 @@
package cn.estsh.i3plus.pojo.mes.pcn.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesCustomer;
import org.springframework.stereotype.Repository;
/**
* @Description:
* @Reference:
* @Author: Crish
* @CreateDate:2019-04-22-16:12
* @Modify:
**/
@Repository
public interface MesCustomerRepository extends BaseRepository<MesCustomer, Long> {
}

@ -0,0 +1,15 @@
package cn.estsh.i3plus.pojo.mes.pcn.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesNumberRule;
import org.springframework.stereotype.Repository;
/**
* @Author: Wynne.Lu
* @CreateDate: 2019/8/23 1:22 PM
* @Description:
**/
@Repository
public interface MesNumberRuleRepository extends BaseRepository<MesNumberRule, Long> {
}

@ -0,0 +1,16 @@
package cn.estsh.i3plus.pojo.mes.pcn.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesNumberSerialno;
import org.springframework.stereotype.Repository;
/**
* @Author: Wynne.Lu
* @CreateDate: 2019/8/23 1:23 PM
* @Description:
**/
@Repository
public interface MesNumberSerialnoRepository extends BaseRepository<MesNumberSerialno, Long> {
}

@ -0,0 +1,16 @@
package cn.estsh.i3plus.pojo.mes.pcn.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesPlanOrder;
import org.springframework.stereotype.Repository;
/**
* @Description:
* @Reference:
* @Author: Crish
* @CreateDate:2019-04-17-17:08
* @Modify:
**/
@Repository
public interface MesPlanOrderRepository extends BaseRepository<MesPlanOrder, Long> {
}

@ -0,0 +1,16 @@
package cn.estsh.i3plus.pojo.mes.pcn.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesProdCfg;
import org.springframework.stereotype.Repository;
/**
* @Description :
* @Reference :
* @Author : jack.jia
* @CreateDate : 2019-04-02
* @Modify:
**/
@Repository
public interface MesProdCfgRepository extends BaseRepository<MesProdCfg, Long> {
}

@ -0,0 +1,16 @@
package cn.estsh.i3plus.pojo.mes.pcn.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesShiftGroup;
import org.springframework.stereotype.Repository;
/**
* @Description:
* @Reference:
* @Author: wangjie
* @CreateDate:2019-09-18-17:13
* @Modify:
**/
@Repository
public interface MesShiftGroupRepository extends BaseRepository<MesShiftGroup, Long> {
}

@ -0,0 +1,16 @@
package cn.estsh.i3plus.pojo.mes.pcn.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesWorkOrderLog;
import org.springframework.stereotype.Repository;
/**
* @Description:
* @Reference:
* @Author: wangjie
* @CreateDate:2019-09-19-17:13
* @Modify:
**/
@Repository
public interface MesWorkOrderLogRepository extends BaseRepository<MesWorkOrderLog, Long> {
}

@ -96,5 +96,61 @@ public class MesHqlPack {
return packBean;
}
/**
*
*
* @param mesWorkOrder
* @return
*/
public static DdlPackBean getWorkOrderCondition(MesWorkOrder mesWorkOrder, String organizeCode) {
DdlPackBean packBean = getAllBaseData(organizeCode);
if (StringUtils.isNotEmpty(mesWorkOrder.getOrderNo())) {
DdlPreparedPack.getStringLikerPack(mesWorkOrder.getOrderNo(), "orderNo", packBean);
}
if (StringUtils.isNotEmpty(mesWorkOrder.getPartNo())) {
DdlPreparedPack.getStringLikerPack(mesWorkOrder.getPartNo(), "partNo", packBean);
}
if (StringUtils.isNotEmpty(mesWorkOrder.getWorkOrderStatus() + "") && mesWorkOrder.getWorkOrderStatusVal() != 0) {
DdlPreparedPack.getNumEqualPack(mesWorkOrder.getWorkOrderStatus(), "workOrderStatus", packBean);
}
if (StringUtils.isNotEmpty(mesWorkOrder.getWorkCenterCode())) {
DdlPreparedPack.getStringEqualPack(mesWorkOrder.getWorkCenterCode(), "workCenterCode", packBean);
}
if (mesWorkOrder.getApprovalStatus() != null) {
DdlPreparedPack.getNumEqualPack(mesWorkOrder.getApprovalStatus(), "approvalStatus", packBean);
}
if (StringUtils.isNotEmpty(mesWorkOrder.getWorkOrderType() + "") && mesWorkOrder.getWorkOrderTypeVal() != 0) {
DdlPreparedPack.getNumEqualPack(mesWorkOrder.getWorkOrderType(), "workOrderType", packBean);
}
if (StringUtils.isNotEmpty(mesWorkOrder.getCustOrderNo())) {
DdlPreparedPack.getStringLikerPack(mesWorkOrder.getCustOrderNo(), "custOrderNo", packBean);
}
if (StringUtils.isNotEmpty(mesWorkOrder.getPlanOrderNo())) {
DdlPreparedPack.getStringLikerPack(mesWorkOrder.getPlanOrderNo(), "planOrderNo", packBean);
}
if (StringUtils.isNotEmpty(mesWorkOrder.getCreateUser())) {
DdlPreparedPack.getStringLikerPack(mesWorkOrder.getCreateUser(), "createUser", packBean);
}
if (mesWorkOrder.getIsValid() != null) {
DdlPreparedPack.getNumEqualPack(mesWorkOrder.getIsValid(), "isValid", packBean);
}
// 时间段查询
DdlPreparedPack.timeBuilder(
mesWorkOrder.getStartTimeStart(),
mesWorkOrder.getStartTimeEnd(),
"startTime", packBean, true);
DdlPreparedPack.timeBuilder(
mesWorkOrder.getEndTimeStart(),
mesWorkOrder.getEndTimeEnd(),
"endTime", packBean, true);
DdlPreparedPack.timeBuilder(
mesWorkOrder.getCreateDateTimeStart(),
mesWorkOrder.getCreateDateTimeEnd(),
"createDatetime", packBean, true);
DdlPreparedPack.getOrderDefault(mesWorkOrder);
DdlPreparedPack.getOrderByPack(new Object[]{"2"}, new String[]{mesWorkOrder.getOrderByParam()}, packBean);
return packBean;
}
}

@ -183,11 +183,6 @@ public class MesWorkOrderLog extends BaseBean {
@ApiParam(value="计划结束日期查询用,查询结束日期截至",example = "2018-12-31 23:59:59")
public String endTimeEnd;
@Transient
@ApiParam("mes生产工单页面按钮控制")
private MesWorkOrderButtonModel workOrderButtonModel;
public double getQtyVal() {
return this.qty == null ? 0.0d : this.qty;
}

@ -2,7 +2,6 @@ package cn.estsh.i3plus.pojo.model.wms;
import cn.estsh.i3plus.pojo.base.enumutil.WmsEnumUtil;
import io.swagger.annotations.ApiParam;
import io.swagger.models.auth.In;
import lombok.Data;
import java.io.Serializable;
@ -39,15 +38,12 @@ public class WmsMessageStyleModel implements Serializable {
public WmsMessageStyleModel() {
}
public WmsMessageStyleModel(String message, Integer selectQty) {
this.message = message;
if(selectQty==1){
this.wsStatus=10;
}
if(selectQty==2){
this.wsStatus=20;
}
this.wsStatus = selectQty;
}
public WmsMessageStyleModel(String message) {
this.message = message;
}

Loading…
Cancel
Save