认证清单关联平台件后,配置项展示平台件项目名称

This commit is contained in:
zhn
2023-09-26 17:11:55 +08:00
parent e6a55ed4cc
commit 7244fe0ab9
@@ -1957,6 +1957,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
}
for (ProjectCertificationInventoryEO certificationInventoryEO : result) {
if(!projectCertificationInventoryEOS.isEmpty()){
List<ProjectLibraryBase> projectLibraryBaseList = new ArrayList<>();
List<LawsInventoryPlatformEO> collect = lawsInventoryPlatformEOList.stream()
.filter(e -> certificationInventoryEO.getId().equals(e.getLawsInventoryId())).collect(Collectors.toList());
if(ObjectUtils.isNotEmpty(collect)){
@@ -1966,6 +1967,15 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
List<ProjectCertificationInventoryEO> inventoryEOList = projectCertificationInventoryEOS.stream()
.filter(e -> platformLawsInventoryIdList.contains(e.getId())).collect(Collectors.toList());
certificationInventoryEO.setProjectCertificationInventoryEOS(inventoryEOList);
if(ObjectUtils.isNotEmpty(inventoryEOList)){
List<String> projectLibraryIdList = inventoryEOList.stream()
.map(ProjectCertificationInventoryEO::getProjectLibraryId).distinct().collect(Collectors.toList());
LambdaQueryWrapper<ProjectLibraryBase> wrapper = new LambdaQueryWrapper<>();
wrapper.in(ProjectLibraryBase::getId,projectLibraryIdList);
projectLibraryBaseList = projectLibraryBaseService.list(wrapper);
}
}
@@ -1979,6 +1989,11 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl<Proj
if(!certificationInventoryEOS.isEmpty()){
setProjectCertificationInventoryEO(certificationInventoryEOS.get(0),certificationInventoryEO);
}
List<ProjectLibraryBase> libraryBaseList = projectLibraryBaseList.stream()
.filter(e -> certificationInventoryEOS.get(0).getProjectLibraryId().equals(e.getId())).collect(Collectors.toList());
if(ObjectUtils.isNotEmpty(libraryBaseList)){
certificationInventoryEO.setConfigItem(libraryBaseList.get(0).getProjectNameId());
}
}
}
}