EBOM在草稿状态下多次编辑的时候会出现版本增加的情况,这是不应该的。
This commit is contained in:
parent
e9875cac3c
commit
fe7507e819
|
|
@ -42,6 +42,8 @@ public class EBomEdit {
|
||||||
private BomNewEbomParentEntity parentEntity;
|
private BomNewEbomParentEntity parentEntity;
|
||||||
@Getter
|
@Getter
|
||||||
private boolean isRootForWaitReview=false;
|
private boolean isRootForWaitReview=false;
|
||||||
|
@Getter
|
||||||
|
private boolean isNewBom=false;
|
||||||
|
|
||||||
public List<BomNewEbomChildEntity> childEntities;
|
public List<BomNewEbomChildEntity> childEntities;
|
||||||
|
|
||||||
|
|
@ -91,6 +93,7 @@ public class EBomEdit {
|
||||||
isRootForWaitReview=true;
|
isRootForWaitReview=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isNewBom=true;
|
||||||
parent.setCreatedTime(LocalDateTime.now());
|
parent.setCreatedTime(LocalDateTime.now());
|
||||||
parent.setModifyTime(LocalDateTime.now());
|
parent.setModifyTime(LocalDateTime.now());
|
||||||
|
|
||||||
|
|
@ -335,6 +338,11 @@ public class EBomEdit {
|
||||||
|
|
||||||
|
|
||||||
public void nextVersion(){
|
public void nextVersion(){
|
||||||
|
|
||||||
|
if(!isNewBom){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//缺bom,新建的bom 版本增加
|
||||||
//同一物料且存在一个 lastVersionIs=1
|
//同一物料且存在一个 lastVersionIs=1
|
||||||
if(ObjectUtil.isNotNull(getParentEntity().getLastVersionIs())
|
if(ObjectUtil.isNotNull(getParentEntity().getLastVersionIs())
|
||||||
&& ObjectUtil.equal(getParentEntity().getLastVersionIs(),1)) {
|
&& ObjectUtil.equal(getParentEntity().getLastVersionIs(),1)) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue