Skip to content

Commit

Permalink
EY-4773 - oppdatere status og merknad for oppgaver hvor omregning fei…
Browse files Browse the repository at this point in the history
…let (#6575)

* oppdatere merknad og status for oppgave som feilet automatisk behandle

* hente aapne behandlinger av type inntektsendring
  • Loading branch information
andreasbalevik authored Dec 12, 2024
1 parent b0c6901 commit ceab51a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,7 @@ internal class BehandlingServiceImpl(
Revurderingaarsak.REGULERING,
Revurderingaarsak.OMREGNING,
Revurderingaarsak.AARLIG_INNTEKTSJUSTERING,
Revurderingaarsak.INNTEKTSENDRING,
),
).singleOrNull {
it.status != BehandlingStatus.AVBRUTT && it.status != BehandlingStatus.IVERKSATT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import no.nav.etterlatte.libs.common.behandling.Prosesstype
import no.nav.etterlatte.libs.common.behandling.Revurderingaarsak
import no.nav.etterlatte.libs.common.feilhaandtering.InternfeilException
import no.nav.etterlatte.libs.common.oppgave.OppgaveType
import no.nav.etterlatte.libs.common.oppgave.Status
import no.nav.etterlatte.libs.common.sak.KjoeringDistEllerIverksattRequest
import no.nav.etterlatte.libs.common.sak.KjoeringRequest
import no.nav.etterlatte.libs.common.sak.KjoeringStatus
Expand Down Expand Up @@ -68,6 +69,11 @@ class OmregningService(
?: throw InternfeilException("Kan ikke eksistere en INNTEKTSENDRING uten oppgave")

if (oppgave.saksbehandler?.navn == Fagsaksystem.EY.navn) {
oppgaveService.oppdaterStatusOgMerknad(
oppgave.id,
"Automatisk behandling feilet - må behandles manuelt",
Status.UNDER_BEHANDLING,
)
oppgaveService.fjernSaksbehandler(oppgave.id)
}
behandlingService.endreProsesstype(behandlingId, Prosesstype.MANUELL)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import no.nav.etterlatte.libs.common.behandling.Revurderingaarsak
import no.nav.etterlatte.libs.common.behandling.SakType
import no.nav.etterlatte.libs.common.oppgave.OppgaveSaksbehandler
import no.nav.etterlatte.libs.common.oppgave.OppgaveType
import no.nav.etterlatte.libs.common.oppgave.Status
import no.nav.etterlatte.libs.common.sak.KjoeringRequest
import no.nav.etterlatte.libs.common.sak.KjoeringStatus
import no.nav.etterlatte.libs.common.sak.LagreKjoeringRequest
Expand Down Expand Up @@ -205,6 +206,7 @@ class OmregningServiceTest(
},
)
every { oppgaveService.fjernSaksbehandler(any()) } just runs
every { oppgaveService.oppdaterStatusOgMerknad(any(), any(), any()) } just runs

val request =
KjoeringRequest(
Expand All @@ -220,6 +222,11 @@ class OmregningServiceTest(

verify {
oppgaveService.fjernSaksbehandler(oppgaveId)
oppgaveService.oppdaterStatusOgMerknad(
oppgaveId,
"Automatisk behandling feilet - må behandles manuelt",
Status.UNDER_BEHANDLING,
)
behandlingService.endreProsesstype(behandlingId, Prosesstype.MANUELL)
}
}
Expand Down

0 comments on commit ceab51a

Please sign in to comment.