Merge branch 'refs/heads/feature/DM/nflg-bom' into feature/DM/nflg-bom-transition
This commit is contained in:
commit
31b9415de7
|
|
@ -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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue