转pbom-报错修复

This commit is contained in:
大米 2024-09-13 17:12:41 +08:00
parent 2b08fb890d
commit dfaf9c402b
2 changed files with 2 additions and 2 deletions

View File

@ -189,7 +189,7 @@ public abstract class EBomToPbomBase {
//if (oldParent.getCreatedBy().equals(parentVo.getCreatedBy())) {
if (ConvertToPBomModelEnum.OVERRIDE.equalsValue(convertMode.getValue())) {
//当bom创建人为本人 版本大于当前版本则覆盖
if (oldParent.getCreatedBy().equals(parentVo.getCreatedBy()) || VersionUtil.compare(parentVo.getCurrentVersion(),oldParent.getCurrentVersion())>0){
if (oldParent.getCreatedBy().equals(parentVo.getCreatedBy()) || parentVo.getCurrentVersion()==null || VersionUtil.compare(parentVo.getCurrentVersion(),oldParent.getCurrentVersion())>0){
SpringUtil.getBean(BomNewPbomChildService.class).getBaseMapper().deleteByMap(ImmutableMap.of("parent_row_id", oldParent.getRowId()));
// this.delParentRowIds.add(oldParent.getRowId());
oldParent.setSourceRowId(parentVo.getBomRowId());

View File

@ -193,7 +193,7 @@ public abstract class FormalEBomToPbomBase {
else if (Objects.nonNull(oldParent) && oldParent.getStatus() < EBomStatusEnum.PUBLISHED.getValue()) {
//if (oldParent.getCreatedBy().equals(parentVo.getCreatedBy())) {
if (ConvertToPBomModelEnum.OVERRIDE.equalsValue(convertMode.getValue())) {
if (oldParent.getCreatedBy().equals(parentVo.getCreatedBy()) || VersionUtil.compare(parentVo.getCurrentVersion(),oldParent.getCurrentVersion())>0) {
if (oldParent.getCreatedBy().equals(parentVo.getCreatedBy()) || parentVo.getCurrentVersion()==null || VersionUtil.compare(parentVo.getCurrentVersion(),oldParent.getCurrentVersion())>0) {
SpringUtil.getBean(BomNewPbomChildService.class).getBaseMapper().deleteByMap(ImmutableMap.of("parent_row_id", oldParent.getRowId()));
oldParent.setSourceRowId(parentVo.getBomRowId());
oldParent.setCreatedTime(LocalDateTime.now());