Skip to content

Commit

Permalink
Merge branch 'master' into change/local-vault-cleanup
Browse files Browse the repository at this point in the history
# Conflicts:
#	apps/organisasjon-tilgang-frontend/build.gradle
#	apps/organisasjon-tilgang-frontend/settings.gradle
#	apps/organisasjon-tilgang-frontend/src/main/java/no/nav/testnav/apps/organisasjontilgangfrontend/config/LocalVaultConfig.java
#	proxies/pensjon-testdata-facade-proxy/src/main/java/no/nav/testnav/proxies/pensjontestdatafacadeproxy/config/LocalVaultConfig.java
  • Loading branch information
rfc3092 committed Sep 24, 2024
2 parents 04d85c5 + 237ef46 commit 34e3bc6
Show file tree
Hide file tree
Showing 128 changed files with 4,350 additions and 13,485 deletions.
23 changes: 0 additions & 23 deletions .github/workflows/app.organisasjon-tilgang-frontend.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
with:
working-directory: "apps/person-organisasjon-tilgang-service"
deploy-tag: "#deploy-person-organisasjon-tilgang-service"
deploy-tag-test: "#deploy-test-person-organisasjon-tilgang-service"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.aareg-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/aareg-proxy"
deploy-tag: "#deploy-proxy"
deploy-tag: "#deploy-proxy-aareg"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.aareg-synt-services-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/aareg-synt-services-proxy"
deploy-tag: "#deploy-proxy"
deploy-tag: "#deploy-proxy-aareg-synt-services"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.arbeidsplassencv-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: ./.github/workflows/common.workflow.backend.yml
with:
working-directory: "proxies/arbeidsplassencv-proxy"
deploy-tag: "#deploy-proxy"
deploy-tag: "#deploy-proxy-arbeidsplassencv"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.arena-forvalteren-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/arena-forvalteren-proxy"
deploy-tag: "#deploy-proxy"
deploy-tag: "#deploy-proxy-arena-forvalteren"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.batch-adeo-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/batch-adeo-proxy"
deploy-tag: "#deploy-proxy"
deploy-tag: "#deploy-proxy-batch-adeo"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.brregstub-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/brregstub-proxy"
deploy-tag: "#deploy-proxy"
deploy-tag: "#deploy-proxy-brregstub"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.ereg-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/ereg-proxy"
deploy-tag: "#deploy-proxy"
deploy-tag: "#deploy-proxy-ereg"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.histark-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/histark-proxy"
deploy-tag: "#deploy-proxy"
deploy-tag: "#deploy-proxy-histark"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.inntektstub-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/inntektstub-proxy"
deploy-tag: "#deploy-proxy"
deploy-tag: "#deploy-proxy-inntektstub"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.inst-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/inst-proxy"
deploy-tag: "#deploy-proxy"
deploy-tag: "#deploy-proxy-inst"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.kontoregister-person-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/kontoregister-person-proxy"
deploy-tag: "#deploy-proxy"
deploy-tag: "#deploy-proxy-kontoregister-person"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.krrstub-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/krrstub-proxy"
deploy-tag: "#deploy-proxy"
deploy-tag: "#deploy-proxy-krrstub"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.medl-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/medl-proxy"
deploy-tag: "#deploy-proxy"
deploy-tag: "#deploy-proxy-medl"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.norg2-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/norg2-proxy"
deploy-tag: "#deploy-proxy"
deploy-tag: "#deploy-proxy-norg2"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.pensjon-testdata-facade-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/pensjon-testdata-facade-proxy"
deploy-tag: "#deploy-proxy"
deploy-tag: "#deploy-proxy-pensjon"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.saf-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/saf-proxy"
deploy-tag: "#deploy-proxy"
deploy-tag: "#deploy-proxy-saf"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.sigrunstub-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/sigrunstub-proxy"
deploy-tag: "#deploy-proxy"
deploy-tag: "#deploy-proxy-sigrunstub"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.skjermingsregister-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/skjermingsregister-proxy"
deploy-tag: "#deploy-proxy"
deploy-tag: "#deploy-proxy-skjermingsregister"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.synthdata-meldekort-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: ./.github/workflows/common.workflow.backend.yml
with:
working-directory: "proxies/synthdata-meldekort-proxy"
deploy-tag: "#deploy-proxy"
deploy-tag: "#deploy-proxy-synthdata-meldekort"
permissions:
contents: read
id-token: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proxy.udistub-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
cluster: "dev-fss"
working-directory: "proxies/udistub-proxy"
deploy-tag: "#deploy-proxy"
deploy-tag: "#deploy-proxy-udistub"
permissions:
contents: read
id-token: write
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ public static void main(String[] args) {

SpringApplication.run(DollyBackendApplicationStarter.class, args);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import no.nav.dolly.bestilling.ClientFuture;
import no.nav.dolly.bestilling.ClientRegister;
import no.nav.dolly.bestilling.pdldata.PdlDataConsumer;
import no.nav.dolly.bestilling.pensjonforvalter.domain.AfpOffentligRequest;
import no.nav.dolly.bestilling.pensjonforvalter.domain.AlderspensjonRequest;
import no.nav.dolly.bestilling.pensjonforvalter.domain.AlderspensjonSoknadRequest;
import no.nav.dolly.bestilling.pensjonforvalter.domain.AlderspensjonVedtakRequest;
Expand Down Expand Up @@ -87,6 +88,7 @@ public class PensjonforvalterClient implements ClientRegister {
private static final String PEN_ALDERSPENSJON = "AP#";
private static final String PEN_UFORETRYGD = "Ufoer#";
private static final String PEN_PENSJONSAVTALE = "Pensjonsavtale#";
private static final String PEN_AFP_OFFENTLIG = "AfpOffentlig#";
private static final String PERIODE = "/periode/";

private final PensjonforvalterConsumer pensjonforvalterConsumer;
Expand Down Expand Up @@ -165,7 +167,10 @@ public Flux<ClientFuture> gjenopprett(RsDollyUtvidetBestilling bestilling, Dolly
.map(response -> TP_FORHOLD + decodeStatus(response, dollyPerson.getIdent())),

lagrePensjonsavtale(pensjon, dollyPerson.getIdent(), bestilteMiljoer.get())
.map(response -> PEN_PENSJONSAVTALE + decodeStatus(response, dollyPerson.getIdent()))
.map(response -> PEN_PENSJONSAVTALE + decodeStatus(response, dollyPerson.getIdent())),

lagreAfpOffentlig(pensjon, dollyPerson.getIdent(), bestilteMiljoer.get())
.map(response -> PEN_AFP_OFFENTLIG + decodeStatus(response, dollyPerson.getIdent()))
)
.collectList()
.doOnNext(statusResultat::addAll)
Expand Down Expand Up @@ -210,6 +215,7 @@ public void release(List<String> identer) {

pensjonforvalterConsumer.sletteTpForhold(identer);
pensjonforvalterConsumer.slettePensjonsavtale(identer);
pensjonforvalterConsumer.sletteAfpOffentlig(identer);
}

public static PensjonforvalterResponse mergePensjonforvalterResponses(List<PensjonforvalterResponse> responser) {
Expand Down Expand Up @@ -540,6 +546,21 @@ private Flux<PensjonforvalterResponse> lagrePensjonsavtale(PensjonData pensjon,
}));
}

private Flux<PensjonforvalterResponse> lagreAfpOffentlig(PensjonData pensjonData, String ident, Set<String> miljoer) {

return Flux.just(pensjonData)
.filter(PensjonData::hasAfpOffentlig)
.map(PensjonData::getAfpOffentlig)
.flatMap(pensjon -> Flux.fromIterable(miljoer)
.flatMap(miljoe -> {

var context = MappingContextUtils.getMappingContext();
context.setProperty(IDENT, ident);
var request = mapperFacade.map(pensjon, AfpOffentligRequest.class, context);
return pensjonforvalterConsumer.lagreAfpOffentlig(request, miljoe);
}));
}

private String decodeStatus(PensjonforvalterResponse response, String ident) {

log.info("Mottatt status på {} fra Pensjon-Testdata-Facade: {}", ident, response);
Expand Down
Loading

0 comments on commit 34e3bc6

Please sign in to comment.