1、替换草稿态的虚拟包

This commit is contained in:
大米 2024-06-28 14:49:25 +08:00
parent 0a7a745c28
commit b5a694ae5f
1 changed files with 6 additions and 4 deletions

View File

@ -84,16 +84,18 @@ public class BomNewEbomUpgradeChangeService extends ServiceImpl<BomNewEbomUpgrad
if (CollUtil.isNotEmpty(updateImpact.getPBomParentResult())) {
pbomParentService.saveOrUpdateBatch(updateImpact.getPBomParentResult());
//新加的移到历史表
List<Long> newPBomRowIds = updateImpact.getPBomParentResult().stream().map(u -> u.getRowId()).collect(Collectors.toList());
pbomParentService.getBaseMapper().insertPBomParentToFormal(newPBomRowIds);
pbomParentService.getBaseMapper().insertPBomChildToFormal(newPBomRowIds);
}
if (CollUtil.isNotEmpty(updateImpact.getPBomChildResult())) {
pbomChildService.saveOrUpdateBatch(updateImpact.getPBomChildResult());
}
//旧版PBOM移动到历史表中
if (CollUtil.isNotEmpty(updateImpact.getOldPBomList())) {
List<Long> oldPBomRowIds = updateImpact.getOldPBomList().stream().map(u -> u.getRowId()).collect(Collectors.toList());
pbomParentService.getBaseMapper().insertPBomParentToFormal(oldPBomRowIds);
pbomParentService.getBaseMapper().insertPBomChildToFormal(oldPBomRowIds);
pbomParentService.getBaseMapper().delPBom(oldPBomRowIds);
List<Long> oldPbomRowIds = updateImpact.getOldPBomList().stream().map(u -> u.getRowId()).collect(Collectors.toList());
pbomParentService.getBaseMapper().delPBom(oldPbomRowIds);
}
}
}