修改导入功能

yun-zuoyi
钮海涛 4 years ago
parent 1ed47f1526
commit 1bc4c491b6

@ -5,6 +5,7 @@ import cn.estsh.i3plus.pojo.aps.annotation.MainKey;
import cn.estsh.i3plus.pojo.aps.annotation.RippleAnnotation;
import cn.estsh.i3plus.pojo.aps.common.BaseAPS;
import cn.estsh.i3plus.pojo.aps.common.BeanRelation;
import cn.estsh.i3plus.pojo.aps.holders.EBaseOrder;
import cn.estsh.i3plus.pojo.aps.holders.EMaterial;
import cn.estsh.i3plus.pojo.aps.validator.InsertGroup;
import cn.estsh.i3plus.pojo.aps.validator.UpdateGroup;
@ -60,6 +61,11 @@ public class Material extends BaseAPS {
@FieldAnnotation(defaultValue = "ONEBYONE")
private ApsEnumUtil.REPLENISHMENT_TYPE replType;
@Column(name="GROUP_ID")
@ApiParam(value ="物料组")
@FieldAnnotation(relation = "Material")
private Long groupId;
@Column(name="PURCHASE_LEAD_TIME")
@ApiParam(value ="采购提前期")
@FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.DURATION)
@ -151,6 +157,18 @@ public class Material extends BaseAPS {
@ApiParam(value ="标签颜色")
private String labelColor;
public Material getGroup() {
return BeanRelation.get(this, EMaterial.Group);
}
public void setGroup(Material material) {
this.groupId = material != null ? material.getId() : 0l;
BeanRelation.set(this, EMaterial.Group, material);
}
@JsonBackReference
public List<Material> getChilds() { return BeanRelation.list(this, EMaterial.Childs); }
@JsonBackReference
public List<ProductRouting> getProductRoutings() {
return BeanRelation.list(this, EMaterial.ProductRoutings);

@ -117,16 +117,6 @@ public class Resource extends BaseAPS {
@FieldAnnotation(multiEnumClass = ApsEnumUtil.EFFICIENCY_EFFECT.class)
private Integer timeTailRound;
@Column(name="LOCK_TYPE")
@ApiParam(value ="锁定类型")
@FieldAnnotation(defaultValue = "NONE")
private ApsEnumUtil.RESOURCE_LOCK_TYPE lockType;
@Column(name="LOCK_TIME")
@ApiParam(value ="锁定时间长度")
@FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.DURATION)
private String lockTime;
@ApiParam(value ="是否存在任务冲突")
@FieldAnnotation(property = false)
@Transient

@ -65,9 +65,4 @@ public class StandOperation extends BaseAPS {
@ApiParam(value ="生产组合方式")
@FieldAnnotation(defaultValue = "MAX_ALL_RESOURCE")
private ApsEnumUtil.RES_COMB_TIME_TYPE combType;
@Column(name="LOCK_TYPE")
@ApiParam(value ="锁定组合方式")
@FieldAnnotation(defaultValue = "MAX_ALL_RESOURCE")
private ApsEnumUtil.RES_COMB_LOCK_TYPE lockType;
}

@ -99,22 +99,6 @@ public class WorkPlan extends BaseAPS {
@FieldAnnotation(modify = false, editType = ApsEnumUtil.EDIT_TYPE.DURATION)
private Integer postSetTime;
@Column(name="LOCK_BEGIN")
@ApiParam(value ="锁定开始时间")
@FieldAnnotation(modify = false)
@RippleAnnotation(dependence = {"MainWork.PostRelations.PostWork.MainPlan.produceBegin", "produceBegin"}, method = "calcPositiveLock")
private Date lockBegin;
@Column(name="LOCK_END")
@ApiParam(value ="锁定结束时间")
@FieldAnnotation(modify = false)
private Date lockEnd;
@Column(name="LOCK_TIME")
@ApiParam(value ="锁定时间")
@FieldAnnotation(modify = false, editType = ApsEnumUtil.EDIT_TYPE.DURATION)
private Integer lockTime;
@Column(name="FORCE_POST_SET_ZERO")
@ApiParam(value ="是否将后设置时间强制设置成0")
@FieldAnnotation(property = false)

@ -1,6 +1,8 @@
package cn.estsh.i3plus.pojo.aps.holders;
public enum EMaterial {
Group,
Childs,
ProductRoutings,
OperInputs,
OperOutputs,

@ -2,4 +2,6 @@
<Class name="Material">
<Relation field="ProductRoutings" name="ProductRouting" reverse="Material" type="ONE_TO_MULTI" owner="true">
</Relation>
<Relation field="Childs" name="Material" reverse="Group" type="ONE_TO_MULTI" owner="false">
</Relation>
</Class>

@ -471,32 +471,6 @@ public class ApsEnumUtil {
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum RES_COMB_LOCK_TYPE {
KEEP_ORIGIN("KEEP_ORIGIN", "各自锁定"),
MAIN_LOCK("MAIN_LOCK", "主资源锁定"),
MAX_ALL_RESOURCE("MAX_ALL_RESOURCE", "最大锁定时间");
private String value;
private String description;
RES_COMB_LOCK_TYPE(String value, String description) {
this.value = value;
this.description = description;
}
public String getValue() {
return value;
}
public String getDescription() {
return description;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
@ -958,8 +932,7 @@ public class ApsEnumUtil {
public enum PLAN_TYPE {
PREV_SET("", "前设置"),
PRODUCE("", "生产"),
POST_SET("", "后设置"),
LOCK("", "锁定");
POST_SET("", "后设置");
private String value;
private String description;

Loading…
Cancel
Save