Merge branch 'refs/heads/feature/DM/nflg-bom' into feature/DM/nflg-bom-transition

This commit is contained in:
曹鹏飞 2024-06-28 14:52:10 +08:00
commit 31b9415de7
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())) { if (CollUtil.isNotEmpty(updateImpact.getPBomParentResult())) {
pbomParentService.saveOrUpdateBatch(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())) { if (CollUtil.isNotEmpty(updateImpact.getPBomChildResult())) {
pbomChildService.saveOrUpdateBatch(updateImpact.getPBomChildResult()); pbomChildService.saveOrUpdateBatch(updateImpact.getPBomChildResult());
} }
//旧版PBOM移动到历史表中 //旧版PBOM移动到历史表中
if (CollUtil.isNotEmpty(updateImpact.getOldPBomList())) { if (CollUtil.isNotEmpty(updateImpact.getOldPBomList())) {
List<Long> oldPBomRowIds = updateImpact.getOldPBomList().stream().map(u -> u.getRowId()).collect(Collectors.toList()); List<Long> oldPbomRowIds = updateImpact.getOldPBomList().stream().map(u -> u.getRowId()).collect(Collectors.toList());
pbomParentService.getBaseMapper().insertPBomParentToFormal(oldPBomRowIds); pbomParentService.getBaseMapper().delPBom(oldPbomRowIds);
pbomParentService.getBaseMapper().insertPBomChildToFormal(oldPBomRowIds);
pbomParentService.getBaseMapper().delPBom(oldPBomRowIds);
} }
} }
} }