四车间问题修复

yun-zuoyi
钮海涛 4 years ago
parent 3d4a0e0bb9
commit 0cf4d5742d

@ -5,6 +5,7 @@ import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.aps.common.BaseAPS;
import cn.estsh.i3plus.pojo.aps.common.BeanRelation;
import cn.estsh.i3plus.pojo.aps.holders.EParentWork;
import cn.estsh.i3plus.pojo.aps.tool.APSDoubleTool;
import com.fasterxml.jackson.annotation.JsonBackReference;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
@ -43,6 +44,11 @@ public class ParentWork extends BaseAPS {
@FieldAnnotation(property = false)
private Integer serialNumber = 0;
@Column(name="NEW_SERIAL")
@ApiParam(value ="拆分工作流水号")
@FieldAnnotation(property = false)
private Boolean newSerial = false;
@Column(name="PRODUCT_ORDER_ID")
@ApiParam(value ="订单")
@FieldAnnotation(property = false)
@ -53,6 +59,28 @@ public class ParentWork extends BaseAPS {
@FieldAnnotation(property = false)
private Long operationId;
public int getCodeNumber() {
for (int bitIndex = 0; bitIndex < 10; ++bitIndex) {
int value = 1 << bitIndex;
if ((this.serialNumber & value) == 0) {
this.serialNumber |= value;
newSerial = true;
return bitIndex;
}
}
return 0;
}
public void recoverNumber(int value) {
if (newSerial == null || !newSerial) {
return;
}
value = ~(1 << value);
this.serialNumber &= value;
}
public BaseOrder getProductOrder() {
return BeanRelation.get(this, EParentWork.ProductOrder);
}

@ -1179,14 +1179,15 @@ public class ApsEnumUtil {
public enum SANLUX_OPERATION_TYPE {
NORMAL("NORMAL", "正常工序"),
FOUR_SULFIDATION("FOUR_SULFIDATION", "四车间硫化"),
FOUR_TRAINBEARER("FOUR_TRAINBEARER", "四车间牵纱"),
FOUR_TRAINBEARER("FOUR_TRAINBEARER", "四车间自动牵纱"),
FOUR_COATING("FOUR_COATING", "四车间覆胶"),
FOUR_WRAPPING("FOUR_WRAPPING", "四车间包布"),
TWO_SULFIDATION("TWO_SULFIDATION", "二车间硫化"),
TWO_MOLDING("TWO_MOLDING", "二车间成型"),
TWO_COATING("TWO_COATING", "二车间覆胶"),
TWO_WRAPPING("TWO_WRAPPING", "二车间包布"),
TWO_TRAINBEARER("TWO_TRAINBEARER", "二车间牵纱");
TWO_TRAINBEARER("TWO_TRAINBEARER", "二车间牵纱"),
FOUR_MANUF_TRAINBEARER("FOUR_MANUF_TRAINBEARER", "四车间手动牵纱");
private final String value;
private final String description;

Loading…
Cancel
Save