Skip to content

Commit

Permalink
EY-4244: Sett utlandsopphold til nei i automatisk behandla behandling (
Browse files Browse the repository at this point in the history
  • Loading branch information
madsop-nav authored Aug 2, 2024
1 parent 720d1f7 commit 01aaad0
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import no.nav.etterlatte.inTransaction
import no.nav.etterlatte.libs.common.Vedtaksloesning
import no.nav.etterlatte.libs.common.behandling.BehandlingsBehov
import no.nav.etterlatte.libs.common.behandling.BoddEllerArbeidetUtlandet
import no.nav.etterlatte.libs.common.behandling.BoddEllerArbeidetUtlandetRequest
import no.nav.etterlatte.libs.common.behandling.DetaljertBehandling
import no.nav.etterlatte.libs.common.behandling.JaNei
import no.nav.etterlatte.libs.common.behandling.JaNeiMedBegrunnelse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,6 @@ import no.nav.etterlatte.libs.common.grunnlag.Grunnlagsopplysning
import java.time.LocalDate
import java.time.YearMonth

data class BoddEllerArbeidetUtlandetRequest(
val boddEllerArbeidetUtlandet: Boolean,
val begrunnelse: String,
val boddArbeidetIkkeEosEllerAvtaleland: Boolean? = false,
val boddArbeidetEosNordiskKonvensjon: Boolean? = false,
val boddArbeidetAvtaleland: Boolean? = false,
val vurdereAvoededsTrygdeavtale: Boolean? = false,
val skalSendeKravpakke: Boolean? = false,
)

internal data class FastsettVirkningstidspunktResponse(
val dato: YearMonth,
val kilde: Grunnlagsopplysning.Saksbehandler,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import no.nav.etterlatte.ktor.runServer
import no.nav.etterlatte.ktor.token.issueSaksbehandlerToken
import no.nav.etterlatte.ktor.token.issueSystembrukerToken
import no.nav.etterlatte.libs.common.Vedtaksloesning
import no.nav.etterlatte.libs.common.behandling.BoddEllerArbeidetUtlandetRequest
import no.nav.etterlatte.libs.common.behandling.NyBehandlingRequest
import no.nav.etterlatte.libs.common.behandling.Persongalleri
import no.nav.etterlatte.libs.common.behandling.SakType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class Behandler(
behandlingService.settKommerBarnetTilGode(behandling, bruker)
behandlingService.lagreGyldighetsproeving(behandling, bruker)
behandlingService.lagreUtlandstilknytning(behandling, bruker)
behandlingService.lagreBoddEllerArbeidetUtlandet(behandling, bruker)
behandlingService.lagreVirkningstidspunkt(behandling, doedsdato?.verdi!!, bruker)
behandlingService.tildelSaksbehandler(Fagsaksystem.EY.navn, sakId, bruker)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package no.nav.etterlatte.testdata.automatisk
import com.github.michaelbull.result.mapBoth
import no.nav.etterlatte.behandling.VirkningstidspunktRequest
import no.nav.etterlatte.libs.common.behandling.Aldersgruppe
import no.nav.etterlatte.libs.common.behandling.BoddEllerArbeidetUtlandetRequest
import no.nav.etterlatte.libs.common.behandling.BrevutfallDto
import no.nav.etterlatte.libs.common.behandling.BrevutfallOgEtterbetalingDto
import no.nav.etterlatte.libs.common.behandling.JaNei
Expand Down Expand Up @@ -97,6 +98,26 @@ class BehandlingService(
}
}

suspend fun lagreBoddEllerArbeidetUtlandet(
behandling: UUID,
bruker: BrukerTokenInfo,
) {
retryOgPakkUt {
klient
.post(
Resource(clientId, "$url/api/behandling/$behandling/boddellerarbeidetutlandet"),
bruker,
BoddEllerArbeidetUtlandetRequest(
boddEllerArbeidetUtlandet = false,
begrunnelse = BEGRUNNELSE,
),
).mapBoth(
success = {},
failure = { throw it },
)
}
}

suspend fun lagreVirkningstidspunkt(
behandling: UUID,
doedsdato: LocalDate,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package no.nav.etterlatte.libs.common.behandling

data class BoddEllerArbeidetUtlandetRequest(
val boddEllerArbeidetUtlandet: Boolean,
val begrunnelse: String,
val boddArbeidetIkkeEosEllerAvtaleland: Boolean? = false,
val boddArbeidetEosNordiskKonvensjon: Boolean? = false,
val boddArbeidetAvtaleland: Boolean? = false,
val vurdereAvoededsTrygdeavtale: Boolean? = false,
val skalSendeKravpakke: Boolean? = false,
)

0 comments on commit 01aaad0

Please sign in to comment.