diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/PensjonforvalterClient.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/PensjonforvalterClient.java index 6b5c3b85fd9..fe49d1089d0 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/PensjonforvalterClient.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/PensjonforvalterClient.java @@ -309,7 +309,7 @@ private Flux lagreAlderspensjon(PensjonData pensjonDat .flatMap(alderspensjon -> Flux.fromIterable(miljoer) .flatMap(miljoe -> { - if (isOpprettEndre || !transaksjonMappingService.existAlready(PEN_AP, ident, miljoe, null)) { + if (isOpprettEndre || !transaksjonMappingService.existAlready(PEN_AP, ident, miljoe, bestillingId)) { if (isTpsSyncEnv.contains(miljoe)) { @@ -350,7 +350,7 @@ private Flux lagreUforetrygd(PensjonData pensjondata, .flatMap(uforetrygd -> Flux.fromIterable(miljoer) .flatMap(miljoe -> { - if (isOpprettEndre || !transaksjonMappingService.existAlready(PEN_UT, ident, miljoe, null)) { + if (isOpprettEndre || !transaksjonMappingService.existAlready(PEN_UT, ident, miljoe, bestillingId)) { if (isTpsSyncEnv.contains(miljoe)) { diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/HentSamboerCommand.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/HentSamboerCommand.java index 1a91e7acc5e..777a372943d 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/HentSamboerCommand.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/HentSamboerCommand.java @@ -7,9 +7,7 @@ import no.nav.dolly.util.WebClientFilter; import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Mono; -import reactor.util.retry.Retry; -import java.time.Duration; import java.util.Arrays; import java.util.concurrent.Callable; @@ -42,8 +40,6 @@ public Mono call() { .retrieve() .bodyToMono(PensjonSamboerResponse.class) .doOnError(WebClientFilter::logErrorMessage) - .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) - .filter(WebClientFilter::is5xxException)) .onErrorResume(error -> Mono.just(pensjonforvalterResponseFromError(miljoe, error))); } diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreSamboerCommand.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreSamboerCommand.java index 63027edbf91..f9fd6c0930d 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreSamboerCommand.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/command/LagreSamboerCommand.java @@ -8,9 +8,7 @@ import org.springframework.http.HttpStatus; import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Mono; -import reactor.util.retry.Retry; -import java.time.Duration; import java.util.Arrays; import java.util.concurrent.Callable; @@ -44,8 +42,6 @@ public Mono call() { .toBodilessEntity() .map(response -> pensjonforvalterResponse(miljoe, HttpStatus.valueOf(response.getStatusCode().value()))) .doOnError(WebClientFilter::logErrorMessage) - .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) - .filter(WebClientFilter::is5xxException)) .onErrorResume(error -> Mono.just(pensjonforvalterResponseFromError(miljoe, error))); } diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/domain/PensjonSamboerResponse.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/domain/PensjonSamboerResponse.java index 5b982463426..b60d5c5b211 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/domain/PensjonSamboerResponse.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/domain/PensjonSamboerResponse.java @@ -5,6 +5,7 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; +import lombok.ToString; import lombok.experimental.SuperBuilder; import java.time.LocalDate; @@ -15,6 +16,7 @@ @Data @EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) @SuperBuilder @NoArgsConstructor @AllArgsConstructor diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/domain/PensjonforvalterResponse.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/domain/PensjonforvalterResponse.java index 9dbf1ec2702..8f9f1f92c36 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/domain/PensjonforvalterResponse.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/pensjonforvalter/domain/PensjonforvalterResponse.java @@ -48,7 +48,7 @@ public static class Response { private String path; public boolean isResponse2xx() { - return httpStatus.getStatus()>= 200 && httpStatus.getStatus() < 300; + return httpStatus.getStatus() >= 200 && httpStatus.getStatus() < 300; } } diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/service/GjenopprettBestillingService.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/service/GjenopprettBestillingService.java index f9ebd1f4e87..d3a3b3f363f 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/service/GjenopprettBestillingService.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/service/GjenopprettBestillingService.java @@ -74,7 +74,6 @@ public void executeAsync(Bestilling bestilling) { var bestKriterier = getDollyBestillingRequest(bestilling); if (nonNull(bestKriterier)) { bestKriterier.setEkskluderEksternePersoner(true); - bestKriterier.setId(bestilling.getOpprettetFraId()); var gamleProgresser = bestillingProgressService.fetchBestillingProgressByBestillingId(bestilling.getOpprettetFraId()); diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/service/OppdaterPersonService.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/service/OppdaterPersonService.java index 4f24d60a885..d3b1392a9ad 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/service/OppdaterPersonService.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/service/OppdaterPersonService.java @@ -74,6 +74,7 @@ public void oppdaterPersonAsync(RsDollyUpdateRequest request, Bestilling bestill log.info("Bestilling med id=#{} med type={} er startet ...", bestilling.getId(), getBestillingType(bestilling)); MDC.put(MDC_KEY_BESTILLING, bestilling.getId().toString()); + request.setId(bestilling.getId()); var testident = identService.getTestIdent(bestilling.getIdent()); Flux.just(OriginatorUtility.prepOriginator(request, testident, mapperFacade)) diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/RsDollyBestilling.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/RsDollyBestilling.java index a30d83ce6e6..46bc8018e3c 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/RsDollyBestilling.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/RsDollyBestilling.java @@ -45,7 +45,7 @@ @JsonInclude(JsonInclude.Include.NON_EMPTY) public class RsDollyBestilling { - private static final Set EXCLUDE_METHODS = Set.of("getClass", "getMalBestillingNavn", "getEnvironments", "getPdldata"); + private static final Set EXCLUDE_METHODS = Set.of("getClass", "getMalBestillingNavn", "getEnvironments", "getPdldata", "getId"); @JsonIgnore private long id; // Ved gjenopprett vil denne ID kan ha verdi fra bestillingen som gjenopprettes diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/repository/IdentRepository.java b/apps/dolly-backend/src/main/java/no/nav/dolly/repository/IdentRepository.java index 1df3acf1c50..3dac2c60ea9 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/repository/IdentRepository.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/repository/IdentRepository.java @@ -37,13 +37,13 @@ public interface IdentRepository extends JpaRepository { @Query(value = "update Testident ti set ti.ident = :newIdent where ti.ident = :oldIdent") int swapIdent(@Param(value = "oldIdent") String oldIdent, @Param(value = "newIdent") String newIdent); - @Query(value = "select bp.ident as ident, b.id as bestillingid, " + + @Query(value = "select bp.ident as ident, b.id as bestillingId, " + "b.bestKriterier as bestkriterier, b.miljoer as miljoer from Bestilling b " + "join BestillingProgress bp on bp.bestilling.id = b.id " + "and b.gruppe = :gruppe ") List getBestillingerFromGruppe(@Param(value = "gruppe") Testgruppe testgruppe); - @Query(value = "select bp.ident as ident, b.id as bestillingid, " + + @Query(value = "select bp.ident as ident, b.id as bestillingId, " + "b.bestKriterier as bestkriterier, b.miljoer as miljoer from Bestilling b " + "join BestillingProgress bp on bp.bestilling.id = b.id " + "and bp.ident = :ident")