-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
198 additions
and
95 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
spesialist-felles/src/main/resources/db/migration/V540__oppgave_med_behandling_id.sql
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,6 @@ | ||
ALTER TABLE oppgave ADD COLUMN behandling_id UUID; | ||
CREATE INDEX ON oppgave(behandling_id); | ||
|
||
UPDATE oppgave o SET behandling_id = svg.spleis_behandling_id | ||
FROM selve_vedtaksperiode_generasjon svg WHERE svg.unik_id = o.generasjon_ref | ||
AND o.status IN ('AvventerSaksbehandler'::oppgavestatus, 'AvventerSystem'::oppgavestatus); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,7 @@ internal class OppgaveTest { | |
private companion object { | ||
private val OPPGAVETYPE = SØKNAD | ||
private val VEDTAKSPERIODE_ID = UUID.randomUUID() | ||
private val BEHANDLING_ID = UUID.randomUUID() | ||
private val UTBETALING_ID = UUID.randomUUID() | ||
private const val SAKSBEHANDLER_IDENT = "Z999999" | ||
private const val SAKSBEHANDLER_EPOST = "[email protected]" | ||
|
@@ -573,6 +574,7 @@ internal class OppgaveTest { | |
id = nextLong(), | ||
tilstand = tilstand, | ||
vedtaksperiodeId = vedtaksperiodeId, | ||
behandlingId = UUID.randomUUID(), | ||
utbetalingId = utbetalingId, | ||
hendelseId = UUID.randomUUID(), | ||
kanAvvises = true, | ||
|
@@ -599,21 +601,22 @@ internal class OppgaveTest { | |
fun equals() { | ||
val gjenopptattOppgave = | ||
Oppgave.nyOppgave( | ||
1L, | ||
VEDTAKSPERIODE_ID, | ||
UTBETALING_ID, | ||
UUID.randomUUID(), | ||
true, | ||
setOf(OPPGAVETYPE), | ||
id = 1L, | ||
vedtaksperiodeId = VEDTAKSPERIODE_ID, | ||
behandlingId = BEHANDLING_ID, | ||
utbetalingId = UTBETALING_ID, | ||
hendelseId = UUID.randomUUID(), | ||
kanAvvises = true, | ||
egenskaper = setOf(OPPGAVETYPE), | ||
) | ||
val oppgave1 = | ||
Oppgave.nyOppgave(OPPGAVE_ID, VEDTAKSPERIODE_ID, UTBETALING_ID, UUID.randomUUID(), true, setOf(SØKNAD)) | ||
Oppgave.nyOppgave(OPPGAVE_ID, VEDTAKSPERIODE_ID, BEHANDLING_ID, UTBETALING_ID, UUID.randomUUID(), true, setOf(SØKNAD)) | ||
val oppgave2 = | ||
Oppgave.nyOppgave(OPPGAVE_ID, VEDTAKSPERIODE_ID, UTBETALING_ID, UUID.randomUUID(), true, setOf(SØKNAD)) | ||
Oppgave.nyOppgave(OPPGAVE_ID, VEDTAKSPERIODE_ID, BEHANDLING_ID, UTBETALING_ID, UUID.randomUUID(), true, setOf(SØKNAD)) | ||
val oppgave3 = | ||
Oppgave.nyOppgave(OPPGAVE_ID, UUID.randomUUID(), UTBETALING_ID, UUID.randomUUID(), true, setOf(SØKNAD)) | ||
Oppgave.nyOppgave(OPPGAVE_ID, UUID.randomUUID(), BEHANDLING_ID, UTBETALING_ID, UUID.randomUUID(), true, setOf(SØKNAD)) | ||
val oppgave4 = | ||
Oppgave.nyOppgave(OPPGAVE_ID, VEDTAKSPERIODE_ID, UTBETALING_ID, UUID.randomUUID(), true, setOf(STIKKPRØVE)) | ||
Oppgave.nyOppgave(OPPGAVE_ID, VEDTAKSPERIODE_ID, BEHANDLING_ID, UTBETALING_ID, UUID.randomUUID(), true, setOf(STIKKPRØVE)) | ||
assertEquals(oppgave1, oppgave2) | ||
assertEquals(oppgave1.hashCode(), oppgave2.hashCode()) | ||
assertNotEquals(oppgave1, oppgave3) | ||
|
@@ -638,13 +641,14 @@ internal class OppgaveTest { | |
): Oppgave { | ||
val totrinnsvurdering = if (medTotrinnsvurdering) totrinnsvurdering() else null | ||
return Oppgave.nyOppgave( | ||
OPPGAVE_ID, | ||
VEDTAKSPERIODE_ID, | ||
UTBETALING_ID, | ||
UUID.randomUUID(), | ||
true, | ||
egenskaper.toSet(), | ||
totrinnsvurdering, | ||
id = OPPGAVE_ID, | ||
vedtaksperiodeId = VEDTAKSPERIODE_ID, | ||
behandlingId = UTBETALING_ID, | ||
utbetalingId = BEHANDLING_ID, | ||
hendelseId = UUID.randomUUID(), | ||
kanAvvises = true, | ||
egenskaper = egenskaper.toSet(), | ||
totrinnsvurdering = totrinnsvurdering, | ||
) | ||
} | ||
|
||
|
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
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.