|
|
|
@ -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);
|
|
|
|
|
}
|
|
|
|
|