Skip to content

Commit

Permalink
sjekker også JOURNALFØRT status som ferdig (#983)
Browse files Browse the repository at this point in the history
  • Loading branch information
qtips authored Aug 26, 2023
1 parent b18c44a commit 3223ad3
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,8 @@ internal class JournalpostRoutes(
}

val medSafStatus = uferdigePunsj.associateWith { journalpostService.hentSafJournalPost(it)!!.journalstatus }
val ferdigeSaf = medSafStatus.filter { it.value == SafDtos.Journalstatus.FERDIGSTILT.name }.keys
val ferdigStatuser = arrayOf(SafDtos.Journalstatus.FERDIGSTILT.name, SafDtos.Journalstatus.JOURNALFOERT.name)
val ferdigeSaf = medSafStatus.filter { it.value in ferdigStatuser }.keys
if (ferdigeSaf.isEmpty()) {
return@RequestContext ServerResponse
.status(HttpStatus.BAD_REQUEST)
Expand All @@ -443,7 +444,7 @@ internal class JournalpostRoutes(

return@RequestContext ServerResponse.status(HttpStatus.OK)
.bodyValueAndAwait(ResultatDto(
"""Lukket journalposter: ${ferdigeSaf.joinToString()}. $fantIkkeIPunsjTekst. $alleredeLukketIPunsjTekst. $ikkeLukketISafTekst. """))
"""Lukket journalposter: $ferdigeSaf. $fantIkkeIPunsjTekst. $alleredeLukketIPunsjTekst. $ikkeLukketISafTekst. """))
}
}

Expand Down

0 comments on commit 3223ad3

Please sign in to comment.