-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GenerasjonForkastet & AvsluttetMedVedtak
- Loading branch information
1 parent
25be27a
commit ef83e8a
Showing
4 changed files
with
57 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...fo/src/main/kotlin/no/nav/helse/spre/styringsinfo/teamsak/hendelse/GenerasjonForkastet.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package no.nav.helse.spre.styringsinfo.teamsak.hendelse | ||
|
||
import com.fasterxml.jackson.databind.JsonNode | ||
import no.nav.helse.spre.styringsinfo.teamsak.behandling.Behandling | ||
import no.nav.helse.spre.styringsinfo.teamsak.behandling.BehandlingDao | ||
import java.time.LocalDateTime | ||
import java.util.* | ||
|
||
internal class GenerasjonForkastet( | ||
override val id: UUID, | ||
override val opprettet: LocalDateTime, | ||
override val blob: JsonNode, | ||
private val generasjonId: UUID | ||
) : Hendelse { | ||
override val type = "generasjon_forkastet" | ||
|
||
override fun håndter(behandlingDao: BehandlingDao) { | ||
val builder = behandlingDao.initialiser(generasjonId) ?: return | ||
val ny = builder | ||
.behandlingStatus(Behandling.BehandlingStatus.BehandlesIInfotrygd) | ||
.funksjonellTid(opprettet) | ||
.build() | ||
?: return | ||
behandlingDao.lagre(ny) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters