optimize(ebom): 从excel导入时,将本人以前导入的草稿数据中的顶级设置为非顶级
This commit is contained in:
parent
6eee207e29
commit
7357e70ce7
|
|
@ -118,6 +118,17 @@ public class EBomImportService {
|
|||
});
|
||||
bomNewEbomParentService.setLastVersionIs0(oldParents.stream().map(BomNewEbomParentEntity::getRowId).collect(Collectors.toList()));
|
||||
}
|
||||
//取消本人以前导入的,草稿状态的bom的顶级状态
|
||||
Set<String> materialNos = children.stream().map(BomNewEbomChildEntity::getMaterialNo).collect(Collectors.toSet());
|
||||
bomNewEbomParentService.lambdaUpdate()
|
||||
.set(BomNewEbomParentEntity::getRootIs, 0)
|
||||
.set(BomNewEbomParentEntity::getUserRootIs, 0)
|
||||
.set(BomNewEbomParentEntity::getRootIsForWaitReview, 0)
|
||||
.in(BomNewEbomParentEntity::getMaterialNo, materialNos)
|
||||
.lt(BomNewEbomParentEntity::getStatus, EBomStatusEnum.PUBLISHED.getValue())
|
||||
.eq(BomNewEbomParentEntity::getCreatedBy, SessionUtil.getUserCode())
|
||||
.update();
|
||||
|
||||
bomNewEbomParentService.saveBatch(parents);
|
||||
bomNewEbomChildService.saveBatch(children);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue