diff --git a/apps/backend/src/main/java/no/nav/data/integration/behandling/BehandlingService.java b/apps/backend/src/main/java/no/nav/data/integration/behandling/BehandlingService.java index 24fa8dd36..2df5298c5 100644 --- a/apps/backend/src/main/java/no/nav/data/integration/behandling/BehandlingService.java +++ b/apps/backend/src/main/java/no/nav/data/integration/behandling/BehandlingService.java @@ -9,6 +9,7 @@ import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; +import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Map; @@ -28,7 +29,18 @@ public Behandling getBehandling(String id) { if (process == null) { return null; } - return process.convertToBehandling(); + + Behandling behandling = process.convertToBehandling(); + List dataBehandlerList = new ArrayList<>(); + if(!process.getDataProcessing().getProcessors().isEmpty()) { + process.getDataProcessing().getProcessors().forEach(databehandlerId -> { + DataBehandler databehandler = getDataBehandler(databehandlerId); + dataBehandlerList.add(databehandler); + }); + } + behandling.setDataBehandlerList(dataBehandlerList); + + return behandling; } public List getBehandlingerForTeam(String teamId) { diff --git a/apps/backend/src/main/java/no/nav/data/integration/behandling/dto/Behandling.java b/apps/backend/src/main/java/no/nav/data/integration/behandling/dto/Behandling.java index ff169aa1a..3c2c6b2a2 100644 --- a/apps/backend/src/main/java/no/nav/data/integration/behandling/dto/Behandling.java +++ b/apps/backend/src/main/java/no/nav/data/integration/behandling/dto/Behandling.java @@ -35,8 +35,7 @@ public class Behandling { private List teamsData; private List policies; - - private DataProsessering dataProsessering; + private List dataBehandlerList; private Boolean automatiskBehandling; private Boolean profilering; diff --git a/apps/backend/src/main/java/no/nav/data/integration/behandling/dto/BkatProcess.java b/apps/backend/src/main/java/no/nav/data/integration/behandling/dto/BkatProcess.java index 477e1685e..8efbb9897 100644 --- a/apps/backend/src/main/java/no/nav/data/integration/behandling/dto/BkatProcess.java +++ b/apps/backend/src/main/java/no/nav/data/integration/behandling/dto/BkatProcess.java @@ -46,7 +46,6 @@ public Behandling convertToBehandling() { .systemer(convert(affiliation.getProducts(), BkatCode::toCode)) .teams(affiliation.getProductTeams()) .policies(policies.stream().map(BkatPolicy::convertToPolyResponse).toList()) - .dataProsessering(dataProcessing.convertToDataProsessering()) .automatiskBehandling(automaticProcessing) .profilering(profiling) .build();