-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lese deltakere fra deltaker-v2 (#740)
* wip: lese deltakere fra deltaker-v2 * skal ikke publisere deltakere fra komet som ikke har vurderinger * skal ikke oppdatere status for deltakere fra komet * hackyfix * fikser innlesing, støtter sletting
- Loading branch information
Showing
36 changed files
with
595 additions
and
136 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
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
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
83 changes: 83 additions & 0 deletions
83
core/src/main/kotlin/no/nav/amt/tiltak/core/domain/tiltak/DeltakerEndring.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,83 @@ | ||
package no.nav.amt.tiltak.core.domain.tiltak | ||
|
||
import com.fasterxml.jackson.annotation.JsonSubTypes | ||
import com.fasterxml.jackson.annotation.JsonTypeInfo | ||
import java.time.LocalDate | ||
import java.time.LocalDateTime | ||
import java.util.UUID | ||
|
||
data class DeltakerEndring( | ||
val id: UUID, | ||
val deltakerId: UUID, | ||
val endring: Endring, | ||
val endretAv: UUID, | ||
val endretAvEnhet: UUID, | ||
val endret: LocalDateTime, | ||
) { | ||
data class Aarsak( | ||
val type: Type, | ||
val beskrivelse: String? = null, | ||
) { | ||
init { | ||
if (beskrivelse != null && type != Type.ANNET) { | ||
error("Aarsak $type skal ikke ha beskrivelse") | ||
} | ||
} | ||
|
||
enum class Type { | ||
SYK, FATT_JOBB, TRENGER_ANNEN_STOTTE, UTDANNING, IKKE_MOTT, ANNET | ||
} | ||
} | ||
|
||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") | ||
@JsonSubTypes( | ||
JsonSubTypes.Type(value = Endring.EndreStartdato::class, name = "EndreStartdato"), | ||
JsonSubTypes.Type(value = Endring.EndreSluttdato::class, name = "EndreSluttdato"), | ||
JsonSubTypes.Type(value = Endring.EndreDeltakelsesmengde::class, name = "EndreDeltakelsesmengde"), | ||
JsonSubTypes.Type(value = Endring.EndreBakgrunnsinformasjon::class, name = "EndreBakgrunnsinformasjon"), | ||
JsonSubTypes.Type(value = Endring.EndreInnhold::class, name = "EndreInnhold"), | ||
JsonSubTypes.Type(value = Endring.IkkeAktuell::class, name = "IkkeAktuell"), | ||
JsonSubTypes.Type(value = Endring.ForlengDeltakelse::class, name = "ForlengDeltakelse"), | ||
JsonSubTypes.Type(value = Endring.AvsluttDeltakelse::class, name = "AvsluttDeltakelse"), | ||
JsonSubTypes.Type(value = Endring.EndreSluttarsak::class, name = "EndreSluttarsak"), | ||
) | ||
sealed class Endring { | ||
data class EndreBakgrunnsinformasjon( | ||
val bakgrunnsinformasjon: String?, | ||
) : Endring() | ||
|
||
data class EndreInnhold( | ||
val innhold: List<Innhold>, | ||
) : Endring() | ||
|
||
data class EndreDeltakelsesmengde( | ||
val deltakelsesprosent: Float?, | ||
val dagerPerUke: Float?, | ||
) : Endring() | ||
|
||
data class EndreStartdato( | ||
val startdato: LocalDate?, | ||
) : Endring() | ||
|
||
data class EndreSluttdato( | ||
val sluttdato: LocalDate, | ||
) : Endring() | ||
|
||
data class ForlengDeltakelse( | ||
val sluttdato: LocalDate, | ||
) : Endring() | ||
|
||
data class IkkeAktuell( | ||
val aarsak: Aarsak?, | ||
) : Endring() | ||
|
||
data class AvsluttDeltakelse( | ||
val aarsak: Aarsak, | ||
val sluttdato: LocalDate, | ||
) : Endring() | ||
|
||
data class EndreSluttarsak( | ||
val aarsak: Aarsak, | ||
) : Endring() | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
core/src/main/kotlin/no/nav/amt/tiltak/core/domain/tiltak/DeltakerHistorikk.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,14 @@ | ||
package no.nav.amt.tiltak.core.domain.tiltak | ||
|
||
import com.fasterxml.jackson.annotation.JsonSubTypes | ||
import com.fasterxml.jackson.annotation.JsonTypeInfo | ||
|
||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") | ||
@JsonSubTypes( | ||
JsonSubTypes.Type(value = DeltakerHistorikk.Endring::class, name = "Endring"), | ||
JsonSubTypes.Type(value = DeltakerHistorikk.Vedtak::class, name = "Vedtak"), | ||
) | ||
sealed class DeltakerHistorikk { | ||
data class Endring(val endring: DeltakerEndring) : DeltakerHistorikk() | ||
data class Vedtak(val vedtak: no.nav.amt.tiltak.core.domain.tiltak.Vedtak) : DeltakerHistorikk() | ||
} |
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
31 changes: 31 additions & 0 deletions
31
core/src/main/kotlin/no/nav/amt/tiltak/core/domain/tiltak/Vedtak.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,31 @@ | ||
package no.nav.amt.tiltak.core.domain.tiltak | ||
|
||
import java.time.LocalDate | ||
import java.time.LocalDateTime | ||
import java.util.UUID | ||
|
||
data class Vedtak( | ||
val id: UUID, | ||
val deltakerId: UUID, | ||
val fattet: LocalDateTime?, | ||
val gyldigTil: LocalDateTime?, | ||
val deltakerVedVedtak: DeltakerVedVedtak, | ||
val fattetAvNav: Boolean, | ||
val opprettet: LocalDateTime, | ||
val opprettetAv: UUID, | ||
val opprettetAvEnhet: UUID, | ||
val sistEndret: LocalDateTime, | ||
val sistEndretAv: UUID, | ||
val sistEndretAvEnhet: UUID, | ||
) | ||
|
||
data class DeltakerVedVedtak( | ||
val id: UUID, | ||
val startdato: LocalDate?, | ||
val sluttdato: LocalDate?, | ||
val dagerPerUke: Float?, | ||
val deltakelsesprosent: Float?, | ||
val bakgrunnsinformasjon: String?, | ||
val innhold: List<Innhold>, | ||
val status: DeltakerStatus, | ||
) |
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
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
Oops, something went wrong.