修改资源甘特图侧边栏显示内容

yun-zuoyi
钮海涛 5 years ago
parent 1cc4cacb5f
commit 2eb244c41c

@ -36,12 +36,12 @@ import java.util.List;
public class Work extends BaseAPS {
@Column(name="CODE")
@ApiParam(value ="编码")
@FieldAnnotation(popSearch = true, mainkey = true)
@FieldAnnotation(popSearch = true, mainkey = true, modify = false)
private String code;
@Column(name="ORDER_ID")
@ApiParam(value ="订单")
@FieldAnnotation(relation = "Order")
@FieldAnnotation(relation = "Order", modify = false)
private Long orderId;
@Column(name="WORK_TYPE")
@ -77,9 +77,10 @@ public class Work extends BaseAPS {
@ApiParam(value ="指定数量")
private Double specifyCount;
@Column(name="SPECIFY_RESOURCE")
@ApiParam(value ="指定资源")
private String specifyResource;
@Column(name="SPECIFY_RESOURCE_ID")
@ApiParam(value ="指定主资源")
@FieldAnnotation(relation = "SpecifyResource")
private Long specifyResourceId;
@Column(name="SPECIFY_PRODUCE_TIME")
@ApiParam(value ="指定制造时间")
@ -223,4 +224,13 @@ public class Work extends BaseAPS {
@JsonBackReference
public List<WorkPlan> getWorkPlans() { return BeanRelation.list(this, EWork.WorkPlans); }
public Resource getSpecifyResource() {
return BeanRelation.get(this, EWork.SpecifyResource);
}
public void setSpecifyResource(Resource resource) {
this.specifyResourceId = resource != null ? resource.getId() : 0;
BeanRelation.set(this, EWork.SpecifyResource, resource);
}
}

@ -113,6 +113,11 @@ public class WorkPlan extends BaseAPS {
@FieldAnnotation(modify = false, editType = ApsEnumUtil.EDIT_TYPE.DURATION)
private Integer lockTime;
@Column(name="FORCE_POST_SET_ZERO")
@ApiParam(value ="是否将后设置时间强制设置成0")
@FieldAnnotation(property = false)
private Boolean forcePostSetZero;
@Column(name="WORK_RESOURCE_ID")
@ApiParam(value ="工作资源对象id")
@FieldAnnotation(property = false)

@ -30,27 +30,27 @@ public class WorkRelation extends BaseAPS {
@Column(name="MATERIAL_ID")
@ApiParam(value ="物料")
@FieldAnnotation(relation = "Material")
@FieldAnnotation(relation = "Material", modify = false)
private Long materialId;
@Column(name="PREV_ORDER_ID")
@ApiParam(value ="前订单")
@FieldAnnotation(relation = "PrevOrder")
@FieldAnnotation(relation = "PrevOrder", modify = false)
private Long prevOrderId;
@Column(name="POST_ORDER_ID")
@ApiParam(value ="后订单")
@FieldAnnotation(relation = "PostOrder")
@FieldAnnotation(relation = "PostOrder", modify = false)
private Long postOrderId;
@Column(name="PREV_WORK_ID")
@ApiParam(value ="前工作")
@FieldAnnotation(relation = "PrevWork")
@FieldAnnotation(relation = "PrevWork", modify = false)
private Long prevWorkId;
@Column(name="POST_WORK_ID")
@ApiParam(value ="后工作")
@FieldAnnotation(relation = "PostWork")
@FieldAnnotation(relation = "PostWork", modify = false)
private Long postWorkId;
@Column(name="COUNT", columnDefinition = "decimal(18,8)")

@ -12,4 +12,5 @@ public enum EWork {
PlanFeedbacks, // 工作计划反馈
MainPlan, // 关联的为主资源的计划
WorkPlans, // 关联的工作计划
SpecifyResource, // 指定资源
}

@ -18,4 +18,6 @@
</Relation>
<Relation field="PlanFeedbacks" name="PlanFeedback" reverse="Work" type="ONE_TO_MULTI" owner="true">
</Relation>
<Relation field="SpecifyResource" name="Resource" type="MULTI_TO_ONE">
</Relation>
</Class>
Loading…
Cancel
Save