feat(导入到sap): 修复设置导入sap状态的bug

This commit is contained in:
曹鹏飞 2024-05-09 08:15:17 +08:00
parent a7c1b74272
commit 4251feac9b
2 changed files with 5 additions and 3 deletions

View File

@ -405,6 +405,7 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
child.setCurrentVersion(OriginalConstant.DEFAULT_BOM_VERSION); child.setCurrentVersion(OriginalConstant.DEFAULT_BOM_VERSION);
} }
} }
child.setChildBomRowId(child.getRowId());
} }
} }
} }
@ -965,7 +966,7 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
private void updateSapState(Long rootBomRowId, SapStatusEnum sapState) { private void updateSapState(Long rootBomRowId, SapStatusEnum sapState) {
lambdaUpdate().eq(BomNewEbomParentEntity::getRowId, rootBomRowId) lambdaUpdate().eq(BomNewEbomParentEntity::getRowId, rootBomRowId)
.set(BomNewEbomParentEntity::getSapTime, LocalDateTime.now()) .set(BomNewEbomParentEntity::getSapTime, LocalDateTime.now())
.set(BomNewEbomParentEntity::getSapState, sapState) .set(BomNewEbomParentEntity::getSapState, sapState.getValue())
.update(); .update();
} }
@ -1566,7 +1567,8 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
parentVO.setBomRowId(parentVO.getRowId()); parentVO.setBomRowId(parentVO.getRowId());
parentVO.setProjectType(projectType); parentVO.setProjectType(projectType);
parentVO.setParentRowId(0l); parentVO.setParentRowId(0L);
parentVO.setChildBomRowId(rowId);
materialMainService.intiMaterialInfo(ImmutableList.of(parentVO), EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT2); materialMainService.intiMaterialInfo(ImmutableList.of(parentVO), EBomConstant.EBOM_IGNORED_FIELDS_INIT_MATERIAL_DEFAULT2);
vo.setDatas(getChild(bomRowId)); vo.setDatas(getChild(bomRowId));
} }

View File

@ -319,7 +319,7 @@ public class BomNewMbomParentService extends ServiceImpl<BomNewMbomParentMapper,
private void updateSapState(Long rootBomRowId, SapStatusEnum sapState) { private void updateSapState(Long rootBomRowId, SapStatusEnum sapState) {
lambdaUpdate().eq(BomNewMbomParentEntity::getRowId, rootBomRowId) lambdaUpdate().eq(BomNewMbomParentEntity::getRowId, rootBomRowId)
.set(BomNewMbomParentEntity::getSysnSapTime, LocalDateTime.now()) .set(BomNewMbomParentEntity::getSysnSapTime, LocalDateTime.now())
.set(BomNewMbomParentEntity::getStatus, sapState) .set(BomNewMbomParentEntity::getStatus, sapState.getValue())
.update(); .update();
} }
} }