File tree 2 files changed +12
-3
lines changed
src/main/kotlin/no/nav/klage/oppgave
2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -117,15 +117,15 @@ class GosysOppgaveClient(
117
117
118
118
fun fetchGosysOppgaveForAktoerIdAndTema (
119
119
aktoerId : String ,
120
- tema : Tema ?
120
+ temaList : List < Tema > ?
121
121
): List <GosysOppgaveRecord > {
122
122
val oppgaveResponse =
123
123
logTimingAndWebClientResponseException(GosysOppgaveClient ::fetchGosysOppgaveForAktoerIdAndTema.name) {
124
124
gosysOppgaveWebClient.get()
125
125
.uri { uriBuilder ->
126
126
uriBuilder.pathSegment(" oppgaver" )
127
127
uriBuilder.queryParam(" aktoerId" , aktoerId)
128
- tema ?.let { uriBuilder.queryParam(" tema" , it.navn) }
128
+ temaList ?.let { uriBuilder.queryParam(" tema" , temaList.map { it.navn } ) }
129
129
uriBuilder.queryParam(" limit" , 1000 )
130
130
uriBuilder.queryParam(" offset" , 0 )
131
131
uriBuilder.build()
Original file line number Diff line number Diff line change @@ -295,9 +295,18 @@ class GosysOppgaveService(
295
295
fun getGosysOppgaveList (fnr : String , tema : Tema ? ): List <GosysOppgaveView > {
296
296
val aktoerId = pdlFacade.getAktorIdFromIdent(ident = fnr)
297
297
298
+ val temaList = if (tema != null ) {
299
+ if (tema == Tema .MED ) {
300
+ // Legger til TRY når vi søker på MED.
301
+ listOf (tema, Tema .TRY )
302
+ } else {
303
+ listOf (tema)
304
+ }
305
+ } else null
306
+
298
307
val gosysOppgaveList = gosysOppgaveClient.fetchGosysOppgaveForAktoerIdAndTema(
299
308
aktoerId = aktoerId,
300
- tema = tema ,
309
+ temaList = temaList ,
301
310
)
302
311
303
312
return gosysOppgaveList.map { it.toGosysOppgaveView(systemContext = false ) }
You can’t perform that action at this time.
0 commit comments