Skip to content

Commit

Permalink
Merge pull request #84 from navikt/oppgave_query
Browse files Browse the repository at this point in the history
Add feilutbetaling
  • Loading branch information
flexable777 authored Dec 18, 2020
2 parents e4dc7d6 + 351500d commit f28c9a1
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class OppgaveMapper(val pdlClient: PdlClient) {
return if (behandlingstema == null) {
when (behandlingstype) {
BEHANDLINGSTYPE_KLAGE -> TYPE_KLAGE
BEHANDLINGSTYPE_ANKE -> TYPE_ANKE
BEHANDLINGSTYPE_FEILUTBETALING -> TYPE_FEILUTBETALING
else -> "ukjent"
}
} else "mangler"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import java.time.LocalDate

const val HJEMMEL = "HJEMMEL"
const val TYPE_KLAGE = "Klage"
const val TYPE_ANKE = "Anke"
const val TYPE_FEILUTBETALING = "Feilutbetaling"
const val YTELSE_SYK = "Sykepenger"
const val YTELSE_FOR = "Foreldrepenger"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import java.time.LocalDate
import java.time.OffsetDateTime

const val BEHANDLINGSTYPE_KLAGE = "ae0058"
const val BEHANDLINGSTYPE_ANKE = "ae0046"
const val BEHANDLINGSTYPE_FEILUTBETALING = "ae0161"

const val TEMA_SYK = "SYK"
const val TEMA_FOR = "FOR"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package no.nav.klage.oppgave.clients.gosys

import brave.Tracer
import no.nav.klage.oppgave.api.view.TYPE_ANKE
import no.nav.klage.oppgave.api.view.TYPE_FEILUTBETALING
import no.nav.klage.oppgave.api.view.TYPE_KLAGE
import no.nav.klage.oppgave.api.view.YTELSE_FOR
import no.nav.klage.oppgave.api.view.YTELSE_SYK
Expand Down Expand Up @@ -86,7 +86,7 @@ class OppgaveClient(
}
} else {
uriBuilder.queryParam("behandlingstype", mapType(TYPE_KLAGE))
uriBuilder.queryParam("behandlingstype", mapType(TYPE_ANKE))
uriBuilder.queryParam("behandlingstype", mapType(TYPE_FEILUTBETALING))
}

ytelser.forEach {
Expand Down Expand Up @@ -138,7 +138,7 @@ class OppgaveClient(
private fun mapType(type: String): String {
return when (type) {
TYPE_KLAGE -> BEHANDLINGSTYPE_KLAGE
TYPE_ANKE -> BEHANDLINGSTYPE_ANKE
TYPE_FEILUTBETALING -> BEHANDLINGSTYPE_FEILUTBETALING
else -> {
logger.warn("Unknown type: {}", type)
type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import io.mockk.mockk
import no.nav.klage.oppgave.api.OppgaveFacade
import no.nav.klage.oppgave.api.mapper.OppgaveMapper
import no.nav.klage.oppgave.api.view.HJEMMEL
import no.nav.klage.oppgave.api.view.TYPE_ANKE
import no.nav.klage.oppgave.api.view.TYPE_FEILUTBETALING
import no.nav.klage.oppgave.api.view.TYPE_KLAGE
import no.nav.klage.oppgave.clients.gosys.*
import no.nav.klage.oppgave.clients.pdl.HentPersonBolk
Expand All @@ -27,10 +27,10 @@ internal class OppgaveFacadeTest {
}

@Test
fun `type is anke`() {
val oppgaveService = oppgaveFacadeWithType(BEHANDLINGSTYPE_ANKE)
fun `type is feilutbetaling`() {
val oppgaveService = oppgaveFacadeWithType(BEHANDLINGSTYPE_FEILUTBETALING)
assertThat(oppgaveService.searchOppgaver(mockk(relaxed = true)).oppgaver.first().type).isEqualTo(
TYPE_ANKE
TYPE_FEILUTBETALING
)
}

Expand Down

0 comments on commit f28c9a1

Please sign in to comment.