Skip to content

Commit

Permalink
Remove birth detail mapping in OriginatorMappingStrategy
Browse files Browse the repository at this point in the history
Removed mapping lines for birth details in OriginatorMappingStrategy and added them to DollyRequest2MalBestillingMappingStrategy. This restructuring ensures that birth details are handled correctly, improving efficiency and stability of the mapping strategy across the application.
  • Loading branch information
krharum committed Jun 19, 2024
1 parent 5f8ae38 commit 046f15c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,9 @@ public void mapAtoB(PersonDTO personDTO, PersonDTO akkumulertDTO, MappingContext
akkumulertDTO.getDoedfoedtBarn().addAll(personDTO.getDoedfoedtBarn());
akkumulertDTO.getDoedsfall().addAll(personDTO.getDoedsfall());
akkumulertDTO.getFalskIdentitet().addAll(personDTO.getFalskIdentitet());
akkumulertDTO.getFoedested().addAll(personDTO.getFoedested());
akkumulertDTO.getFoedsel().addAll(personDTO.getFoedsel());
akkumulertDTO.getFoedselsdato().addAll(personDTO.getFoedselsdato());
akkumulertDTO.getFolkeregisterPersonstatus().addAll(personDTO.getFolkeregisterPersonstatus());
akkumulertDTO.getForelderBarnRelasjon().addAll(personDTO.getForelderBarnRelasjon());
akkumulertDTO.getForeldreansvar().addAll(personDTO.getForeldreansvar());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
import no.nav.dolly.domain.resultset.pdldata.PdlPersondata;
import no.nav.dolly.mapper.MappingStrategy;
import no.nav.testnav.libs.data.pdlforvalter.v1.BestillingRequestDTO;
import no.nav.testnav.libs.data.pdlforvalter.v1.FoedestedDTO;
import no.nav.testnav.libs.data.pdlforvalter.v1.FoedselsdatoDTO;
import no.nav.testnav.libs.data.pdlforvalter.v1.Identtype;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Component;
Expand Down Expand Up @@ -36,10 +34,6 @@ public void mapAtoB(PdlPersondata kilde, BestillingRequestDTO destinasjon, Mappi
if (StringUtils.isBlank(destinasjon.getOpprettFraIdent()) && isNull(destinasjon.getIdenttype())) {
destinasjon.setIdenttype(Identtype.FNR);
}
if (nonNull(destinasjon.getPerson())) {
destinasjon.getPerson().setFoedselsdato(mapperFacade.mapAsList(kilde.getPerson().getFoedselsdato(), FoedselsdatoDTO.class));
destinasjon.getPerson().setFoedested(mapperFacade.mapAsList(kilde.getPerson().getFoedested(), FoedestedDTO.class));
}
}
})
.byDefault()
Expand Down

0 comments on commit 046f15c

Please sign in to comment.