-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NAV-24387: Forvalter-endepunkt for å kunne korrigere andeler i fagsaker med avvik. #5168
Merged
bragejahren
merged 14 commits into
main
from
feat/forvalter-endepunkt-for-patching-av-fagsaker-med-avvik
Mar 20, 2025
Merged
Changes from 13 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
a28b10a
Legger til ny entitet PatchetAndelTilkjentYtelse med tilhørende repos…
bragejahren 1eb9a33
Lagt til metode i ForvalterService for å finne og korrigere andelerTi…
bragejahren 2f8350f
Legger til forvalter-endepunkt
bragejahren 6be1cc6
Justerer returtype til nytt forvalter-endepunkt for patching av andeler
bragejahren 924ff3d
Fikset liten kompileringsfeil
bragejahren 29a52be
Flytter oppdatering av TilkjentYtelse til OppdaterTilkjentYtelseServi…
bragejahren 153a9a2
Legger til tilgangskontroll og toggle for nytt endepunkt i ForvalterC…
bragejahren 97b4910
Merge branch 'main' into feat/forvalter-endepunkt-for-patching-av-fag…
bragejahren edb80e4
Merge branch 'main' into feat/forvalter-endepunkt-for-patching-av-fag…
bragejahren 5b8a117
Merge branch 'main' into feat/forvalter-endepunkt-for-patching-av-fag…
bragejahren a4f73e0
Merge branch 'main' into feat/forvalter-endepunkt-for-patching-av-fag…
bragejahren c3784d5
Bumper versjon av migrerings-script samt lagt til IF NOT EXISTS ved o…
bragejahren 412d99a
Merge branch 'main' into feat/forvalter-endepunkt-for-patching-av-fag…
bragejahren 53cd2bf
Legger til BaseEntitet felter på PatchetAndelTilkjentYtelse slik at j…
bragejahren File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
74 changes: 74 additions & 0 deletions
74
src/main/kotlin/no/nav/familie/ba/sak/kjerne/beregning/domene/PatchetAndelTilkjentYtelse.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,74 @@ | ||
package no.nav.familie.ba.sak.kjerne.beregning.domene | ||
|
||
import jakarta.persistence.Column | ||
import jakarta.persistence.Convert | ||
import jakarta.persistence.Entity | ||
import jakarta.persistence.EntityListeners | ||
import jakarta.persistence.EnumType | ||
import jakarta.persistence.Enumerated | ||
import jakarta.persistence.Id | ||
import jakarta.persistence.Table | ||
import no.nav.familie.ba.sak.common.BaseEntitet | ||
import no.nav.familie.ba.sak.common.YearMonthConverter | ||
import no.nav.familie.ba.sak.sikkerhet.RollestyringMotDatabase | ||
import java.math.BigDecimal | ||
import java.time.YearMonth | ||
|
||
@EntityListeners(RollestyringMotDatabase::class) | ||
@Entity(name = "PatchetAndelTilkjentYtelse") | ||
@Table(name = "PATCHET_ANDEL_TILKJENT_YTELSE") | ||
data class PatchetAndelTilkjentYtelse( | ||
@Id | ||
@Column(name = "id") | ||
val id: Long, | ||
@Column(name = "behandling_id", nullable = false, updatable = false) | ||
val behandlingId: Long, | ||
@Column(name = "tilkjent_ytelse_id", nullable = false, updatable = false) | ||
var tilkjentYtelseId: Long, | ||
@Column(name = "aktoer_id", nullable = false, updatable = false) | ||
val aktørId: String, | ||
@Column(name = "kalkulert_utbetalingsbelop", nullable = false) | ||
val kalkulertUtbetalingsbeløp: Int, | ||
@Column(name = "stonad_fom", nullable = false, columnDefinition = "DATE") | ||
@Convert(converter = YearMonthConverter::class) | ||
val stønadFom: YearMonth, | ||
@Column(name = "stonad_tom", nullable = false, columnDefinition = "DATE") | ||
@Convert(converter = YearMonthConverter::class) | ||
val stønadTom: YearMonth, | ||
@Enumerated(EnumType.STRING) | ||
@Column(name = "type", nullable = false) | ||
val type: YtelseType, | ||
@Column(name = "sats", nullable = false) | ||
val sats: Int, | ||
@Column(name = "prosent", nullable = false) | ||
val prosent: BigDecimal, | ||
@Column(name = "kilde_behandling_id") | ||
var kildeBehandlingId: Long? = null, | ||
@Column(name = "periode_offset") | ||
var periodeOffset: Long? = null, | ||
@Column(name = "forrige_periode_offset") | ||
var forrigePeriodeOffset: Long? = null, | ||
@Column(name = "nasjonalt_periodebelop") | ||
val nasjonaltPeriodebeløp: Int?, | ||
@Column(name = "differanseberegnet_periodebelop") | ||
val differanseberegnetPeriodebeløp: Int? = null, | ||
) : BaseEntitet() | ||
|
||
fun AndelTilkjentYtelse.tilPatchetAndelTilkjentYtelse(): PatchetAndelTilkjentYtelse = | ||
PatchetAndelTilkjentYtelse( | ||
id = this.id, | ||
behandlingId = this.behandlingId, | ||
tilkjentYtelseId = this.tilkjentYtelse.id, | ||
aktørId = this.aktør.aktørId, | ||
kalkulertUtbetalingsbeløp = this.kalkulertUtbetalingsbeløp, | ||
stønadFom = this.stønadFom, | ||
stønadTom = this.stønadTom, | ||
type = this.type, | ||
sats = this.sats, | ||
prosent = this.prosent, | ||
kildeBehandlingId = this.kildeBehandlingId, | ||
periodeOffset = this.periodeOffset, | ||
forrigePeriodeOffset = this.forrigePeriodeOffset, | ||
nasjonaltPeriodebeløp = this.nasjonaltPeriodebeløp, | ||
differanseberegnetPeriodebeløp = this.differanseberegnetPeriodebeløp, | ||
) |
5 changes: 5 additions & 0 deletions
5
...lin/no/nav/familie/ba/sak/kjerne/beregning/domene/PatchetAndelTilkjentYtelseRepository.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,5 @@ | ||
package no.nav.familie.ba.sak.kjerne.beregning.domene | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository | ||
|
||
interface PatchetAndelTilkjentYtelseRepository : JpaRepository<PatchetAndelTilkjentYtelse, Long> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gir det mening å ha baseentitet her? Feltene i baseentitet vil settes til din bruker og når raden i PATCHET_ANDEL_TILKJENT_YTELSE opprettes, men egentlig er man vel interessert i det som faktisk var på aty'en.