Skip to content

Commit

Permalink
EP-4672-3 (#1573)
Browse files Browse the repository at this point in the history
  • Loading branch information
oplekal authored Feb 17, 2025
1 parent 2278de8 commit 230ba95
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import java.util.Objects;
import java.util.Set;
import java.util.TreeSet;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;

Expand Down Expand Up @@ -195,14 +196,15 @@ private List<PerusteenMuutostietoDto> filterTapahtumat(List<PerusteenMuokkaustie
List<PerusteenMuokkaustietoDto> finalPaivitykset = paivitykset.stream()
.filter(tieto -> poistot.stream().noneMatch(poisto -> poisto.getKohdeId().equals(tieto.getKohdeId()))
&& luonnit.stream().noneMatch(luonti -> luonti.getKohdeId().equals(tieto.getKohdeId())))
.collect(Collectors.toList());
.collect(Collectors.toMap(PerusteenMuokkaustietoDto::getKohdeId, Function.identity(), (existing, replacement) -> existing))
.values().stream().toList();

// listataan kaikkien filtteröityjen tapahtumien kohteet
List<NavigationType> navTypes = Stream.of(finalPoistot, finalLuonnit, finalPaivitykset)
.flatMap(Collection::stream)
.map(PerusteenMuokkaustietoDto::getKohde)
.distinct()
.collect(Collectors.toList());
.toList();

List<PerusteenMuutostietoDto> tyypinmukaan = new ArrayList<>();

Expand Down

0 comments on commit 230ba95

Please sign in to comment.