修改枚举

yun-zuoyi
钮海涛 4 years ago
parent b396d9cfd9
commit 99b43a6677

@ -44,6 +44,10 @@ public class InsertedOrder extends BaseOrder {
@FieldAnnotation(property = false)
private Long productRoutingId;
@Column(name="FINISH_COUNT")
@ApiParam(value ="完工数")
private Double finishCount;
@Column(name="REMARK")
@ApiParam(value ="备注")
private String remark;

@ -98,6 +98,10 @@ public class ProductOrder extends BaseOrder {
@FieldAnnotation(defaultValue = "false", display = false)
private Boolean autoSupply;
@Column(name="FINISH_COUNT")
@ApiParam(value ="完工数")
private Double finishCount;
@Column(name="PRODUCT_ROUTING_ID")
@ApiParam(value ="工艺路线")
@FieldAnnotation(property = false)

@ -41,6 +41,10 @@ public class SafeStockOrder extends BaseOrder {
@FieldAnnotation(relation = "Inventory", notEmpty = true)
private Long inventoryId;
@Column(name="FINISH_COUNT")
@ApiParam(value ="完工数")
private Double finishCount;
@JsonIgnore
public Work getWork() {
return BeanRelation.get(this, EBaseOrder.Works);

@ -5,6 +5,7 @@ import cn.estsh.i3plus.pojo.aps.annotation.MainKey;
import cn.estsh.i3plus.pojo.aps.common.BaseAPS;
import cn.estsh.i3plus.pojo.aps.common.BeanRelation;
import cn.estsh.i3plus.pojo.aps.holders.EWork;
import cn.estsh.i3plus.pojo.aps.tool.APSDoubleTool;
import cn.estsh.i3plus.pojo.aps.validator.InsertGroup;
import cn.estsh.i3plus.pojo.aps.validator.UpdateGroup;
import cn.estsh.i3plus.pojo.base.enumutil.ApsEnumUtil;
@ -242,4 +243,11 @@ public class Work extends BaseAPS {
this.specifyResourceId = resource != null ? resource.getId() : 0;
BeanRelation.set(this, EWork.SpecifyResource, resource);
}
public double getWorkCount() {
if (!APSDoubleTool.isZero(getSpecifyCount())) {
return getSpecifyCount();
}
return getCount();
}
}

@ -0,0 +1,7 @@
package cn.estsh.i3plus.pojo.aps.tool;
public class APSDoubleTool {
public static boolean isZero(Double value) {
return (value == null) || (value > -0.000001 && value < 0.000001);
}
}
Loading…
Cancel
Save