Skip to content

Commit

Permalink
Rettet sorteringsfeil mm
Browse files Browse the repository at this point in the history
  • Loading branch information
rinnan17 committed Nov 13, 2023
1 parent 0f8ae94 commit ef2e76f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<!-- dependencies -->
<bidrag-commons.version>20230516121246_1e60457</bidrag-commons.version>
<bidrag-commons-test.version>1.20230511093912_dc35d81</bidrag-commons-test.version>
<bidrag-transport.version>20231103112350_58df516</bidrag-transport.version>
<bidrag-transport.version>20231113102624_1040a39</bidrag-transport.version>
<bidrag-tilgangskontroll.version>1.9.21</bidrag-tilgangskontroll.version>
<mockito-kotlin.version>5.1.0</mockito-kotlin.version>
<nimbus-jose-jwt.version>9.31</nimbus-jose-jwt.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class HendelserService(private val vedtakKafkaEventProducer: VedtakKafkaEventPro
innkreving = it.innkreving,
beslutning = it.beslutning,
omgjørVedtakId = it.omgjørVedtakId,
referanse = it.referanse,
referanse = it.referanse ?: "",
delytelseId = it.delytelseId,
eksternReferanse = it.eksternReferanse
)
Expand Down
4 changes: 2 additions & 2 deletions src/main/kotlin/no/nav/bidrag/vedtak/service/VedtakService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ class VedtakService(val persistenceService: PersistenceService, val hendelserSer
.filter { stønadsendringRequest ->
eksisterendeStønadsendringListe.any {
stønadsendringRequest.type.toString() == it.type &&
stønadsendringRequest.sak.verdi == it.sak &&
stønadsendringRequest.sak.toString() == it.sak &&
stønadsendringRequest.skyldner.verdi == it.skyldner &&
stønadsendringRequest.kravhaver.verdi == it.kravhaver &&
stønadsendringRequest.mottaker.verdi == it.mottaker &&
Expand All @@ -377,7 +377,7 @@ class VedtakService(val persistenceService: PersistenceService, val hendelserSer

// Sorterer listene likt for å kunne sammenligne perioder
val sortertStønadsendringRequestListe = vedtakRequest.stønadsendringListe!!
.sortedWith(compareBy({ it.type }, { it.skyldner }, { it.kravhaver }, { it.sak }))
.sortedWith(compareBy({ it.type.toString() }, { it.skyldner.verdi }, { it.kravhaver.verdi }, { it.sak.toString() }))

for ((i, stønadsendring) in eksisterendeStønadsendringListe.withIndex()) {
if (!perioderMatcher(stønadsendring.id, sortertStønadsendringRequestListe[i])) {
Expand Down

0 comments on commit ef2e76f

Please sign in to comment.