Skip to content

Commit

Permalink
Merge branch 'main' into innsyn
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvind-wedoe committed Dec 10, 2024
2 parents eb9c0b0 + 24e6eb9 commit bd954b6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,9 @@ class BehandlingService(
if (tildeltSaksbehandlerIdent != null) {
//Denne sjekken gjøres kun når det er en tildeling:

checkYtelseAccess(tildeltSaksbehandlerIdent = tildeltSaksbehandlerIdent, behandling = behandling)
if (!systemUserContext) {
checkYtelseAccess(tildeltSaksbehandlerIdent = tildeltSaksbehandlerIdent, behandling = behandling)
}

//if fagsystem is Infotrygd also do this.
if (behandling.shouldUpdateInfotrygd()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ class ExternalMottakFacade(
saksbehandlerIdent = saksbehandlerIdent,
)
} catch (e: Exception) {
logger.error("Klarte ikke å tildele behandling ${behandling.id} til saksbehandlerIdent $saksbehandlerIdent. Feil: $e")
mottakService.createTaskForMerkantil(
behandlingId = behandling.id,
reason = "Klarte ikke å tildele behandling ${behandling.id} til saksbehandlerIdent $saksbehandlerIdent. Feilmelding: ${e.message}"
Expand Down Expand Up @@ -149,6 +150,4 @@ class ExternalMottakFacade(
systemUserContext = true,
)
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ import no.nav.klage.kodeverk.Ytelse
import no.nav.klage.oppgave.clients.kabalinnstillinger.KabalInnstillingerClient
import no.nav.klage.oppgave.clients.kabalinnstillinger.model.*
import no.nav.klage.oppgave.domain.klage.Behandling
import org.springframework.retry.annotation.Retryable
import org.springframework.stereotype.Service

@Service
class KabalInnstillingerService(
private val kabalInnstillingerClient: KabalInnstillingerClient,
) {
@Retryable
fun getPotentialSaksbehandlere(behandling: Behandling): Saksbehandlere {
return kabalInnstillingerClient.searchSaksbehandlere(
SaksbehandlerSearchInput(
Expand All @@ -21,7 +19,6 @@ class KabalInnstillingerService(
)
}

@Retryable
fun getPotentialMedunderskrivere(behandling: Behandling): Medunderskrivere {
if (behandling.tildeling == null) {
return Medunderskrivere(medunderskrivere = emptyList())
Expand All @@ -36,7 +33,6 @@ class KabalInnstillingerService(
)
}

@Retryable
fun getPotentialROL(behandling: Behandling): Saksbehandlere {
return kabalInnstillingerClient.searchROL(
ROLSearchInput(
Expand All @@ -46,14 +42,12 @@ class KabalInnstillingerService(
}

//TODO: Bør vi ha et cache her? Kan være et problem om leder gir nye tilganger, kanskje et kortere cache?
@Retryable
fun getTildelteYtelserForSaksbehandler(navIdent: String): List<Ytelse> {
return kabalInnstillingerClient.getSaksbehandlersTildelteYtelser(navIdent).ytelseIdList.map {
Ytelse.of(it)
}
}

@Retryable
fun getTildelteYtelserForEnhet(enhet: String): Set<Ytelse> {
return kabalInnstillingerClient.getTildelteYtelserForEnhet(enhet).ytelseIdList.map {
Ytelse.of(it)
Expand Down

0 comments on commit bd954b6

Please sign in to comment.