Переглянути джерело

历史版本 优化

tags/24080901
PoffyZhang 1 рік тому
джерело
коміт
849b210de7
1 змінених файлів з 21 додано та 17 видалено
  1. +21
    -17
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java

+ 21
- 17
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java Переглянути файл

@@ -264,14 +264,16 @@ public class ProjectLibManage {
List<Long> applicationIds = applications.stream().map(ProjectApplication::getId).collect(Collectors.toList());

//核心业务
List<ProjectCoreBusinessIndicators> coreBizs = projectCoreBusinessIndicatorsService.list(Wrappers.lambdaQuery(ProjectCoreBusinessIndicators.class)
.in(ProjectCoreBusinessIndicators::getApplicationId, applicationIds));
Map<Long,List<ProjectCoreBusinessIndicators>> coreBizMap = coreBizs.stream().collect(Collectors.groupingBy(ProjectCoreBusinessIndicators::getApplicationId));

Optional.ofNullable(applications).ifPresent(apps ->
vo.setProjectApplications(CollUtils.convert(apps,
app -> ProjectHelper.convertVOWithMap(app,coreBizMap))
));
if(CollUtil.isNotEmpty(applicationIds)){
List<ProjectCoreBusinessIndicators> coreBizs = projectCoreBusinessIndicatorsService.list(Wrappers.lambdaQuery(ProjectCoreBusinessIndicators.class)
.in(ProjectCoreBusinessIndicators::getApplicationId, applicationIds));
Map<Long,List<ProjectCoreBusinessIndicators>> coreBizMap = coreBizs.stream().collect(Collectors.groupingBy(ProjectCoreBusinessIndicators::getApplicationId));

Optional.ofNullable(applications).ifPresent(apps ->
vo.setProjectApplications(CollUtils.convert(apps,
app -> ProjectHelper.convertVOWithMap(app,coreBizMap))
));
}

List<Long> allVersionProjectId = projectService.getAllVersionProjectId(projectInfo);
//查询采购备案
@@ -384,15 +386,17 @@ public class ProjectLibManage {
List<Long> applicationIds = applications.stream().map(ProjectApplication::getId).collect(Collectors.toList());

//核心业务
List<ProjectCoreBusinessIndicators> coreBizs = projectCoreBusinessIndicatorsService.list(Wrappers.lambdaQuery(ProjectCoreBusinessIndicators.class)
.in(ProjectCoreBusinessIndicators::getApplicationId, applicationIds));
Map<Long,List<ProjectCoreBusinessIndicators>> coreBizMap = coreBizs.stream().collect(Collectors.groupingBy(ProjectCoreBusinessIndicators::getApplicationId));

Optional.ofNullable(applications).ifPresent(apps ->
vo.setProjectApplications(CollUtils.convert(apps,
app -> ProjectHelper.convertVOWithMap(app,coreBizMap))
));

if(CollUtil.isNotEmpty(applicationIds)){
List<ProjectCoreBusinessIndicators> coreBizs = projectCoreBusinessIndicatorsService.list(Wrappers.lambdaQuery(ProjectCoreBusinessIndicators.class)
.in(ProjectCoreBusinessIndicators::getApplicationId, applicationIds));
Map<Long,List<ProjectCoreBusinessIndicators>> coreBizMap = coreBizs.stream().collect(Collectors.groupingBy(ProjectCoreBusinessIndicators::getApplicationId));

Optional.ofNullable(applications).ifPresent(apps ->
vo.setProjectApplications(CollUtils.convert(apps,
app -> ProjectHelper.convertVOWithMap(app,coreBizMap))
));
}
//审批信息
ProcessDetailReq req = new ProcessDetailReq();
req.setInstanceId(projectInfo.getInstCode());


Завантаження…
Відмінити
Зберегти