Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send svarnøkkel til rivers som bruker det #825

Merged
merged 1 commit into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ class AktiveOrgnrService(
Key.KONTEKST_ID to steg0.transaksjonId.toJson(),
Key.DATA to
mapOf(
Key.SVAR_KAFKA_KEY to KafkaKey(steg0.sykmeldtFnr).toJson(),
Key.ORGNR_UNDERENHETER to arbeidsgivere.toJson(String.serializer()),
).toJson(),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import no.nav.helsearbeidsgiver.felles.json.les
import no.nav.helsearbeidsgiver.felles.json.orgMapSerializer
import no.nav.helsearbeidsgiver.felles.json.personMapSerializer
import no.nav.helsearbeidsgiver.felles.json.toJson
import no.nav.helsearbeidsgiver.felles.rapidsrivers.KafkaKey
import no.nav.helsearbeidsgiver.felles.rapidsrivers.model.Fail
import no.nav.helsearbeidsgiver.felles.rapidsrivers.publish
import no.nav.helsearbeidsgiver.felles.rapidsrivers.service.ServiceMed4Steg
Expand Down Expand Up @@ -127,8 +128,12 @@ class BerikInntektsmeldingService(
Key.KONTEKST_ID to steg0.transaksjonId.toJson(),
Key.DATA to
data
.plus(Key.ORGNR_UNDERENHETER to setOf(steg1.forespoersel.orgnr).toJson(Orgnr.serializer()))
.toJson(),
.plus(
mapOf(
Key.SVAR_KAFKA_KEY to KafkaKey(steg0.skjema.forespoerselId).toJson(),
Key.ORGNR_UNDERENHETER to setOf(steg1.forespoersel.orgnr).toJson(Orgnr.serializer()),
),
).toJson(),
).also { loggBehovPublisert(BehovType.HENT_VIRKSOMHET_NAVN, it) }
}

