1、ebom,pbom 正式表保存所有正式版数据
This commit is contained in:
parent
ac9901a0a1
commit
1a459a6057
|
|
@ -913,7 +913,7 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
|||
ebomChildService.getBaseMapper().delBomChild(delParentBom);
|
||||
}
|
||||
}
|
||||
//需修改正式版版本的BOM
|
||||
//需修改正式版BOM的版本
|
||||
List<BomNewEbomParentVO> upVersionEBomParents = bomTree.stream().filter(u -> u.getHasChangeState().equals(2)).collect(Collectors.toList());
|
||||
if(CollUtil.isNotEmpty(upVersionEBomParents)){
|
||||
List<BomNewEbomParentEntity> upVersionList=new ArrayList<>();
|
||||
|
|
@ -2492,7 +2492,7 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
|||
|
||||
|
||||
/**
|
||||
* ebom发布时将历史正式版-移到正式表
|
||||
* ebom发布时将历史正式版-移到正式表(所有正式数据都会移到formal正式表中)
|
||||
* @param exceptRowIds
|
||||
*/
|
||||
private void eBomToFormal(List<Long> exceptRowIds, List<BomNewEbomParentVO> parents){
|
||||
|
|
@ -2502,8 +2502,11 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
|||
if(CollUtil.isNotEmpty(toParents)) {
|
||||
|
||||
List<Long> childParentRowIds = toParents.stream().map(u -> u.getRowId()).collect(Collectors.toList());
|
||||
this.getBaseMapper().insertEBomFormalParent(childParentRowIds);
|
||||
this.getBaseMapper().insertEBomFormalChild(childParentRowIds);
|
||||
List<Long> toFormalRowIds = new ArrayList<>();
|
||||
toFormalRowIds.addAll(exceptRowIds);
|
||||
toFormalRowIds.addAll(childParentRowIds);
|
||||
this.getBaseMapper().insertEBomFormalParent(toFormalRowIds);
|
||||
this.getBaseMapper().insertEBomFormalChild(toFormalRowIds);
|
||||
|
||||
//转移后删除
|
||||
this.getBaseMapper().delEBomHistory(childParentRowIds);
|
||||
|
|
|
|||
|
|
@ -1210,8 +1210,11 @@ public class BomNewPbomParentService extends ServiceImpl<BomNewPbomParentMapper,
|
|||
if(CollUtil.isNotEmpty(toParents)) {
|
||||
|
||||
List<Long> oldPBomRowIds = toParents.stream().map(u -> u.getRowId()).collect(Collectors.toList());
|
||||
this.getBaseMapper().insertPBomParentToFormal(oldPBomRowIds);
|
||||
this.getBaseMapper().insertPBomChildToFormal(oldPBomRowIds);
|
||||
List<Long> toFormalPBomRowIds = new ArrayList<>();
|
||||
toFormalPBomRowIds.addAll(exceptRowIds);
|
||||
toFormalPBomRowIds.addAll(oldPBomRowIds);
|
||||
this.getBaseMapper().insertPBomParentToFormal(toFormalPBomRowIds);
|
||||
this.getBaseMapper().insertPBomChildToFormal(toFormalPBomRowIds);
|
||||
|
||||
//转移后删除
|
||||
this.getBaseMapper().delPBom(oldPBomRowIds);
|
||||
|
|
|
|||
Loading…
Reference in New Issue