yun-zuoyi
wei.peng 6 years ago
commit 4e303413ff

@ -260,6 +260,10 @@ public class AndonManageQueue extends BaseBean {
private List<Object> statusList;
@Transient
@ApiParam(value = "查询条件ANDON状态")
private List<Object> typeList;
@Transient
@ApiParam(value = "比例", example = "0")
private Double proportion;

@ -271,11 +271,13 @@ public class AndonHqlPack {
DdlPreparedPack.getStringEqualPack(andonManageQueue.getWorkCellCode(), "workCellCode", result);
DdlPreparedPack.getStringEqualPack(andonManageQueue.getWorkCenterCode(), "workCenterCode", result);
DdlPreparedPack.getStringEqualPack(andonManageQueue.getEquipmentCode(), "equipmentCode", result);
DdlPreparedPack.getStringEqualPack(andonManageQueue.getAlarmCode(), "alarmCode", result);
DdlPreparedPack.getStringEqualPack(andonManageQueue.getActionCode(), "actionCode", result);
DdlPreparedPack.getStringEqualPack(andonManageQueue.getAndonOrderNo(), "andonOrderNo", result);
DdlPreparedPack.getStringEqualPack(andonManageQueue.getShiftCode(), "shiftCode", result);
DdlPreparedPack.getInPackList(andonManageQueue.getStatusList(), "statusCode", result); // 只有安灯任务管理特殊用途
DdlPreparedPack.getInPackArray(obj, "statusCode", result);
DdlPreparedPack.getInPackList(andonManageQueue.getTypeList(), "alarmCode", result); // 只有安灯任务管理特殊用途
DdlPreparedPack.getStringEqualPack(andonManageQueue.getAlarmCode(), "alarmCode", result);
if(StringUtils.isNotBlank(andonManageQueue.getCallTimeStart()) || StringUtils.isNotBlank(andonManageQueue.getCallTimeEnd())){
DdlPreparedPack.timeBuilder(andonManageQueue.getCallTimeStart(), andonManageQueue.getCallTimeEnd(), "callTime", result, true);
@ -285,7 +287,8 @@ public class AndonHqlPack {
// 根据优先级倒序,序号升序排序
// DdlPreparedPack.getOrderByPack(new Object[]{2, 1},
// new String[]{"priorityLevel", "seq"}, result);
result.setOrderByStr(andonManageQueue.orderBy());
result.setOrderByStr(andonManageQueue.orderBy());
return result;
}

@ -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,6 +1,8 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.aps.common.BaseAPS;
import cn.estsh.i3plus.pojo.aps.common.BaseCode;
import cn.estsh.i3plus.pojo.aps.common.BeanRelation;
import cn.estsh.i3plus.pojo.aps.holders.EBaseOrder;
import io.swagger.annotations.Api;
@ -20,7 +22,7 @@ import java.util.List;
**/
@Data
@Api("订单基类")
public class BaseOrder extends BaseAPS {
public class BaseOrder extends BaseCode {
@Column(name="COUNT")
@ApiParam(value ="数量")
private Double count;
@ -53,7 +55,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() {

@ -15,6 +15,7 @@ import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.lang.reflect.Method;
import java.sql.JDBCType;
/**
* @Description :
@ -71,6 +72,14 @@ public class FieldInfo extends BaseCode {
@ApiParam(value ="位置")
private String position;
@Column(name="MAIN_KEY")
@ApiParam(value ="主键标识")
private Boolean mainKey;
@Column(name="JDBC_TYPE")
@ApiParam(value ="数据库类型")
private JDBCType jdbcType;
@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,5 +1,7 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.common.BeanRelation;
import cn.estsh.i3plus.pojo.aps.holders.EBaseOrder;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -36,4 +38,7 @@ public class Inventory extends BaseOrder {
@ApiParam(value ="多余量")
private Double excessCount;
public Work getWork() {
return BeanRelation.get(this, EBaseOrder.Works);
}
}

@ -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);
}
}

@ -1,5 +1,7 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.common.BeanRelation;
import cn.estsh.i3plus.pojo.aps.holders.EBaseOrder;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -43,4 +45,8 @@ public class PurchaseOrder extends BaseOrder {
@Column(name="EXCESS_COUNT")
@ApiParam(value ="多余量")
private Double excessCount;
public Work getWork() {
return BeanRelation.get(this, EBaseOrder.Works);
}
}

@ -1,5 +1,7 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.common.BeanRelation;
import cn.estsh.i3plus.pojo.aps.holders.EBaseOrder;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -40,4 +42,8 @@ public class SalesOrder extends BaseOrder {
@Column(name="CALC_LEAD_TIME")
@ApiParam(value ="提前期计算值")
private String calcLeadTime;
public Work getWork() {
return BeanRelation.get(this, EBaseOrder.Works);
}
}

@ -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);
}
}

@ -0,0 +1,270 @@
package cn.estsh.i3plus.pojo.aps.common;
import cn.estsh.i3plus.pojo.aps.enums.FIELD_TYPE;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import java.util.*;
public class BeanInfo {
private Class<? extends BaseBean> cls;
private BeanInfo superBeanInfo;
private List<BeanInfo> childsBeanInfos = new ArrayList<>();
private Map<Enum<?>, RelationInfo> relations = new HashMap<>();
public BeanInfo(Class<? extends BaseBean> cls) {
this.cls = cls;
}
public void initHolder(Class<Enum<? extends Enum<?>>> holderCls) {
Enum<? extends Enum<?>>[] ens = holderCls.getEnumConstants();
for (Enum<? extends Enum<?>> en : ens) {
RelationInfo info = new RelationInfo();
info.setHolder(en);
info.setBeanInfo(this);
relations.put(en, info);
}
}
public BeanInfo getSuperBeanInfo() { return superBeanInfo; }
public boolean validHolder(Enum<?> holder) {
return this.relations.get(holder) != null;
}
public Enum<?> getHolder(String name) {
for (Enum<?> holder : relations.keySet()) {
if (holder.name().equalsIgnoreCase(name)) {
return holder;
}
}
if (superBeanInfo != null) {
return superBeanInfo.getHolder(name);
}
return null;
}
public Enum<?> getReverseHolder(Enum<?> holder) {
RelationInfo relaInfo = getRelationInfo(holder);
if (relaInfo != null) {
return relaInfo.getReverseHolder();
}
return null;
}
public Enum<?> getReverseHolder(String name) {
RelationInfo relaInfo = getRelationInfo(name);
if (relaInfo != null) {
return relaInfo.getReverseHolder();
}
return null;
}
public RelationInfo getRelationInfo(Enum<?> holder) {
if (validHolder(holder)) {
return relations.get(holder);
}
if (superBeanInfo != null) {
return superBeanInfo.getRelationInfo(holder);
}
return null;
}
public RelationInfo getRelationInfo(String name) {
Enum<?> holder = getHolder(name);
if (holder != null) {
return getRelationInfo(holder);
}
return null;
}
public void addRelationInfo(Enum<?> holder, RelationInfo info) {
this.relations.put(holder, info);
}
public <T extends BaseBean> Class<T> getBeanClass() {
return (Class<T>)cls;
}
public BeanInfo getRelationBeanInfo(Enum<?> holder) {
RelationInfo relaInfo = getRelationInfo(holder);
if (relaInfo != null) {
return relaInfo.getBeanInfo();
}
return null;
}
public BeanInfo getRelationBeanInfo(String name) {
RelationInfo relaInfo = getRelationInfo(name);
if (relaInfo != null) {
return relaInfo.getBeanInfo();
}
return null;
}
public RELATION_TYPE getRelationType(Enum<?> holder) {
RelationInfo relaInfo = getRelationInfo(holder);
if (relaInfo != null) {
return relaInfo.getType();
}
return RELATION_TYPE.INVALID;
}
public RELATION_TYPE getRelationType(String name) {
RelationInfo relaInfo = getRelationInfo(name);
if (relaInfo != null) {
return relaInfo.getType();
}
return RELATION_TYPE.INVALID;
}
public List<Enum<?>> getAllHolders() {
List<Enum<?>> holders = new ArrayList<>();
for (Map.Entry<Enum<?>, RelationInfo> entry : relations.entrySet()) {
holders.add(entry.getKey());
}
return holders;
}
public List<Enum<?>> getOwnerHolders() {
List<Enum<?>> owners = new ArrayList<>();
for (Map.Entry<Enum<?>, RelationInfo> entry : relations.entrySet()) {
if (entry.getValue().isOwner()) {
owners.add(entry.getKey());
}
}
return owners;
}
public List<Enum<?>> getNormalSigns() {
List<Enum<?>> holders = new ArrayList<>();
for (Map.Entry<Enum<?>, RelationInfo> entry : relations.entrySet()) {
if (!entry.getValue().isOwner()) {
holders.add(entry.getKey());
}
}
return holders;
}
private static Map<Class<? extends BaseBean>, BeanInfo> beanInfos = new HashMap<>();
private static Map<String, BeanInfo> nameMapBeanInfos = new HashMap<>();
static {
BeanInfo beanInfo = new BeanInfo(BaseBean.class);
beanInfos.put(BaseBean.class, beanInfo);
nameMapBeanInfos.put(BaseBean.class.getSimpleName(), beanInfo);
}
public static void register(Class<? extends BaseBean> cls) {
if (beanInfos.containsKey(cls)) {
return;
}
BeanInfo beanInfo = new BeanInfo(cls);
beanInfos.put(cls, beanInfo);
nameMapBeanInfos.put(cls.getSimpleName(), beanInfo);
register((Class<? extends BaseBean>)cls.getSuperclass());
}
public static void init() {
for (Map.Entry<Class<? extends BaseBean>, BeanInfo> entry : beanInfos.entrySet()) {
Class<? extends BaseBean> superClass = (Class<? extends BaseBean>)entry.getKey().getSuperclass();
BeanInfo superBeanInfo = beanInfos.get(superClass);
if (superBeanInfo != null) {
entry.getValue().superBeanInfo = superBeanInfo;
superBeanInfo.childsBeanInfos.add(entry.getValue());
}
}
BeanRelationUtil.initData("cn.estsh.i3plus.pojo.aps.holders");
BeanRelationUtil.loadConfig("relations");
}
public static Set<Class<? extends BaseBean>> getBeanClasses() {
return beanInfos.keySet();
}
public static BeanInfo getBeanInfo(Class<? extends BaseBean> cls) {
BeanInfo info = beanInfos.get(cls);
return info;
}
public static BeanInfo getBeanInfo(String name) {
BeanInfo info = nameMapBeanInfos.get(name);
return info;
}
public static Class<? extends BaseBean> getSuperClass(Class<? extends BaseBean> cls) {
BeanInfo superBeanInfo = getBeanInfo(cls).superBeanInfo;
if (superBeanInfo != null) {
return superBeanInfo.getBeanClass();
}
return null;
}
public static FIELD_TYPE getFieldType(Class<?> cls) {
FIELD_TYPE type = null;
if (cls == Boolean.class || cls == boolean.class) {
type = FIELD_TYPE.BOOLEAN;
} else if (cls == Character.class) {
type = FIELD_TYPE.CHAR;
} else if (cls == Short.class || cls == short.class) {
type = FIELD_TYPE.SHORT;
} else if (cls == Integer.class || cls == int.class) {
type = FIELD_TYPE.INTEGER;
} else if (cls == Long.class || cls == long.class) {
type = FIELD_TYPE.LONG;
} else if (cls == Double.class || cls == Float.class ||
cls == double.class || cls == float.class) {
type = FIELD_TYPE.DOUBLE;
} else if (cls == String.class) {
type = FIELD_TYPE.STRING;
} else if(cls == Date.class || cls == java.sql.Date.class) {
type = FIELD_TYPE.DATE_TIME;
} else if (cls == DateDuration.class) {
type = FIELD_TYPE.DURATION;
} else if (Enum.class.isAssignableFrom(cls)) {
type = FIELD_TYPE.ENUM;
} else if (BaseBean.class.isAssignableFrom(cls)) {
type = FIELD_TYPE.OBJECT;
}
return type;
}
public static Class<?> getFieldClass(FIELD_TYPE type) {
Class<?> cls = null;
switch (type) {
case BOOLEAN:
cls = Boolean.class;
break;
case CHAR:
cls = Character.class;
break;
case SHORT:
cls = Short.class;
break;
case INTEGER:
cls = Integer.class;
break;
case LONG:
cls = Long.class;
break;
case DOUBLE:
cls = Double.class;
break;
case DATE:
case TIME:
case DATE_TIME:
cls = Date.class;
break;
case STRING:
cls = String.class;
break;
default:
break;
}
return cls;
}
}

@ -0,0 +1,258 @@
package cn.estsh.i3plus.pojo.aps.common;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
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;
BeanRelation relation = relations.get(userId);
if (relation == null) {
synchronized (BeanRelation.class) {
relation = relations.get(userId);
if (relation == null) {
relation = new BeanRelation();
relation.init();
relations.put(userId, relation);
}
}
}
return relation;
}
private static Map<Enum<?>, List<BaseBean>> createRelation(Class<? extends BaseBean> cls) {
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) {
Map<Enum<?>, List<BaseBean>> temp = get().caches.get(bean.getClass()).get(bean.getId());
if (temp == null) {
synchronized (bean.getClass()) {
if (temp == null) {
temp = createRelation(bean.getClass());
get().caches.get(bean.getClass()).put(bean.getId(), temp);
}
}
}
return temp;
}
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()) {
return null;
}
return beans.get(0);
}
public static <T extends BaseBean> T get(BaseBean bean, Enum<?> holder, Enum<?>... args) {
return get(bean, null, holder, args);
}
public static <T extends BaseBean> T get(BaseBean bean, Predicate<T> pred, Enum<?> holder, Enum<?>... args) {
return null;
}
private static <T extends BaseBean> T getImpl(BaseBean bean, Predicate<T> pred, Enum<?>[] args, int index) {
if (index >= args.length) {
if (pred == null || pred.test((T)bean)) {
return (T)bean;
}
} else {
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;
}
public static <T extends BaseBean> List<T> list(BaseBean bean, Enum<?> holder) {
List<T> beans = (List<T>)get(bean).get(holder);
if (beans == null) {
return new ArrayList<>();
}
return beans;
}
public static <T extends BaseBean> List<T> list(BaseBean bean, Enum<?> holder, Enum<?>... args) {
return list(bean, null, holder, args);
}
public static <T extends BaseBean> List<T> list(BaseBean bean, Predicate<T> pred, Enum<?> holder, Enum<?>... args) {
List<T> result = new ArrayList<>();
List<BaseBean> nextBeans = list(bean, holder);
for (BaseBean nextBean : nextBeans) {
listImpl(result, nextBean, pred, args, 0);
}
return result;
}
private static <T extends BaseBean> void listImpl(List<T> result, BaseBean bean, Predicate<T> pred, Enum<?>[] holders, int index) {
if (index >= holders.length) {
if (pred == null || pred.test((T)bean)) {
result.add((T)bean);
}
} else {
List<BaseBean> nextBeans = list(bean, holders[index]);
for (BaseBean nextBean : nextBeans) {
listImpl(result, nextBean, pred, holders, index + 1);
}
}
}
/**
*
*
* @param bean
* @param holder
* @param relaBean
*/
public static void set(BaseBean bean, Enum<?> holder, BaseBean relaBean) {
if (bean == null) {
return;
}
if (relaBean == null) {
remove(bean, holder);
} else {
BeanInfo beanInfo = BeanInfo.getBeanInfo(bean.getClass());
final Enum<?> reverseHolder = beanInfo.getReverseHolder(holder);
switch (beanInfo.getRelationType(holder)) {
case MULTI_TO_MULTI:
break;
case MULTI_TO_ONE:
remove(bean, holder);
break;
case INVALID:
break;
case ONE_TO_MULTI:
remove(relaBean, reverseHolder);
break;
case ONE_TO_ONE:
remove(bean, holder);
remove(relaBean, reverseHolder);
break;
default:
break;
}
setImpl(bean, holder, relaBean, reverseHolder);
}
}
/**
*
*
* @param bean
* @param holder
* @param relaBean
* @param reverseHolder
*/
private static void setImpl(BaseBean bean, Enum<?> holder, BaseBean relaBean, Enum<?> reverseHolder) {
get(bean).get(holder).add(relaBean);
if (reverseHolder != null) {
get(relaBean).get(reverseHolder).add(bean);
}
}
/**
*
*
* @param bean
* @param holder
*/
private static void remove(BaseBean bean, Enum<?> holder) {
if (holder == null) {
return;
}
BeanInfo beanInfo = BeanInfo.getBeanInfo(bean.getClass());
final Enum<?> reverseHolder = beanInfo.getReverseHolder(holder);
if (reverseHolder != null) {
for (BaseBean relaBean : get(bean).get(holder)) {
if (relaBean == null) {
continue;
}
get(relaBean).get(reverseHolder).remove(bean);
}
}
get(bean).get(holder).clear();
}
/**
*
*
* @param bean
* @param holder
* @param relaBean
*/
private static void remove(BaseBean bean, Enum<?> holder, BaseBean relaBean) {
if (bean == null) {
return;
}
BeanInfo beanInfo = BeanInfo.getBeanInfo(bean.getClass());
final Enum<?> reverseHolder = beanInfo.getReverseHolder(holder);
if (reverseHolder != null) {
get(relaBean).get(reverseHolder).remove(bean);
}
get(bean).get(holder).remove(relaBean);
}
/**
*
*
* @param bean
*/
public static void delete(BaseBean bean) {
if (bean == null) {
return;
}
BeanInfo beanInfo = BeanInfo.getBeanInfo(bean.getClass());
List<Enum<?>> ownerSigns = beanInfo.getOwnerHolders();
for (Enum<?> holder : ownerSigns) {
List<BaseBean> relaBeans = new ArrayList<>(list(bean, holder));
for (BaseBean relaBean : relaBeans) {
//MemoryManager.delete(relaBean);
}
}
List<Enum<?>> normalSigns = beanInfo.getNormalSigns();
for (Enum<?> holder : normalSigns) {
Enum<?> reverseHolder = beanInfo.getReverseHolder(holder);
List<BaseBean> relaBeans = new ArrayList<>(list(bean, holder));
for (BaseBean relaBean : relaBeans) {
if (reverseHolder != null) {
remove(relaBean, reverseHolder, bean);
}
}
}
}
}

@ -0,0 +1,320 @@
package cn.estsh.i3plus.pojo.aps.common;
import org.xml.sax.Attributes;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import java.io.File;
import java.io.FileFilter;
import java.io.IOException;
import java.io.InputStream;
import java.net.JarURLConnection;
import java.net.URL;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
public class BeanRelationUtil {
static class XMLReader extends DefaultHandler {
private BeanInfo firstInfo = null;
private Enum<?> firstHolder = null;
private BeanInfo secondInfo = null;
private Enum<?> secondHolder = null;
private RELATION_TYPE type = RELATION_TYPE.INVALID;
private boolean owner = false;
public void startElement(String uri, String localName, String nodeName, Attributes attributes) throws SAXException {
if (nodeName.equalsIgnoreCase("Class")) {
final String name = attributes.getValue("name");
if (name == null) {
throw new SAXException("Class节点的属性name未配置");
}
this.firstInfo = BeanInfo.getBeanInfo(name);
if (this.firstInfo == null) {
throw new SAXException("未找到" + name + "的类定义");
}
} else if (nodeName.equalsIgnoreCase("Relation")) {
if (this.firstInfo == null) {
throw new SAXException("未配置Class节点");
}
String firstSignName = attributes.getValue("field");
if (firstSignName == null) {
throw new SAXException("Relation节点缺少field属性");
}
this.firstHolder = this.firstInfo.getHolder(firstSignName);
if (this.firstHolder == null) {
throw new SAXException("未定义枚举标识" + firstSignName);
}
String secondFactoryName = attributes.getValue("name");
if (secondFactoryName == null) {
throw new SAXException("Relation节点缺少name属性");
}
this.secondInfo = BeanInfo.getBeanInfo(secondFactoryName);
if (this.secondInfo == null) {
throw new SAXException("未找到" + secondFactoryName + "的类定义");
}
String secondSignName = attributes.getValue("reverse");
if (secondSignName != null) {
this.secondHolder = this.secondInfo.getHolder(secondSignName);
if (this.secondHolder == null) {
throw new SAXException(secondFactoryName + "类未定义枚举标识" + secondSignName);
}
} else {
this.secondHolder = null;
}
String typeName = attributes.getValue("type");
if (typeName == null) {
throw new SAXException("Relation节点缺少type属性");
}
this.type = RELATION_TYPE.valueOf(typeName);
String ownerName = attributes.getValue("owner");
if (ownerName == null) {
this.owner = false;
} else {
this.owner = ownerName.equalsIgnoreCase("true") ? true : false;
}
RelationInfo firstData = this.getSignData(firstInfo, this.firstHolder);
firstData.setBeanInfo(this.secondInfo);
firstData.setType(this.type);
firstData.setOwner(this.owner);
firstData.setReverseHolder(this.secondHolder);
if (this.secondHolder != null) {
RelationInfo secondData = this.getSignData(secondInfo, this.secondHolder);
secondData.setBeanInfo(this.firstInfo);
secondData.setOwner(false);
secondData.setReverseHolder(this.firstHolder);
switch (this.type) {
case MULTI_TO_MULTI:
secondData.setType(RELATION_TYPE.MULTI_TO_MULTI);
break;
case MULTI_TO_ONE:
secondData.setType(RELATION_TYPE.ONE_TO_MULTI);
break;
case INVALID:
secondData.setType(RELATION_TYPE.INVALID);
break;
case ONE_TO_MULTI:
secondData.setType(RELATION_TYPE.MULTI_TO_ONE);
break;
case ONE_TO_ONE:
secondData.setType(RELATION_TYPE.ONE_TO_ONE);
break;
default:
secondData.setType(RELATION_TYPE.INVALID);
break;
}
}
}
}
RelationInfo getSignData(BeanInfo beanInfo, Enum<?> holder) {
RelationInfo data = beanInfo.getRelationInfo(holder);
if (data == null) {
data = new RelationInfo();
data.setHolder(holder);
beanInfo.addRelationInfo(holder, data);
}
return data;
}
}
public static void initData(String holderPackage) {
List<Class<?>> holderClses = loadClass(holderPackage);
for (Class<?> enumCls : holderClses) {
if (!Enum.class.isAssignableFrom(enumCls)) {
continue;
}
String name = enumCls.getSimpleName();
BeanInfo beanInfo = BeanInfo.getBeanInfo(name.substring(1));
if (beanInfo == null) {
continue;
}
beanInfo.initHolder((Class<Enum<? extends Enum<?>>>) enumCls);
}
}
public static void loadConfig(String packName) {
ClassLoader loader = Thread.currentThread().getContextClassLoader();
final String strFile = packName.replaceAll("\\.", "/");
try {
Enumeration<URL> urls = loader.getResources(strFile);
while (urls.hasMoreElements()) {
URL url = urls.nextElement();
if (url != null) {
String protocol = url.getProtocol();
String filePath = url.getPath();
if (protocol.equals("file")) {
loadFileImpl(filePath);
} else if (protocol.equals("jar")) {
loadJarImpl(packName, url);
}
}
}
} catch (IOException e) {
return;
}
}
private static void loadFileImpl(String dirPath) {
File dir = new File(dirPath);
if (!dir.exists() || !dir.isDirectory()) {
return;
}
File[] dirFiles = dir.listFiles(new FileFilter() {
@Override
public boolean accept(File file) {
return file.isDirectory() || file.getName().endsWith(".xml");
}
});
for (File file : dirFiles) {
if (file.isDirectory()) {
loadFileImpl(dirPath + "/" + file.getName());
} else {
try {
loadXMLConfigure(file.getCanonicalPath());
} catch (IOException e) {
}
}
}
}
private static void loadJarImpl(String packName, URL url) throws IOException {
JarURLConnection jarURLConnection = (JarURLConnection) url.openConnection();
JarFile jarFile = jarURLConnection.getJarFile();
Enumeration<JarEntry> jarEntries = jarFile.entries();
while (jarEntries.hasMoreElements()) {
JarEntry jarEntry = jarEntries.nextElement();
String jarEntryName = jarEntry.getName();
if (jarEntryName.endsWith(".xml")) {
String packNameNew = packName.replace(".", "/");
if (jarEntryName.contains(packNameNew)) {
InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(jarEntryName);
loadXMLConfigure(is);
}
}
}
}
/**
* xml
* @param xmlPath
*/
private static void loadXMLConfigure(String xmlPath) {
SAXParserFactory sf = SAXParserFactory.newInstance();
try {
SAXParser sp = sf.newSAXParser();
sp.parse(new InputSource(xmlPath), new XMLReader());
} catch (ParserConfigurationException | SAXException | IOException e) {
}
}
/**
* jarxml
* @param is
*/
private static void loadXMLConfigure(InputStream is) {
SAXParserFactory sf = SAXParserFactory.newInstance();
try {
SAXParser sp = sf.newSAXParser();
sp.parse(new InputSource(is), new XMLReader());
} catch (ParserConfigurationException | SAXException | IOException e) {
}
}
/**
*
* @param packName
*/
public static List<Class<?>> loadClass(String packName) {
List<Class<?>> clses = new ArrayList<>();
ClassLoader loader = Thread.currentThread().getContextClassLoader();
String strFile = packName.replaceAll("\\.", "/");
try {
Enumeration<URL> urls = loader.getResources(strFile);
while (urls.hasMoreElements()) {
URL url = urls.nextElement();
if (url != null) {
String protocol = url.getProtocol();
String filePath = url.getPath();
if (protocol.equals("file")) {
loadClassImpl(packName, filePath, clses);
} else if (protocol.equals("jar")) {
loadJarImpl(packName, url, clses);
}
}
}
} catch (IOException e) {
e.printStackTrace();
}
return clses;
}
private static void loadClassImpl(String packName, String dirPath, List<Class<?>> clses) {
File dir = new File(dirPath);
if (!dir.exists() || !dir.isDirectory()) {
return;
}
File[] dirFiles = dir.listFiles(new FileFilter() {
@Override
public boolean accept(File file) {
return file.isDirectory() || file.getName().endsWith(".class");
}
});
for (File file : dirFiles) {
if (file.isDirectory()) {
loadClassImpl(packName + "." + file.getName(), dirPath + "/" + file.getName(), clses);
} else {
String clsName = file.getName();
clsName = clsName.substring(0, clsName.length() - 6);
try {
clses.add(Class.forName(packName + "." + clsName));
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
}
}
}
private static void loadJarImpl(String packName, URL url, List<Class<?>> clses) throws IOException {
JarURLConnection jarURLConnection = (JarURLConnection) url.openConnection();
JarFile jarFile = jarURLConnection.getJarFile();
Enumeration<JarEntry> jarEntries = jarFile.entries();
while (jarEntries.hasMoreElements()) {
JarEntry jarEntry = jarEntries.nextElement();
final String jarEntryName = jarEntry.getName();
if (jarEntryName.endsWith(".class")) {
String clsName = jarEntryName.replace("/", ".");
if (clsName.startsWith(packName)) {
clsName = clsName.substring(0, clsName.length() - 6);
try {
clses.add(Class.forName(clsName));
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
}
}
}
}
}

@ -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();
}
/**

@ -0,0 +1,9 @@
package cn.estsh.i3plus.pojo.aps.common;
public enum RELATION_TYPE {
INVALID, // 无效关联
ONE_TO_ONE, // 1对1关系
ONE_TO_MULTI, // 1对多关系
MULTI_TO_ONE, // 多对1关系
MULTI_TO_MULTI,// 多对多关系
}

@ -0,0 +1,12 @@
package cn.estsh.i3plus.pojo.aps.common;
import lombok.Data;
@Data
public class RelationInfo {
private BeanInfo beanInfo;
private Enum<?> holder;
private Enum<?> reverseHolder;
private RELATION_TYPE type;
private boolean owner;
}

@ -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" reverse="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>

@ -134,7 +134,7 @@ public abstract class BaseBean implements Serializable {
String result = "";
if (orderByParam!=null&&orderByParam.trim().length()>0) {
result = " order by " + orderByParam;
if(ascOrDesc == CommonEnumUtil.ASC_OR_DESC.ASC.getValue()) {
if(ascOrDesc!= null && ascOrDesc == CommonEnumUtil.ASC_OR_DESC.ASC.getValue()) {
result += " asc";
}else{
result += " desc";

@ -1236,4 +1236,49 @@ public class MesEnumUtil {
}
}
/**
* WC_CHECK_TYPE 线
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum WC_CHECK_TYPE {
PERSON(10, "person", "人"),
EQUIPMENT(20, "equipment", "机"),
MATERIAL(30, "material", "料"),
ROUTE(40, "route", "法"),
ONLINE_SIGNAL(50, "onlineSignal", "开线信号");
private int value;
private String code;
private String description;
WC_CHECK_TYPE(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public int getValue() {
return value;
}
public String getCode() {
return code;
}
public String getDescription() {
return description;
}
public static String valueOfDescription(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
}
}

@ -344,5 +344,622 @@ public class MesPcnEnumUtil {
}
}
/**
* MesWorkCenter
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum WORK_CENTER_RUNNING_STATUS {
RUNNING(1, "start", "开线"),
STOPPED(2, "stop", "停线");
private int value;
private String code;
private String description;
WORK_CENTER_RUNNING_STATUS(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public int getValue() {
return value;
}
public String getCode() {
return code;
}
public String getDescription() {
return description;
}
public static String valueOfDescription(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
public static String valueOfCode(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].code;
}
}
return tmp;
}
}
/**
* WC_CHECK_TYPE 线
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum WC_CHECK_TYPE {
PERSON(10, "people", "人"),
EQUIPMENT(20, "equipments", "设备"),
MATERIAL(30, "materials", "物料"),
ROUTE(40, "routes", "工艺"),
ONLINE_SIGNAL(50, "onlineSignal", "开线信号");
private int value;
private String code;
private String description;
WC_CHECK_TYPE(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public int getValue() {
return value;
}
public String getCode() {
return code;
}
public String getDescription() {
return description;
}
public static String valueOfDescription(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
public static String valueOfCode(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].code;
}
}
return tmp;
}
}
/**
* 线
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum ONLINE_SIGNAL {
CHECK(10, "检查"),
NON_CHECK(20, "不检查");
private int value;
private String description;
ONLINE_SIGNAL(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public static String valueOfDescription(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
* 线
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum IS_WCCHECK_PASS {
PASS(10, "通过"),
NON_PASS(20, "不通过");
private int value;
private String description;
IS_WCCHECK_PASS(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public static String valueOfDescription(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum EQP_CONNECT_TYPE {
PLC(10, "PLC"),
DB(20, "DB"),
OTHER(30,"OTHER");
private int value;
private String description;
EQP_CONNECT_TYPE(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public static String valueOfDescription(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
* MesPlanOrderstatus
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PLAN_ORDER_STATUS {
CREATE(10, "CREATED", "创建"),
DE_COMPOSE_ING(20, "DE_COMPOSE_ING", "分解中"),
DE_COMPOSE_ED(30, "DE_COMPOSE_ED", "分解完成"),
CLOSE(40, "CLOSE", "关闭");
private int value;
private String code;
private String description;
PLAN_ORDER_STATUS(int value, String code, String description) {
this.value = value;
this.code = code;
this.description = description;
}
public int getValue() {
return value;
}
public String getCode() {
return code;
}
public String getDescription() {
return description;
}
public static String valueOfDescription(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
* MesWorkOrderworkOrderStatus
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum WORK_ORDER_STATUS {
CREATE(10, "创建"),
LANDED(20, "下达"),
OPEN(30, "启动"),
PAUSE(40, "暂停"),
CANCEL(50, "取消"),
CLOSE(60, "关闭");
private int value;
private String description;
WORK_ORDER_STATUS(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public static String valueOfDescription(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
* MesWorkOrderworkOrderType
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum WORK_ORDER_TYPE {
STANDARD_ORDER(10, "标准工单"),
BTS_ORDER(20, "BTS工单"),
ATTEMPT_ORDER(30, "试制工单");
private int value;
private String description;
WORK_ORDER_TYPE(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public static String valueOfDescription(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
* MesPlanOrderplanType
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PLAN_ORDER_TYPE {
STANDARD_ORDER(10, "标准");
private int value;
private String description;
PLAN_ORDER_TYPE(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public static String valueOfDescription(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
public static Integer descriptionOfValue(String description) {
Integer tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].description.equals(description)) {
tmp = values()[i].value;
}
}
return tmp;
}
}
/**
* MesPlanOrdersource
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PALN_ORDER_SOURCE {
MES("MES", "来源于MES"),
SAP("SAP", "来源于SAP");
private String value;
private String description;
PALN_ORDER_SOURCE(String value, String description) {
this.value = value;
this.description = description;
}
public String getValue() {
return value;
}
public String getDescription() {
return description;
}
public static String valueOfDescription(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value.equals(val)) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
* MesWorkOrdersource
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum WORK_ORDER_SOURCE {
MES("MES", "来源于MES"),
AMES("AMES", "来源于AMES"),
SAP("SAP", "来源于SAP"),
CREATE("CREATE", "手工新增"),
RESOLVE("RESOLVE", "计划分解");
private String value;
private String description;
WORK_ORDER_SOURCE(String value, String description) {
this.value = value;
this.description = description;
}
public String getValue() {
return value;
}
public String getDescription() {
return description;
}
public static String valueOfDescription(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value.equals(val)) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
* MesQueueOrderstatus
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum QUEUE_ORDER_STATUS {
NORMAL(10, "正常"),
ONLINE(20, "已上线"),
OFFLINE(30, "已下线"),
CLOSE(40, "已关闭"),
;
private int value;
private String description;
QUEUE_ORDER_STATUS(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public static String valueOfDescription(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
* MesQueueOrderDetailstatus
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum QUEUE_ORDER_DETAIL_STATUS {
NORMAL(10, "正常"),
CLOSE(20, "关闭");
private int value;
private String description;
QUEUE_ORDER_DETAIL_STATUS(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public static String valueOfDescription(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
* MesPartCategorycategoryType
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PART_CATEGORY_TYPE {
CATEGORY_ONE("Category1", "类型1"),
CATEGORY_TWO("Category2", "类型2"),
CATEGORY_THREE("Category3", "类型3");
private String value;
private String description;
PART_CATEGORY_TYPE(String value, String description) {
this.value = value;
this.description = description;
}
public String getValue() {
return value;
}
public String getDescription() {
return description;
}
public static String valueOfDescription(String val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (val.equals(values()[i].value)) {
tmp = values()[i].description;
}
}
return tmp;
}
}
/**
* MesWorkOrderapprovalStatus
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum WORK_ORDER_APPROVAL_STATUS {
WAIT_APPROVAL(10, "待审批"),
COMPLETE_APPROVAL(20, "已审批"),
REJECT_APPROVAL(30, "驳回");
private int value;
private String description;
WORK_ORDER_APPROVAL_STATUS(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public static String valueOfDescription(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
public static String valueOfDescription2(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description.equals("已审批") ? "审批" : values()[i].description;
}
}
return tmp;
}
}
}

@ -377,6 +377,44 @@ public class WmsEnumUtil {
}
/**
* 使
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum PRINT_STATUS {
PRINTED(1, "已打印"), NOPRINT(2, "未打印"), GENERATE(3, "退料生成条码");
private int value;
private String description;
PRINT_STATUS(int value, String description) {
this.value = value;
this.description = description;
}
public int getValue() {
return value;
}
public String getDescription() {
return description;
}
public static String valueOf(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
public static String valueOfDescription(int val) {
return valueOf(val);
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
@ -560,7 +598,9 @@ public class WmsEnumUtil {
ASN(200, "ASN", "ASN"),
PO(210, "PO", "PO"),
QC(220, "QC", "QC"),
AMPR(230, "AMPR", "AMPR");
AMPR(230, "AMPR", "AMPR"),
FINISHGOODS(240, "FINISHGOODS", "VDA生产快速入库"),
VDA_REPORT(250, "VDA_REPORT", "VDA生产报工");
private int value;

@ -504,6 +504,19 @@ public class DdlPreparedPack {
}
/**
* not in String
*
* @param data
* @param columnName
* @param packBean
*/
public static void getNotInPackArray(Object[] data, String columnName, DdlPackBean packBean) {
if (data != null && data.length > 0) {
packBean.addColumnQuery(columnName," and model." + columnName + " not in (:m_" + columnName + ")", Arrays.asList(data));
}
}
/**
* in String
*
* @param data
@ -517,6 +530,19 @@ public class DdlPreparedPack {
}
/**
* not in List
*
* @param data
* @param columnName
* @param packBean
*/
public static void getNotInPackList(List<?> data, String columnName, DdlPackBean packBean) {
if (data != null && data.size() > 0) {
packBean.addColumnQuery(columnName," and model." + columnName + "not in (:m_" + columnName + ")", data);
}
}
/**
* in String
*
* @param data

@ -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,62 @@
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;
/**
* @Author: Wynne.Lu
* @CreateDate: 2019/9/24 7:17 PM
* @Description:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_DB")
@Api("地址清单")
public class MesDB extends BaseBean {
@Column(name="DS_CODE")
@ApiParam("数据源代码")
private String dsCode;
@Column(name="DS_NAME")
@ApiParam("数据源名称")
private String dsName;
@Column(name="DS_TYPE")
@ApiParam("数据源类型")
private String dsType;
@Column(name="DS_HOST")
@ApiParam("主机")
private String dsHost;
@Column(name="DS_PORT")
@ApiParam("端口")
private Integer dsPort;
@Column(name="DS_USER")
@ApiParam("用户名")
private String dsUser;
@Column(name="DS_PASSWORD")
@ApiParam("密码")
private String dsPassword;
@Column(name="EQU_CODE")
@ApiParam("设备代码")
private String equCode;
}

@ -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;
/**
* @Author: Wynne.Lu
* @CreateDate: 2019/9/24 7:12 PM
* @Description:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_DATA_OBJECT")
@Api("数据对象")
public class MesDataObject extends BaseBean {
@Column(name="OBJECT_CODE")
@ApiParam("对象代码")
private String objectCode;
@Column(name="OBJECT_NAME")
@ApiParam("对象名称")
private String objectName;
@Column(name="DS_CODE")
@ApiParam("数据源代码")
private String dsCode;
}

@ -0,0 +1,55 @@
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;
/**
* @Author: Wynne.Lu
* @CreateDate: 2019/9/24 7:14 PM
* @Description:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_OBJECT_CFG")
@Api("对象结构")
public class MesObjectCfg extends BaseBean {
@Column(name = "OBJECT_CODE")
@ApiParam("对象代码")
private String objectCode;
@Column(name = "FIELD_CODE")
@ApiParam("字段代码")
private String fieldCode;
@Column(name = "FIELD_NAME")
@ApiParam("字段名称")
private String fieldName;
@Column(name = "FIELD_TYPE")
@ApiParam("字段类型")
private String fieldType;
@Column(name = "FIELD_LENGTH")
@ApiParam("列长度")
private String fieldLength;
@Column(name = "FIELD_PK")
@ApiParam("主键标记")
private String fieldPk;
}

@ -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_PART_CATEGORY")
@Api("零件种类")
public class MesPartCategory extends BaseBean {
@Column(name="CATEGORY_CODE")
@ApiParam("分类代码")
private String categoryCode;
@Column(name="CATEGORY_NAME")
@ApiParam("分类名称")
private String categoryName;
@Column(name="CATEGORY_TYPE")
@ApiParam("分类类型")
private String categoryType;
}

@ -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;
}

@ -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;
/**
* @Author: Wynne.Lu
* @CreateDate: 2019/9/21 1:45 PM
* @Description:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_WC_CHECK")
@Api("开线检查")
public class MesWcCheck extends BaseBean {
@Column(name="WORK_CENTER_CODE")
@ApiParam("工作中心")
private String workCenterCode;
@Column(name="PART_NO")
@ApiParam("产品物料号")
private String partNo;
@Column(name="CHECK_TYPE")
@ApiParam("检查类型")
private String checkType;
@Column(name="CHECK_OBJ")
@ApiParam("检查对象")
private String checkObj;
@Column(name="CHECK_ITEM")
@ApiParam("检查项")
private String checkItem;
@Column(name="STANDARD")
@ApiParam("检查标准")
private String standard;
}

@ -0,0 +1,78 @@
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;
/**
* @Author: Wynne.Lu
* @CreateDate: 2019/9/21 1:57 PM
* @Description:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_WC_CHECK_RECORD")
@Api("开线检查记录")
public class MesWcCheckRecord extends BaseBean {
@Column(name = "WORK_CENTER_CODE")
@ApiParam("工作中心")
private String workCenterCode;
@Column(name = "WORK_ORDER")
@ApiParam("工单号")
private String workOrder;
@Column(name = "PART_NO")
@ApiParam("产品物料号")
private String partNo;
@Column(name = "CHECK_TYPE")
@ApiParam("检查类型")
private String checkType;
@Column(name = "CHECK_OBJ")
@ApiParam("检查对象")
private String checkObj;
@Column(name = "CHECK_ITEM")
@ApiParam("检查项")
private String checkItem;
@Column(name = "STANDARD")
@ApiParam("检查标准")
private String standard;
@Column(name = "CHECK_RESULT")
@ApiParam("检查结果")
private String checkResult;
@Column(name = "CHECK_VALUE")
@ApiParam("检查值")
private String checkValue;
@Column(name = "REASON")
@ApiParam("原因")
private String reason;
@Column(name = "GROUP_CODE")
@ApiParam("组名")
private String groupCode;
@Column(name = "OVERALL_RESULT")
@ApiParam("总体结果")
private Integer overAllResult;
}

@ -0,0 +1,41 @@
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;
/**
* @Author: Wynne.Lu
* @CreateDate: 2019/9/24 2:31 PM
* @Description:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_WC_EQUIPMENT")
@Api("工作单元设备关系表")
public class MesWcEquipment extends BaseBean {
@Column(name="WORK_CENTER_CODE")
@ApiParam("工作中心代码")
private String workCenterCode;
@Column(name="WORK_CELL_CODE")
@ApiParam("工作单元代码")
private String workCellCode;
@Column(name="EQU_CODE")
@ApiParam("设备代码")
private String equCode;
}

@ -46,4 +46,9 @@ public class MesWorkCenter extends BaseBean {
@Column(name = "AREA_CODE")
@ApiParam("生产区域代码")
private String areaCode;
@Column(name="RUNNING_STATUS")
@ApiParam("运行状态")
private Integer runningStatus;
}

@ -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,60 @@ 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
@ApiParam("区域代码名称")
private String areaCodeName;
@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,29 @@
package cn.estsh.i3plus.pojo.mes.pcn.model;
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesProcessBom;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Author: Wynne.Lu
* @CreateDate: 2019/9/21 3:11 PM
* @Description:
**/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Api("工序BOM model")
public class ProcessBomModel extends MesProcessBom {
@ApiParam("上料数量")
private Long cellFeedQty;
@ApiParam("是否上料数量满足")
private Boolean isFeedSatisfied;
}

@ -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,89 @@
package cn.estsh.i3plus.pojo.mes.pcn.model;
import cn.estsh.i3plus.pojo.base.enumutil.MesPcnEnumUtil;
import cn.estsh.i3plus.pojo.mes.pcn.bean.MesWcCheckRecord;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.*;
/**
* @Author: Wynne.Lu
* @CreateDate: 2019/9/23 8:06 PM
* @Description:
**/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Api("开线管控model")
public class WcCheckModel {
@ApiParam("人")
private List<MesWcCheckRecord> people;
@ApiParam("人 列")
private Map<String, String> peopleColumn;
@ApiParam("机")
private List<MesWcCheckRecord> equipments;
@ApiParam("机 列")
private Map<String, String> equipmentsColumn;
@ApiParam("物料")
private List<MesWcCheckRecord> materials;
@ApiParam("物料 列")
private Map<String, String> materialsColumn;
@ApiParam("法")
private List<MesWcCheckRecord> routes;
@ApiParam("法 列")
private Map<String, String> routesColumn;
@ApiParam("对象list和列关系")
private Map<String, String> dataColumnRelation;
@ApiParam("开线信号")
private Integer onlineSignal;
@ApiParam("是否通过")
private Integer isPass;
@ApiParam("工作中心")
private String workCenterCode;
@ApiParam("工单")
private String workOrder;
@ApiParam("工单零件数量")
private Long qty;
@ApiParam("产品号")
private String partNo;
public WcCheckModel initialWcCheckModel() {
WcCheckModel wcCheckModel = new WcCheckModel();
wcCheckModel.setPeople(new ArrayList<>());
wcCheckModel.setEquipments(new ArrayList<>());
wcCheckModel.setMaterials(new ArrayList<>());
wcCheckModel.setRoutes(new ArrayList<>());
wcCheckModel.setPeopleColumn(new HashMap<>());
wcCheckModel.setEquipmentsColumn(new HashMap<>());
wcCheckModel.setMaterialsColumn(new HashMap<>());
wcCheckModel.setRoutesColumn(new HashMap<>());
wcCheckModel.setOnlineSignal(MesPcnEnumUtil.ONLINE_SIGNAL.NON_CHECK.getValue());
wcCheckModel.setIsPass(MesPcnEnumUtil.IS_WCCHECK_PASS.NON_PASS.getValue());
Map<String, String> dataColumnRelationMap = new HashMap<>();
dataColumnRelationMap.put("people", "peopleColumn");
dataColumnRelationMap.put("equipments", "equipmentsColumn");
dataColumnRelationMap.put("materials", "materialsColumn");
dataColumnRelationMap.put("routes", "routesColumn");
wcCheckModel.setDataColumnRelation(dataColumnRelationMap);
return wcCheckModel;
}
}

@ -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.MesPartCategory;
import org.springframework.stereotype.Repository;
/**
* @Description :
* @Reference :
* @Author : jack.jia
* @CreateDate : 2019-04-02
* @Modify:
**/
@Repository
public interface MesPartCategoryRepository extends BaseRepository<MesPartCategory, 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,13 @@
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.MesWcCheckRecord;
/**
* @Author: Wynne.Lu
* @CreateDate: 2019/9/23 7:30 PM
* @Description:
**/
public interface MesWcCheckRecordRepository extends BaseRepository<MesWcCheckRecord, Long> {
}

@ -0,0 +1,13 @@
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.MesWcCheck;
/**
* @Author: Wynne.Lu
* @CreateDate: 2019/9/23 7:30 PM
* @Description:
**/
public interface MesWcCheckRepository extends BaseRepository<MesWcCheck, 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> {
}

@ -33,6 +33,20 @@ public class MesHqlPack {
}
/**
*
*
* @param organizeCode
* @return
*/
public static DdlPackBean getAllBaseDataByNormalPro(BaseBean baseBean, String organizeCode) {
DdlPackBean packBean = new DdlPackBean();
DdlPreparedPack.getStringEqualPack(organizeCode, "organizeCode", packBean);
DdlPreparedPack.getNumEqualPack(baseBean.getIsValid(), "isValid", packBean);
DdlPreparedPack.getNumEqualPack(CommonEnumUtil.IS_DEAL.NO.getValue(), "isDeleted", packBean);
return packBean;
}
/**
* MES PCN
*
* @param mesConfig
@ -96,5 +110,112 @@ 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;
}
/**
*
*
* @param mesPart
* @return
*/
public static DdlPackBean getPartCondition(MesPart mesPart, String organizeCode) {
DdlPackBean packBean = new DdlPackBean();
DdlPreparedPack.getStringEqualPack(organizeCode, "organizeCode", packBean);
DdlPreparedPack.getNumEqualPack(CommonEnumUtil.IS_VAILD.VAILD.getValue(), "isValid", packBean);
DdlPreparedPack.getNumEqualPack(CommonEnumUtil.IS_DEAL.NO.getValue(), "isDeleted", packBean);
if (StringUtils.isNotEmpty(mesPart.getPartNo())) {
DdlPreparedPack.getStringLikerPack(mesPart.getPartNo(), "partNo", packBean);
}
if (StringUtils.isNotEmpty(mesPart.getPartName())) {
DdlPreparedPack.getStringLikerPack(mesPart.getPartName(), "partName", packBean);
}
if (StringUtils.isNotEmpty(mesPart.getCategoryCode1())) {
DdlPreparedPack.getStringEqualPack(mesPart.getCategoryCode1(), "categoryCode1", packBean);
}
if (StringUtils.isNotEmpty(mesPart.getCategoryCode2())) {
DdlPreparedPack.getStringEqualPack(mesPart.getCategoryCode2(), "categoryCode2", packBean);
}
if (StringUtils.isNotEmpty(mesPart.getCategoryCode3())) {
DdlPreparedPack.getStringEqualPack(mesPart.getCategoryCode3(), "categoryCode3", packBean);
}
DdlPreparedPack.getOrderDefault(mesPart);
DdlPreparedPack.getOrderByPack(new Object[]{"2"}, new String[]{mesPart.getOrderByParam()}, packBean);
return packBean;
}
/**
* MES
*
* @param customer
* @return
*/
public static DdlPackBean getMesCustomer(MesCustomer customer, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(customer, organizeCode);
if (StringUtils.isNotEmpty(customer.getCustomerCode())) {
DdlPreparedPack.getStringLikerPack(customer.getCustomerCode(), "customerCode", packBean);
}
if (StringUtils.isNotEmpty(customer.getCustomerName())) {
DdlPreparedPack.getStringLikerPack(customer.getCustomerName(), "customerName", packBean);
}
return packBean;
}
}

@ -0,0 +1,62 @@
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.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @Author: Wynne.Lu
* @CreateDate: 2019/9/24 7:17 PM
* @Description:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_DB")
@Api("地址清单")
public class MesDB extends BaseBean {
@Column(name = "DS_CODE")
@ApiParam("数据源代码")
private String dsCode;
@Column(name = "DS_NAME")
@ApiParam("数据源名称")
private String dsName;
@Column(name = "DS_TYPE")
@ApiParam("数据源类型")
private String dsType;
@Column(name = "DS_HOST")
@ApiParam("主机")
private String dsHost;
@Column(name = "DS_PORT")
@ApiParam("端口")
private Integer dsPort;
@Column(name = "DS_USER")
@ApiParam("用户名")
private String dsUser;
@Column(name = "DS_PASSWORD")
@ApiParam("密码")
private String dsPassword;
@Column(name = "EQU_CODE")
@ApiParam("设备代码")
private String equCode;
}

@ -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.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @Author: Wynne.Lu
* @CreateDate: 2019/9/24 7:12 PM
* @Description:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_DATA_OBJECT")
@Api("数据对象")
public class MesDataObject extends BaseBean {
@Column(name="OBJECT_CODE")
@ApiParam("对象代码")
private String objectCode;
@Column(name="OBJECT_NAME")
@ApiParam("对象名称")
private String objectName;
@Column(name="DS_CODE")
@ApiParam("数据源代码")
private String dsCode;
}

@ -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.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @Author: Wynne.Lu
* @CreateDate: 2019/9/24 7:14 PM
* @Description:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_OBJECT_CFG")
@Api("对象结构")
public class MesObjectCfg extends BaseBean {
@Column(name = "OBJECT_CODE")
@ApiParam("对象代码")
private String objectCode;
@Column(name = "FIELD_CODE")
@ApiParam("字段代码")
private String fieldCode;
@Column(name = "FIELD_NAME")
@ApiParam("字段名称")
private String fieldName;
@Column(name = "FIELD_TYPE")
@ApiParam("字段类型")
private String fieldType;
@Column(name = "FIELD_LENGTH")
@ApiParam("列长度")
private String fieldLength;
@Column(name = "FIELD_PK")
@ApiParam("主键标记")
private String fieldPk;
}

@ -0,0 +1,54 @@
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.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @Author: Wynne.Lu
* @CreateDate: 2019/9/21 1:45 PM
* @Description:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_WC_CHECK")
@Api("开线检查")
public class MesWcCheck extends BaseBean {
@Column(name="WORK_CENTER_CODE")
@ApiParam("工作中心")
private String workCenterCode;
@Column(name="PART_NO")
@ApiParam("产品物料号")
private String partNo;
@Column(name="CHECK_TYPE")
@ApiParam("检查类型")
private String checkType;
@Column(name="CHECK_OBJ")
@ApiParam("检查对象")
private String checkObj;
@Column(name="CHECK_ITEM")
@ApiParam("检查项")
private String checkItem;
@Column(name="STANDARD")
@ApiParam("检查标准")
private String standard;
}

@ -0,0 +1,78 @@
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.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @Author: Wynne.Lu
* @CreateDate: 2019/9/21 1:57 PM
* @Description:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_WC_CHECK_RECORD")
@Api("开线检查记录")
public class MesWcCheckRecord extends BaseBean {
@Column(name = "WORK_CENTER_CODE")
@ApiParam("工作中心")
private String workCenterCode;
@Column(name = "WORK_ORDER")
@ApiParam("工单号")
private String workOrder;
@Column(name = "PART_NO")
@ApiParam("产品物料号")
private String partNo;
@Column(name = "CHECK_TYPE")
@ApiParam("检查类型")
private String checkType;
@Column(name = "CHECK_OBJ")
@ApiParam("检查对象")
private String checkObj;
@Column(name = "CHECK_ITEM")
@ApiParam("检查项")
private String checkItem;
@Column(name = "STANDARD")
@ApiParam("检查标准")
private String standard;
@Column(name = "CHECK_RESULT")
@ApiParam("检查结果")
private String checkResult;
@Column(name = "CHECK_VALUE")
@ApiParam("检查值")
private String checkValue;
@Column(name = "REASON")
@ApiParam("原因")
private String reason;
@Column(name = "GROUP_CODE")
@ApiParam("组名")
private String groupCode;
@Column(name = "OVERALL_RESULT")
@ApiParam
private Integer overAllResult;
}

@ -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.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* @Author: Wynne.Lu
* @CreateDate: 2019/9/24 2:31 PM
* @Description:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_WC_EQUIPMENT")
@Api("工作单元设备关系表")
public class MesWcEquipment extends BaseBean {
@Column(name="WORK_CENTER_CODE")
@ApiParam("工作中心代码")
private String workCenterCode;
@Column(name="WORK_CELL_CODE")
@ApiParam("工作单元代码")
private String workCellCode;
@Column(name="EQU_CODE")
@ApiParam("设备代码")
private String equCode;
}

@ -51,6 +51,10 @@ public class MesWorkCenter extends BaseBean {
@ApiParam("生产区域代码")
private String areaCode;
@Column(name="RUNNING_STATUS")
@ApiParam("运行状态")
private Integer runningStatus;
@Transient
@ApiParam(value ="子集列表")
private List<MesWorkCell> childTreeList;

@ -163,6 +163,10 @@ public class MesWorkOrder extends BaseBean {
public String prodCfgName;
@Transient
@ApiParam("区域代码名称")
private String areaCodeName;
@Transient
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiParam(value="计划开始日期查询用,查询开始日期",example = "2018-12-31 23:59:59")
public String startTimeStart;

@ -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;
}

@ -0,0 +1,13 @@
package cn.estsh.i3plus.pojo.mes.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.bean.MesWcCheckRecord;
/**
* @Author: Wynne.Lu
* @CreateDate: 2019/9/23 7:30 PM
* @Description:
**/
public interface MesWcCheckRecordRepository extends BaseRepository<MesWcCheckRecord, Long> {
}

@ -0,0 +1,13 @@
package cn.estsh.i3plus.pojo.mes.repository;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mes.bean.MesWcCheck;
/**
* @Author: Wynne.Lu
* @CreateDate: 2019/9/23 7:30 PM
* @Description:
**/
public interface MesWcCheckRepository extends BaseRepository<MesWcCheck, Long> {
}

@ -74,6 +74,7 @@ public class MesHqlPack {
if (StringUtils.isNotEmpty(mesPlanOrder.getStatus() + "") && mesPlanOrder.getStatusVal() != 0) {
DdlPreparedPack.getNumEqualPack(mesPlanOrder.getStatus(), "status", packBean);
}
if (StringUtils.isNotEmpty(mesPlanOrder.getCreateUser())) {
DdlPreparedPack.getStringLikerPack(mesPlanOrder.getCreateUser(), "createUser", packBean);
}
@ -364,6 +365,7 @@ public class MesHqlPack {
/**
* MES
*
* @param shiftGroup
* @param organizeCode
* @return
@ -397,7 +399,7 @@ public class MesHqlPack {
return packBean;
}
/******************created by wynne*************/
/**
* MES
*
@ -418,6 +420,24 @@ public class MesHqlPack {
return packBean;
}
/**
* MES 线
*
* @param mesWcCheck
* @return
*/
public static DdlPackBean getMesWcCheck(MesWcCheck mesWcCheck, String organizeCode) {
DdlPackBean packBean = getAllBaseDataByNormalPro(mesWcCheck,organizeCode);
// DdlPreparedPack.getNumEqualPack(mesWcCheck.getIsValid(),"isValid",packBean);
DdlPreparedPack.getStringLikerPack(mesWcCheck.getWorkCenterCode(), "workCenterCode", packBean);
DdlPreparedPack.getStringLikerPack(mesWcCheck.getPartNo(), "partNo", packBean);
DdlPreparedPack.getStringEqualPack(mesWcCheck.getCheckType(), "checkType", packBean);
DdlPreparedPack.getStringLikerPack(mesWcCheck.getCheckObj(), "checkObj", packBean);
DdlPreparedPack.getStringLikerPack(mesWcCheck.getCheckItem(), "checkItem", packBean);
return packBean;
}
/**
* MES PCN
*
@ -1230,4 +1250,25 @@ public class MesHqlPack {
packBean.setOrderByStr(buttonStatus.orderBy());
return packBean;
}
/**
*
* @param mesWorkOrder
* @param organizeCode
* @return
*/
public static DdlPackBean getApprovalData(MesWorkOrder mesWorkOrder, String organizeCode) {
DdlPackBean packBean = MesHqlPack.getAllBaseData(organizeCode);
DdlPreparedPack.getStringEqualPack(mesWorkOrder.getWorkCenterCode(), "workCenterCode", packBean);
if (!org.springframework.util.StringUtils.isEmpty(mesWorkOrder.getOrderNo())) {
DdlPreparedPack.getStringEqualPack(mesWorkOrder.getOrderNo(), "orderNo", packBean);
}
if (!org.springframework.util.StringUtils.isEmpty(mesWorkOrder.getPartNo())) {
DdlPreparedPack.getStringEqualPack(mesWorkOrder.getPartNo(), "partNo", packBean);
}
DdlPreparedPack.getNumEqualPack(MesEnumUtil.WORK_ORDER_APPROVAL_STATUS.WAIT_APPROVAL.getValue(), "approvalStatus", packBean);
DdlPreparedPack.getNumEqualPack(MesEnumUtil.WORK_ORDER_STATUS.CREATE.getValue(), "workOrderStatus", packBean);
DdlPreparedPack.getOrderByPack(new String[]{String.valueOf(CommonEnumUtil.ASC_OR_DESC.ASC.getValue())}, new String[]{"startTime", "shiftCode"}, packBean);
return packBean;
}
}

@ -35,8 +35,11 @@ public class WmsActionResponseBean<Obj> implements Serializable {
@ApiParam("进度")
public String percent = "消息提示:";
@ApiParam("当前步骤")
public Integer currentStep;
@ApiParam("当前步骤类型名称")
public String currentStepTypeName;
@ApiParam("当前步骤名称")
public String currentStepName;
@ApiParam("总步数")
public int totalStep;

@ -20,7 +20,8 @@ public class WmsMessageStyleModel implements Serializable {
public Integer taskStatus;
@ApiParam("单据明细状态")
public Integer odStatus;
@ApiParam("扫码明细状态")
public Integer wsStatus;
@ApiParam("消息")
public String message;
@ -38,6 +39,11 @@ public class WmsMessageStyleModel implements Serializable {
public WmsMessageStyleModel() {
}
public WmsMessageStyleModel(String message, Integer selectQty) {
this.message = message;
this.wsStatus = selectQty;
}
public WmsMessageStyleModel(String message) {
this.message = message;
}

@ -3,7 +3,6 @@ package cn.estsh.i3plus.pojo.model.wms;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import javax.persistence.Column;
import java.io.Serializable;
/**
@ -27,7 +26,6 @@ public class WmsTaskInfoModel implements Serializable {
@ApiParam("作业类型名称")
public String opTypeName;
@Column(name = "TRANS_TYPE_CODE")
@ApiParam(value = "交易类型代码")
private String transTypeCode;
@ -37,30 +35,33 @@ public class WmsTaskInfoModel implements Serializable {
@ApiParam(value = "关联单据业务类型")
private String busiTypeDesc;
@Column(name = "ZDATE")
@ApiParam(value = "计划日期")
private String zdate;
@Column(name = "ZTIME")
@ApiParam(value = "计划时间")
private String ztime;
@Column(name = "CUST_NO")
@ApiParam(value = "客户编号")
private String custNo;
@Column(name = "VENDOR_NO")
@ApiParam(value = "供应商编号")
private String vendorNo;
@ApiParam(value = "样式")
private WmsMessageStyleModel wmsMessageStyleModel;
@ApiParam(value = "源存储区代码")
private String srcZoneNo;
@ApiParam(value = "创建日期")
public String createDatetime;
public WmsTaskInfoModel() {
}
public WmsTaskInfoModel(String orderNo, Integer taskStatus, String opTypeName, String transTypeCode, String refSrc,
String busiTypeDesc, String zdate, String ztime, String custNo, String vendorNo) {
String busiTypeDesc, String zdate, String ztime, String custNo, String vendorNo,
String createDatetime, String srcZoneNo) {
this.orderNo = orderNo;
this.taskStatus = taskStatus;
this.opTypeName = opTypeName;
@ -71,5 +72,7 @@ public class WmsTaskInfoModel implements Serializable {
this.ztime = ztime;
this.custNo = custNo;
this.vendorNo = vendorNo;
this.createDatetime = createDatetime;
this.srcZoneNo = srcZoneNo;
}
}

@ -176,6 +176,9 @@ public class WmsASNMaster extends BaseBean {
@ApiParam("项目")
private String prodCfgTypeCode;
@Transient
private List<String> orderNoList;
public WmsASNMaster() {
}

@ -84,6 +84,10 @@ public class WmsActionGroupDetails extends BaseBean {
private String asName;
@Transient
@ApiParam(value = "步骤类型名称")
private String atName;
@Transient
@ApiParam(value = "流程名称")
private String agName;
@ -112,11 +116,13 @@ public class WmsActionGroupDetails extends BaseBean {
@ApiParam(value = "是否自动开窗", example = "2")
private Integer isAutoOpenWindow;
@Column(name = "SEARCH_KEY")
@ApiParam(value = "搜索KEY")
public String searchKey;
private String searchKey;
@Column(name = "GROUP_KEY")
@ApiParam(value = "分组KEY")
public String groupKey;
private String groupKey;
public int getSeqVal() {
return this.seq == null ? 0 : this.seq;
@ -153,4 +159,37 @@ public class WmsActionGroupDetails extends BaseBean {
public int getLenCheckVal() {
return this.lenCheck == null ? 0 : this.lenCheck;
}
public WmsActionGroupDetails() {
}
public WmsActionGroupDetails(Long id, Long agId, Integer seq, Integer okSeq, Integer ngSeq, Integer valueType, Integer toUpper,
Integer lenCheck, String regularCheck, String regularCheckFailMsg, Long asId, Long atId,
String asName, String atName, String goToBtnCode, String goToBtnName, Integer preShow,
Long showAmId, Integer isCommitAble, Integer isAutoOpenWindow, String searchKey,
String groupKey, String organizeCode) {
this.id = id;
this.agId = agId;
this.seq = seq;
this.okSeq = okSeq;
this.ngSeq = ngSeq;
this.valueType = valueType;
this.toUpper = toUpper;
this.lenCheck = lenCheck;
this.regularCheck = regularCheck;
this.regularCheckFailMsg = regularCheckFailMsg;
this.asId = asId;
this.atId = atId;
this.asName = asName;
this.atName = atName;
this.goToBtnCode = goToBtnCode;
this.goToBtnName = goToBtnName;
this.preShow = preShow;
this.showAmId = showAmId;
this.isCommitAble = isCommitAble;
this.isAutoOpenWindow = isAutoOpenWindow;
this.searchKey = searchKey;
this.groupKey = groupKey;
this.organizeCode = organizeCode;
}
}

@ -133,6 +133,11 @@ public class WmsCSOrderDetails extends BaseBean {
@AnnoOutputColumn(refClass = WmsEnumUtil.INVENTORY_DIFFERENCE_TYPE.class,refForeignKey = "value",value = "description")
public Integer differenceType;
public Integer getDifferenceTypeVal() {
return this.differenceType == null ?
-1: this.differenceType;
}
public Double getQty() {
return this.qty == null ? 0 : this.qty;
}

@ -144,6 +144,17 @@ public class WmsPOMaster extends BaseBean {
@ApiParam("前端信息")
private String message;
@Transient
@ApiParam("计划日期开始")
private String planDateStart;
@Transient
@ApiParam("计划日期结束")
private String planDateEnd;
@Transient
private List<String> orderNoList;
public int getPoStatusVal() {
return this.poStatus == null ? 0 : this.poStatus;
}

@ -128,11 +128,11 @@ public class WmsStockSn extends BaseBean {
@AnnoOutputColumn(refClass = WmsEnumUtil.STOCK_SN_STATUS.class, refForeignKey = "value", value = "description")
private Integer snStatus;
/**
* 1:2
* 1:23退
*/
@Column(name = "PRINTED")
@ApiParam(value = "是否打印", example = "0")
@AnnoOutputColumn(refClass = WmsEnumUtil.TRUE_OR_FALSE.class, refForeignKey = "value", value = "description")
@AnnoOutputColumn(refClass = WmsEnumUtil.PRINT_STATUS.class, refForeignKey = "value", value = "description")
private Integer printed;
@Column(name = "PDATE")

@ -208,6 +208,12 @@ public class WmsHqlPack {
DdlPreparedPack.getStringEqualPack(wmsPOMaster.getVendorNo(), "vendorNo", result);
DdlPreparedPack.getStringEqualPack(wmsPOMaster.getSrc(), "src", result);
DdlPreparedPack.getStringEqualPack(wmsPOMaster.getIsAsn(), "isAsn", result);
// 查询计划时间在指定范围的单号,查询这些单号的数据
if (StringUtils.isNotBlank(wmsPOMaster.getPlanDateStart()) && StringUtils.isNotBlank(wmsPOMaster.getPlanDateEnd())) {
DdlPreparedPack.getInPackList(wmsPOMaster.getOrderNoList(), "orderNo", result);
}
getStringBuilderPack(wmsPOMaster, result);
return result;
@ -593,6 +599,11 @@ public class WmsHqlPack {
DdlPreparedPack.getStringLikerPack(wmsASNMaster.getSrc(), "src", result);
DdlPreparedPack.getStringEqualPack(wmsASNMaster.getPoNo(), "poNo", result);
// 查询计划时间在指定范围的单号,查询这些单号的数据
if (StringUtils.isNotBlank(wmsASNMaster.getPlanDateStart()) && StringUtils.isNotBlank(wmsASNMaster.getPlanDateEnd())) {
DdlPreparedPack.getInPackList(wmsASNMaster.getOrderNoList(), "orderNo", result);
}
getStringBuilderPack(wmsASNMaster, result);
return result;
@ -1529,6 +1540,12 @@ public class WmsHqlPack {
DdlPreparedPack.getNumberBiggerPack(wmsStockSn.getQty(), "qty", result);
result.setOrderByStr(wmsStockSn.orderBy());
if(wmsStockSn.getPrinted()!= null){
if(WmsEnumUtil.PRINT_STATUS.GENERATE.getValue() == wmsStockSn.getPrinted()){
DdlPreparedPack.getNumNOEqualPack(WmsEnumUtil.PRINT_STATUS.GENERATE.getValue(),"printed",result);
}
}
getStringBuilderPack(wmsStockSn, result);
return result;
}

Loading…
Cancel
Save