Expand All @@ -147,11 +152,14 @@ class BerikInntektsmeldingService(
Key.DATA to
data
.plus(
Key.FNR_LISTE to
listOf(
steg1.forespoersel.fnr,
steg0.avsenderFnr,
).toJson(Fnr.serializer()),
mapOf(
Key.SVAR_KAFKA_KEY to KafkaKey(steg0.skjema.forespoerselId).toJson(),
Key.FNR_LISTE to
listOf(
steg1.forespoersel.fnr,
steg0.avsenderFnr,
).toJson(Fnr.serializer()),
),
).toJson(),
).also { loggBehovPublisert(BehovType.HENT_PERSONER, it) }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import no.nav.helsearbeidsgiver.felles.domene.Inntekt
import no.nav.helsearbeidsgiver.felles.domene.ResultJson
import no.nav.helsearbeidsgiver.felles.json.les
import no.nav.helsearbeidsgiver.felles.json.toJson
import no.nav.helsearbeidsgiver.felles.rapidsrivers.KafkaKey
import no.nav.helsearbeidsgiver.felles.rapidsrivers.model.Fail
import no.nav.helsearbeidsgiver.felles.rapidsrivers.publish
import no.nav.helsearbeidsgiver.felles.rapidsrivers.redis.RedisStore
Expand Down Expand Up @@ -74,6 +75,7 @@ class InntektSelvbestemtService(
data
.plus(
mapOf(
Key.SVAR_KAFKA_KEY to KafkaKey(steg0.sykmeldtFnr).toJson(),
Key.ORGNR_UNDERENHET to steg0.orgnr.toJson(),
Key.FNR to steg0.sykmeldtFnr.toJson(),
Key.INNTEKTSDATO to steg0.inntektsdato.toJson(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import no.nav.helsearbeidsgiver.felles.domene.Inntekt
import no.nav.helsearbeidsgiver.felles.domene.ResultJson
import no.nav.helsearbeidsgiver.felles.json.les
import no.nav.helsearbeidsgiver.felles.json.toJson
import no.nav.helsearbeidsgiver.felles.rapidsrivers.KafkaKey
import no.nav.helsearbeidsgiver.felles.rapidsrivers.model.Fail
import no.nav.helsearbeidsgiver.felles.rapidsrivers.publish
import no.nav.helsearbeidsgiver.felles.rapidsrivers.redis.RedisStore
Expand Down Expand Up @@ -105,6 +106,7 @@ class InntektService(
data
.plus(
mapOf(
Key.SVAR_KAFKA_KEY to KafkaKey(steg0.forespoerselId).toJson(),
Key.ORGNR_UNDERENHET to steg1.forespoersel.orgnr.toJson(),
Key.FNR to steg1.forespoersel.fnr.toJson(),
Key.INNTEKTSDATO to steg0.skjaeringstidspunkt.toJson(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import no.nav.helsearbeidsgiver.felles.Key
import no.nav.helsearbeidsgiver.felles.domene.Inntekt
import no.nav.helsearbeidsgiver.felles.domene.InntektPerMaaned
import no.nav.helsearbeidsgiver.felles.json.toJson
import no.nav.helsearbeidsgiver.felles.rapidsrivers.KafkaKey
import no.nav.helsearbeidsgiver.inntektsmelding.integrasjonstest.utils.EndToEndTest
import no.nav.helsearbeidsgiver.utils.json.toJson
import no.nav.helsearbeidsgiver.utils.test.date.april
Expand Down Expand Up @@ -49,6 +50,7 @@ class InntektSelvbestemtIT : EndToEndTest() {
Key.KONTEKST_ID to Mock.transaksjonId.toJson(),
Key.DATA to
mapOf(
Key.SVAR_KAFKA_KEY to KafkaKey(Mock.fnr).toJson(),
Key.ORGNR_UNDERENHET to Mock.orgnr.toJson(),
Key.FNR to Mock.fnr.toJson(),
Key.INNTEKTSDATO to Mock.inntektsdato.toJson(),
Expand All @@ -65,6 +67,7 @@ class InntektSelvbestemtIT : EndToEndTest() {
Key.KONTEKST_ID to Mock.transaksjonId.toJson(),
Key.DATA to
mapOf(
Key.SVAR_KAFKA_KEY to KafkaKey(Mock.fnr).toJson(),
Key.ORGNR_UNDERENHET to Mock.orgnr.toJson(),
Key.FNR to Mock.fnr.toJson(),
Key.INNTEKTSDATO to Mock.inntektsdato.toJson(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import no.nav.helsearbeidsgiver.felles.domene.Forespoersel
import no.nav.helsearbeidsgiver.felles.json.les
import no.nav.helsearbeidsgiver.felles.json.orgMapSerializer
import no.nav.helsearbeidsgiver.felles.json.toJson
import no.nav.helsearbeidsgiver.felles.rapidsrivers.KafkaKey
import no.nav.helsearbeidsgiver.felles.rapidsrivers.model.Fail
import no.nav.helsearbeidsgiver.felles.rapidsrivers.publish
import no.nav.helsearbeidsgiver.felles.rapidsrivers.service.ServiceMed2Steg
Expand Down Expand Up @@ -80,7 +81,10 @@ class HentDataTilPaaminnelseService(
Key.DATA to
data
.plus(
Key.ORGNR_UNDERENHETER to setOf(steg1.forespoersel.orgnr).toJson(Orgnr.serializer()),
mapOf(
Key.SVAR_KAFKA_KEY to KafkaKey(steg0.forespoerselId).toJson(),
Key.ORGNR_UNDERENHETER to setOf(steg1.forespoersel.orgnr).toJson(Orgnr.serializer()),
),
).toJson(),
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import no.nav.helsearbeidsgiver.felles.json.les
import no.nav.helsearbeidsgiver.felles.json.orgMapSerializer
import no.nav.helsearbeidsgiver.felles.json.personMapSerializer
import no.nav.helsearbeidsgiver.felles.json.toJson
import no.nav.helsearbeidsgiver.felles.rapidsrivers.KafkaKey
import no.nav.helsearbeidsgiver.felles.rapidsrivers.model.Fail
import no.nav.helsearbeidsgiver.felles.rapidsrivers.publish
import no.nav.helsearbeidsgiver.felles.rapidsrivers.service.ServiceMed2Steg
Expand Down Expand Up @@ -82,7 +83,10 @@ class HentDataTilSakOgOppgaveService(
Key.DATA to
data
.plus(
Key.ORGNR_UNDERENHETER to setOf(steg0.forespoersel.orgnr).toJson(Orgnr.serializer()),
mapOf(
Key.SVAR_KAFKA_KEY to KafkaKey(steg0.forespoerselId).toJson(),
Key.ORGNR_UNDERENHETER to setOf(steg0.forespoersel.orgnr).toJson(Orgnr.serializer()),
),
).toJson(),
)
}
Expand All @@ -100,7 +104,10 @@ class HentDataTilSakOgOppgaveService(
Key.DATA to
data
.plus(
Key.FNR_LISTE to setOf(steg0.forespoersel.fnr).toJson(Fnr.serializer()),
mapOf(
Key.SVAR_KAFKA_KEY to KafkaKey(steg0.forespoerselId).toJson(),
Key.FNR_LISTE to setOf(steg0.forespoersel.fnr).toJson(Fnr.serializer()),
),
).toJson(),
)
}
Expand Down
Loading