parent
9f9874902d
commit
2dc63a9a4e
@ -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);
|
||||
}
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
package cn.estsh.i3plus.pojo.aps.enums;
|
||||
|
||||
public enum RESOURCE_CHOISE_RULE {
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package cn.estsh.i3plus.pojo.aps.enums;
|
||||
|
||||
/**
|
||||
* @Description :预置的工作排序规则
|
||||
* @Reference :
|
||||
* @Author : jason.niu
|
||||
* @CreateDate : 2019-09-17
|
||||
* @Modify:
|
||||
**/
|
||||
public enum WORK_SORT_RULE {
|
||||
NONE,
|
||||
ORDER_DELIVERY, // 订单交货期
|
||||
ORDER_PRIORITY, // 订单优先级
|
||||
ORDER_ESTSTART, // 订单最早开始时刻
|
||||
ORDER_COUNT, // 订单数量
|
||||
ORDER_RECEIVE_DATE,// 订单接单日期
|
||||
ORDER_LET_MINUS_EST,// 订单交货期与订单最早开始时刻之差
|
||||
ORDER_PRESSURE, // 订单紧迫程度
|
||||
ORDER_SURPLUS, // 订单余裕度
|
||||
REMAIN_OPERATION_COUNT,// 残留工序数
|
||||
REMAIN_PRODUCT, // 残留生产时间
|
||||
MINSTE_PREMAIN,// 最小工序宽裕时间
|
||||
WORK_LET, // 工作最晚结束时刻
|
||||
WORK_EST, // 工作最早开始时刻
|
||||
ORDER_STOCK_RELA, // 订单物品库存量相对值
|
||||
ORDER_FIRST_WORK_START,// 订单首工作上次开始时刻
|
||||
HAVE_HIGH_WORK, // 订单中含有高级别工作
|
||||
WORK_RESOURCE_COUNT, // 工作的可用资源数
|
||||
WORK_SCHED_APPROX,// 与已排工作近视度
|
||||
TOP_ORDER_DELIVERY;// 顶层订单的交货期
|
||||
}
|
@ -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>
|
Loading…
Reference in New Issue