-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dependabot/maven/all-dependencies-abeabe30b3
- Loading branch information
Showing
11 changed files
with
169 additions
and
44 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
35 changes: 35 additions & 0 deletions
35
...ain/kotlin/no/nav/familie/ef/iverksett/behandlingsstatistikk/BehandlingsstatistikkTask.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,35 @@ | ||
package no.nav.familie.ef.iverksett.behandlingsstatistikk | ||
|
||
import no.nav.familie.ef.iverksett.featuretoggle.FeatureToggleService | ||
import no.nav.familie.ef.iverksett.iverksetting.IverksettingRepository | ||
import no.nav.familie.ef.iverksett.iverksetting.domene.IverksettOvergangsstønad | ||
import no.nav.familie.ef.iverksett.repository.findByIdOrThrow | ||
import no.nav.familie.prosessering.AsyncTaskStep | ||
import no.nav.familie.prosessering.TaskStepBeskrivelse | ||
import no.nav.familie.prosessering.domene.Task | ||
import org.springframework.stereotype.Service | ||
import java.util.UUID | ||
|
||
@Service | ||
@TaskStepBeskrivelse( | ||
taskStepType = BehandlingsstatistikkTask.TYPE, | ||
beskrivelse = "Sender melding til behandlingsstatistikk om at behandling er G-omregnet", | ||
settTilManuellOppfølgning = true, | ||
) | ||
class BehandlingsstatistikkTask( | ||
val behandlingsstatistikkService: BehandlingsstatistikkService, | ||
val behandlingsstatistikkProducer: BehandlingsstatistikkProducer, | ||
val iverksettingRepository: IverksettingRepository, | ||
val featureToggleService: FeatureToggleService, | ||
) : AsyncTaskStep { | ||
override fun doTask(task: Task) { | ||
val behandlingId = UUID.fromString(task.payload) | ||
val iverksett = iverksettingRepository.findByIdOrThrow(behandlingId).data as IverksettOvergangsstønad | ||
val behandlingDVH = behandlingsstatistikkService.mapGOmregningIverksettingTilBehandlingDVH(iverksett) | ||
behandlingsstatistikkProducer.sendBehandling(behandlingDVH) | ||
} | ||
|
||
companion object { | ||
const val TYPE = "BehandlingsstatistikkTask" | ||
} | ||
} |
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