Skip to content

Commit

Permalink
UPDATE: behandling to get data of processors
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremiahUy committed Oct 31, 2024
1 parent 8a66504 commit ae9ac3e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -28,7 +29,18 @@ public Behandling getBehandling(String id) {
if (process == null) {
return null;
}
return process.convertToBehandling();

Behandling behandling = process.convertToBehandling();
List<DataBehandler> 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<Behandling> getBehandlingerForTeam(String teamId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ public class Behandling {
private List<TeamResponse> teamsData;

private List<PolicyResponse> policies;

private DataProsessering dataProsessering;
private List<DataBehandler> dataBehandlerList;

private Boolean automatiskBehandling;
private Boolean profilering;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit ae9ac3e

Please sign in to comment.