Skip to content

Commit

Permalink
remove references to census snapshot code
Browse files Browse the repository at this point in the history
  • Loading branch information
jaroldwong committed May 23, 2024
1 parent 1c53dcb commit 8855c62
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public BudgetScenarioExcelView createBudgetScenarioExcelView(BudgetScenario budg
List<DwCensus> censusList = new ArrayList<>();
for (String budgetScenarioSubjectCode : budgetScenarioSubjectCodes) {
for (String budgetScenarioTermCode : budgetScenarioTermCodes) {
censusList.addAll(dwRepository.getCensusBySubjectCodeAndTermCode(budgetScenarioSubjectCode, budgetScenarioTermCode).stream().filter(c -> "CURRENT".equals(c.getSnapshotCode())).collect(Collectors.toList()));
censusList.addAll(dwRepository.getCensusBySubjectCodeAndTermCode(budgetScenarioSubjectCode, budgetScenarioTermCode));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ public Map<String, Map<String, Long>> generateCourseCensusMap(List<Course> cours
}

List<DwCensus> censusList =
courseCensusFutures.stream().map(CompletableFuture::join).flatMap(Collection::stream)
.filter(c -> "CURRENT".equals(c.getSnapshotCode())).collect(Collectors.toList());
courseCensusFutures.stream().map(CompletableFuture::join).flatMap(Collection::stream).toList();

Map<String, Map<String, Long>> censusMap = new HashMap<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,9 @@ public List<WorkloadAssignment> generateWorkloadAssignments(long workgroupId, lo
}

List<DwCensus> termCodeCensus =
termCodeCensusFutures.stream().map(CompletableFuture::join).flatMap(Collection::stream)
.filter(c -> "CURRENT".equals(c.getSnapshotCode())).collect(Collectors.toList());
termCodeCensusFutures.stream().map(CompletableFuture::join).flatMap(Collection::stream).toList();
List<DwCensus> courseCensus =
courseCensusFutures.stream().map(CompletableFuture::join).flatMap(Collection::stream)
.filter(c -> "CURRENT".equals(c.getSnapshotCode())).collect(Collectors.toList());
courseCensusFutures.stream().map(CompletableFuture::join).flatMap(Collection::stream).toList();

Map<String, Map<String, Long>> termCodeCensusMap = generateCensusMap(termCodeCensus);
Map<String, Map<String, Long>> courseCensusMap = generateCensusMap(courseCensus);
Expand Down

0 comments on commit 8855c62

Please sign in to comment.