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

yun-zuoyi
crish 6 years ago
commit b8225e8bcd

@ -20,4 +20,5 @@ public @interface FieldAnnotation {
boolean display() default true; // 是否需要在界面显示
int pric() default 2; // 对于浮点型,界面显示的精度
boolean mainkey() default false; // 是否为主键
String defaultValue() default ""; // 字段的默认值
}

@ -41,7 +41,7 @@ public class FieldInfo extends BaseCode {
private FIELD_TYPE type;
@Column(name="TYPE_NAME")
@ApiParam(value ="类型称")
@ApiParam(value ="类型称")
private String typeName;
@Column(name="CUSTOMIZE")
@ -80,6 +80,13 @@ public class FieldInfo extends BaseCode {
@ApiParam(value ="数据库类型")
private JDBCType jdbcType;
@Column(name="DEFAULT_VALUE")
@ApiParam(value ="字段默认值")
private String defaultValue;
@ApiParam(value ="枚举项内容")
private transient Enum<?>[] enumItems;
@JsonIgnore
private transient Class<? extends BaseBean> clazz;
@JsonIgnore

@ -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.annotation.RippleAnnotation;
import cn.estsh.i3plus.pojo.aps.common.BaseCode;
import cn.estsh.i3plus.pojo.aps.common.BeanRelation;
@ -31,10 +32,12 @@ import java.util.List;
public class Material extends BaseCode {
@Column(name="TYPE")
@ApiParam(value ="类型")
@FieldAnnotation(defaultValue = "PRODUCT")
private MATERIAL_TYPE type;
@Column(name="PREPARE_TYPE")
@ApiParam(value ="备料类型")
@FieldAnnotation(defaultValue = "SELF_MAKE")
private PREPARE_TYPE prepareType;
@Column(name="REPL_TYPE")
@ -68,10 +71,12 @@ public class Material extends BaseCode {
@Column(name="LEVEL")
@ApiParam(value ="低阶码")
@RippleAnnotation(dependence = {"OperOutputs.Operation.ProductRouting.Material"}, method = "calcLevel")
@FieldAnnotation(modify = false)
private Integer level;
@Column(name="IS_AUTO_FIX_PEGGING")
@ApiParam(value ="自动补充标识")
@FieldAnnotation(defaultValue = "true")
private Boolean autoFixPegging;
@Column(name="MAX_PRODUCT_BATCH")
@ -80,6 +85,7 @@ public class Material extends BaseCode {
@Column(name="MIN_PRODUCT_BATCH")
@ApiParam(value ="最小制造批量")
@FieldAnnotation(defaultValue = "0.0")
private Double minProductBatch;
@Column(name="UNIT_PRODUCT_BATCH")

@ -59,6 +59,10 @@ public class OperResource extends BaseAPS {
@ApiParam(value ="优先级")
private Integer priority;
@Column(name="USER_MATCH_NUMBER")
@ApiParam(value ="资源使用配套号")
private String userMatchNumber;
@Column(name="OPERATION_ID")
@ApiParam(value ="工序")
@FieldAnnotation(property = false)

@ -1,6 +1,9 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.common.BaseAPS;
import cn.estsh.i3plus.pojo.aps.common.BeanRelation;
import cn.estsh.i3plus.pojo.aps.holders.EResCalendar;
import com.fasterxml.jackson.annotation.JsonBackReference;
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 :
@ -40,4 +44,14 @@ public class ResCalendar extends BaseAPS {
@Column(name="PRIORITY")
@ApiParam(value ="优先级")
private Integer priority;
@JsonBackReference
public List<DayShift> getDayShifts() {
return BeanRelation.list(this, EResCalendar.DayShifts);
}
@JsonBackReference
public List<Resource> getResources() {
return BeanRelation.list(this, EResCalendar.Resources);
}
}

@ -184,4 +184,6 @@ public class Work extends BaseCode {
public List<PlanFeedback> getPlanFeedbacks() {
return BeanRelation.list(this, EWork.PlanFeedbacks);
}
public WorkPlan getWorkPlan() { return BeanRelation.get(this, EWork.WorkPlan); }
}

@ -0,0 +1,63 @@
package cn.estsh.i3plus.pojo.aps.bean;
import cn.estsh.i3plus.pojo.aps.common.BaseAPS;
import cn.estsh.i3plus.pojo.aps.common.BeanRelation;
import cn.estsh.i3plus.pojo.aps.holders.EWorkPlan;
import cn.estsh.i3plus.pojo.aps.holders.EWorkRelation;
import io.swagger.annotations.Api;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-10-17
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="APS_WORK_PLAN")
@Api("工作计划")
public class WorkPlan extends BaseAPS {
private Date prevSetStart;
private Date prevSetEnd;
private String prevSetTime;
private Date produceStart;
private Date produceEnd;
private String produceTime;
private Date postSetStart;
private Date postSetEnd;
private String postSetTime;
private Date lockStart;
private Date lockEnd;
private String lockTime;
private Date edgeTime;
private Long workId;
private Long resourceId;
public Work getWork() { return BeanRelation.get(this, EWorkPlan.Work); }
public void setWork(Work work) {
this.workId = work != null ? work.getId() : 0l;
BeanRelation.set(this, EWorkPlan.Work, work);
}
public Resource getResource() { return BeanRelation.get(this, EWorkPlan.Resource); }
public void setResource(Resource resource) {
this.resourceId = resource != null ? resource.getId() : 0l;
BeanRelation.set(this, EWorkPlan.Resource, resource);
}
}

@ -58,6 +58,10 @@ public class WorkResource extends BaseAPS {
@ApiParam(value ="最大后设置中断时间")
private String maxPostSdTime;
@Column(name="USER_MATCH_NUMBER")
@ApiParam(value ="资源使用配套号")
private String userMatchNumber;
@Column(name="WORK_ID")
@ApiParam(value ="工作")
@FieldAnnotation(property = false)

@ -1,6 +1,7 @@
package cn.estsh.i3plus.pojo.aps.common;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import javax.persistence.MappedSuperclass;
@ -18,6 +19,7 @@ import java.util.Map;
@Data
@MappedSuperclass
public abstract class BaseAPS extends BaseBean {
@JsonIgnore
private transient Map<String, Object> customFields = new HashMap<>();
public Object getCustomField(String code) {

@ -287,6 +287,9 @@ public class BeanInfo {
case STRING:
cls = String.class;
break;
case DURATION:
cls = DateDuration.class;
break;
default:
break;
}

@ -217,7 +217,7 @@ public class BeanRelation {
* @param bean
* @param holder
*/
private static void remove(BaseBean bean, Enum<?> holder) {
public static void remove(BaseBean bean, Enum<?> holder) {
if (bean == null || holder == null) {
return;
}
@ -241,7 +241,7 @@ public class BeanRelation {
* @param holder
* @param relaBean
*/
private static void remove(BaseBean bean, Enum<?> holder, BaseBean relaBean) {
public static void remove(BaseBean bean, Enum<?> holder, BaseBean relaBean) {
if (bean == null || holder == null) {
return;
}

@ -0,0 +1,22 @@
package cn.estsh.i3plus.pojo.aps.enums;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
public enum RESOURCE_CHOISE_RULE {
PREV_SET_TIME, // 前设置时间
PRODUCE_TIME, // 生产时间
POST_SET_TIME, // 后设置时间
WORK_WAIT_TIME, // 工作等待时间
RES_BALANCE, // 资源均衡度
SAME_MATERIAL, // 相同物料
SAME_ORDER, // 相同订单
NEARLY_WORK, // 前后工作
POST_RESOURCE, // 后资源制约
SAME_ASS_RESOURCE, // 相同副资源
RESOURCE_PRIORITY; // 资源优先级
}

@ -0,0 +1,32 @@
package cn.estsh.i3plus.pojo.aps.enums;
/**
* @Description :
* @Reference :
* @Author : jason.niu
* @CreateDate : 2019-09-17
* @Modify:
**/
public enum WORK_SORT_RULE {
NONE,
ORDER_LET, // 订单交货期
ORDER_PRIORITY, // 订单优先级
ORDER_EST, // 订单最早开始时刻
ORDER_COUNT, // 订单数量
ORDER_RECEIVE_DATE,// 订单接单日期
ORDER_LET_SUB_EST,// 订单交货期与订单最早开始时刻之差
ORDER_PRESSURE, // 订单紧迫程度
ORDER_SURPLUS, // 订单余裕度
NOPLAN_OPERATION_SIZE,// 残留工序数
REMAIN_PRODUCE_TIME, // 残留生产时间
MIN_OPERATION_REMAIN_TIME,// 最小工序宽裕时间
WORK_LET, // 工作最晚结束时刻
WORK_EST, // 工作最早开始时刻
INVENTORY_RELA, // 订单物品库存量相对值
FIRST_WORK_BEGIN,// 订单首工作上次开始时刻
HAVE_HIGH_WORK, // 订单中含有高级别工作
WORK_RESOURCE_SIZE, // 工作的可用资源数
TOP_ORDER_LET,// 顶层订单的交货期
TOP_ORDER_CODE, // 顶层订单代码
TOP_ORDER_PRIORITY; // 顶层订单优先级
}

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

@ -1,13 +1,14 @@
package cn.estsh.i3plus.pojo.aps.holders;
public enum EWork {
Order,
ParentWork,
WorkResources,
WorkInputs,
WorkOutputs,
PrevRelations,
PostRelations,
Operation,
PlanFeedbacks
Order, // 订单
ParentWork, // 父工作
WorkResources, // 工作资源
WorkInputs, // 工作输入
WorkOutputs, // 工作输出
PrevRelations, // 前关联
PostRelations, // 后关联
Operation, // 工序
PlanFeedbacks, // 工作计划反馈
WorkPlan // 关联的为主资源的计划
}

@ -0,0 +1,7 @@
package cn.estsh.i3plus.pojo.aps.holders;
public enum EWorkPlan {
Work,
Resource,
AssPlans // 关联的为副资源的工作计划
}

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

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

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<Class name="WorkInput">
<Relation field="WorkRelations" name="WorkRelation" reverse="WorkInput" type="ONE_TO_MULTI" owner="true">
</Relation>
<Relation field="Material" name="Material" reverse="WorkInputs" type="MULTI_TO_ONE" owner="false">
</Relation>
<Relation field="OperInput" name="OperInput" reverse="WorkInputs" type="MULTI_TO_ONE" owner="false">
</Relation>
<Relation field="WorkRelations" name="WorkRelation" reverse="WorkInput" type="ONE_TO_MULTI" owner="true">
</Relation>
<Relation field="Material" name="Material" reverse="WorkInputs" type="MULTI_TO_ONE" owner="false">
</Relation>
<Relation field="OperInput" name="OperInput" reverse="WorkInputs" type="MULTI_TO_ONE" owner="false">
</Relation>
</Class>

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<Class name="WorkPlan">
<Relation field="Work" name="Work" reverse="WorkPlan" type="ONE_TO_ONE" owner="true">
</Relation>
<Relation field="Resource" name="Resource" type="MULTI_TO_ONE" owner="false">
</Relation>
<Relation field="AssPlans" name="WorkPlan" type="ONE_TO_MULTI" owner="false">
</Relation>
</Class>

@ -1,7 +1,7 @@
package cn.estsh.i3plus.pojo.mes.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import cn.estsh.i3plus.pojo.mes.model.MesWorkOrderButtonModel;
import cn.estsh.i3plus.pojo.mes.model.MesButtonFlagModel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
@ -201,7 +201,7 @@ public class MesWorkOrder extends BaseBean {
@Transient
@ApiParam("mes生产工单页面按钮控制")
private MesWorkOrderButtonModel workOrderButtonModel;
private MesButtonFlagModel workOrderButtonModel;
@Transient
@ApiParam(value = "下达按钮编号")

@ -1,7 +1,6 @@
package cn.estsh.i3plus.pojo.mes.bean;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import cn.estsh.i3plus.pojo.mes.model.MesWorkOrderButtonModel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;

@ -17,8 +17,8 @@ import java.io.Serializable;
@Data
@NoArgsConstructor
@AllArgsConstructor
@Api("mes生产工单页面按钮控制model")
public class MesWorkOrderButtonModel implements Serializable {
@Api("mes页面按钮控制model")
public class MesButtonFlagModel implements Serializable {
@ApiParam("修改按钮")
private boolean updateButton;
@ -47,5 +47,8 @@ public class MesWorkOrderButtonModel implements Serializable {
@ApiParam("完成按钮")
private boolean completeButton;
@ApiParam("关闭按钮-提醒")
private boolean closeButtonNoticeFlag;
}

@ -70,6 +70,9 @@ public class MesEquTaskModel implements Serializable {
@ApiParam("通知标识")
private String notifyFlagName;
@ApiParam("mes设备作业任务页面按钮控制")
private MesButtonFlagModel equTaskButtonFlagModel;
public MesEquTaskModel() {

@ -149,12 +149,23 @@ public class WmsCSFactTrans extends BaseBean {
this.srcZoneNo = srcZoneNo;
this.srcWhNo = srcWhNo;
}
public WmsCSFactTrans(String partNo,String partNameRdd,String unit, String orderNo, String organizeCode,double qty) {
this.partNo=partNo;
this.partNameRdd = partNameRdd;
this.unit = unit;
this.orderNo = orderNo;
this.organizeCode = organizeCode;
this.qty=qty;
}
public WmsCSFactTrans(Long countBoxQty,Double sumPartQty,String zoneNo, String partNo, String partNameRdd) {
this.countBoxQty = countBoxQty;
this.sumPartQty = sumPartQty;
this.zoneNo = zoneNo;
this.partNo = partNo;
this.partNameRdd = partNameRdd;
}
}

@ -178,4 +178,12 @@ public class WmsCSOrderDetails extends BaseBean {
this.organizeCode = organizeCode;
this.transStatus = transStatus;
}
public WmsCSOrderDetails(String partNo,String partNameRdd,String unit, String orderNo, String organizeCode,double qty) {
this.partNo=partNo;
this.partNameRdd = partNameRdd;
this.unit = unit;
this.orderNo = orderNo;
this.organizeCode = organizeCode;
this.qty=qty;
}
}

Loading…
Cancel
Save