Skip to content

Commit

Permalink
Fjernet referenser til omsorgspenger-app som ikke er i bruk (#1740)
Browse files Browse the repository at this point in the history
Co-authored-by: Bjornar Askevold <[email protected]>
  • Loading branch information
albrektsson and baskevold authored Nov 21, 2023
1 parent bf45e6a commit d004825
Show file tree
Hide file tree
Showing 14 changed files with 4 additions and 262 deletions.
7 changes: 0 additions & 7 deletions nais/dev-fss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@ spec:
- name: APP_K9SAK_URL
value: https://k9-sak.nais.preprod.local/k9/sak/api

- name: APP_OMSORGSPENGER_URL
value: https://omsorgspenger-sak.intern.dev.nav.no

# Kafka
- name: BOOTSTRAP_SERVERS
value: b27apvl00045.preprod.local:8443,b27apvl00046.preprod.local:8443,b27apvl00047.preprod.local:8443
Expand Down Expand Up @@ -126,10 +123,6 @@ spec:
- name: AUDITLOGGER_PRODUCT
value: "k9-los-api"

# token scope
- name: OMSORGSPENGER_SAK_SCOPE
value: "api://dev-gcp.omsorgspenger.omsorgspenger-sak/.default"

# feature toggles
- name: NY_OPPGAVESTYRING
value: "true"
Expand Down
7 changes: 0 additions & 7 deletions nais/prod-fss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@ spec:
- name: APP_K9SAK_URL
value: https://k9-sak.nais.adeo.no/k9/sak/api

- name: APP_OMSORGSPENGER_URL
value: https://omsorgspenger-sak.intern.nav.no

# Kafka
- name: BOOTSTRAP_SERVERS
value: a01apvl00145.adeo.no:8443,a01apvl00146.adeo.no:8443,a01apvl00147.adeo.no:8443,a01apvl00148.adeo.no:8443,a01apvl00149.adeo.no:8443,a01apvl00150.adeo.no:8443
Expand Down Expand Up @@ -126,10 +123,6 @@ spec:
- name: AUDITLOGGER_PRODUCT
value: "k9-los-api"

# token scope
- name: OMSORGSPENGER_SAK_SCOPE
value: "api://prod-gcp.omsorgspenger.omsorgspenger-sak/.default"

# feature toggles
- name: NY_OPPGAVESTYRING
value: "true"
Expand Down
3 changes: 0 additions & 3 deletions src/main/kotlin/no/nav/k9/los/Configuration.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ data class Configuration(private val config: ApplicationConfig) {

internal fun pdlUrl() = URI(config.getRequiredString("nav.register_urls.pdl_url", secret = false))
internal fun k9Url() = config.getRequiredString("nav.register_urls.k9_url", secret = false)
internal fun omsorgspengerUrl() = config.getRequiredString("nav.register_urls.omsorgspenger_url", secret = false)

internal fun omsorgspengerSakScope() = config.getRequiredString("nav.scopes.omsorgspenger_sak", secret = false)

internal val abacUsername = config.getRequiredString("nav.abac.system_user", secret = false)
internal val abacPassword = config.getRequiredString("nav.abac.system_user_password", secret = false)
Expand Down
22 changes: 0 additions & 22 deletions src/main/kotlin/no/nav/k9/los/KoinProfiles.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ import no.nav.k9.los.integrasjon.k9.IK9SakService
import no.nav.k9.los.integrasjon.k9.K9SakService
import no.nav.k9.los.integrasjon.k9.K9SakServiceLocal
import no.nav.k9.los.integrasjon.kafka.AsynkronProsesseringV1Service
import no.nav.k9.los.integrasjon.omsorgspenger.IOmsorgspengerService
import no.nav.k9.los.integrasjon.omsorgspenger.OmsorgspengerService
import no.nav.k9.los.integrasjon.omsorgspenger.OmsorgspengerServiceLocal
import no.nav.k9.los.integrasjon.pdl.IPdlService
import no.nav.k9.los.integrasjon.pdl.PdlService
import no.nav.k9.los.integrasjon.pdl.PdlServiceLocal
Expand Down Expand Up @@ -277,7 +274,6 @@ fun common(app: Application, config: Configuration) = module {
pepClient = get(),
azureGraphService = get(),
statistikkRepository = get(),
omsorgspengerService = get()
)
}

Expand Down Expand Up @@ -486,10 +482,6 @@ fun localDevConfig() = module {
K9SakServiceLocal()
}

single<IOmsorgspengerService> {
OmsorgspengerServiceLocal()
}

single<K9SakBerikerInterfaceKludge> {
K9SakBerikerKlientLocal()
}
Expand All @@ -512,13 +504,6 @@ fun preprodConfig(config: Configuration) = module {
)
}

single<IOmsorgspengerService> {
OmsorgspengerService(
configuration = get(),
accessTokenClient = get<AccessTokenClientResolver>().azureV2()
)
}

single { RequestContextService(profile = PREPROD) }

single<IPdlService> {
Expand Down Expand Up @@ -554,13 +539,6 @@ fun prodConfig(config: Configuration) = module {
)
}

single<IOmsorgspengerService> {
OmsorgspengerService(
configuration = get(),
accessTokenClient = get<AccessTokenClientResolver>().azureV2()
)
}

single { RequestContextService(profile = PROD) }

single<IPdlService> {
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

11 changes: 0 additions & 11 deletions src/main/kotlin/no/nav/k9/los/tjenester/konfig/KonfigApis.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ fun Route.KonfigApis() {
val refreshUrlLocal = "ws://localhost:8020/ws"
val k9punsjUrlDev = "https://k9-punsj-frontend.dev.adeo.no/journalpost"
val k9punsjUrlProd = "https://k9-punsj-frontend.nais.adeo.no/journalpost"
val omsorgspengerUrlDev = "https://omsorgspenger-visning.dev.intern.nav.no"
val omsorgspengerUrlProd = "https://omsorgspenger-visning.intern.nav.no"

@Location("/k9-sak-url")
class hentK9SakUrl
Expand All @@ -38,15 +36,6 @@ fun Route.KonfigApis() {
)
}

@Location("/omsorgspenger-url")
class hentOmsorgspengerUrl

get { _: hentOmsorgspengerUrl ->
if (KoinProfile.PREPROD == configuration.koinProfile()) call.respond(Konfig(omsorgspengerUrlDev)) else call.respond(
Konfig(omsorgspengerUrlProd)
)
}

@Location("/refresh-url")
class hentSseUrl

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import no.nav.k9.los.domene.modell.*
import no.nav.k9.los.domene.repository.*
import no.nav.k9.los.integrasjon.abac.IPepClient
import no.nav.k9.los.integrasjon.azuregraph.IAzureGraphService
import no.nav.k9.los.integrasjon.omsorgspenger.IOmsorgspengerService
import no.nav.k9.los.integrasjon.omsorgspenger.OmsorgspengerSakFnrDto
import no.nav.k9.los.integrasjon.pdl.*
import no.nav.k9.los.integrasjon.rest.idToken
import no.nav.k9.los.tjenester.avdelingsleder.nokkeltall.AlleOppgaverHistorikk
Expand Down Expand Up @@ -46,7 +44,6 @@ class OppgaveTjeneste constructor(
private val azureGraphService: IAzureGraphService,
private val pepClient: IPepClient,
private val statistikkRepository: StatistikkRepository,
private val omsorgspengerService: IOmsorgspengerService

) {

Expand Down Expand Up @@ -314,16 +311,6 @@ class OppgaveTjeneste constructor(
val personDto = mapTilPersonDto(person.person)
val oppgaver = hentOppgaver(aktorId)

//sjekker om det finnes en visningsak i omsorgsdager
val oppgaveDto = try {
hentOmsorgsdagerForFnr(query, person.person.navn())
} catch (e: Exception) {
log.info("Feilet ved søk mot omsorgsdager")
null
}
if (oppgaveDto != null) {
oppgaver.add(oppgaveDto)
}
return SokeResultatDto(
ikkeTilgang = person.ikkeTilgang,
person = personDto,
Expand Down Expand Up @@ -375,13 +362,6 @@ class OppgaveTjeneste constructor(
val res = if (personInfo != null) {
val personDto = mapTilPersonDto(personInfo)
val oppgaver: MutableList<OppgaveDto> = hentOppgaver(aktørId)
//sjekker om det finnes en visningsak i omsorgsdager
log.info("aktor => kaller omsorgspenger app")
val oppgaveDto = hentOmsorgsdagerForFnr(personInfo.fnr(), personInfo.navn())
log.info("aktor => omsorgspenger oppgave.saksnummer=${oppgaveDto?.saksnummer}")
if (oppgaveDto != null) {
oppgaver.add(oppgaveDto)
}
SokeResultatDto(
ikkeTilgang = person.ikkeTilgang,
person = personDto,
Expand All @@ -407,47 +387,6 @@ class OppgaveTjeneste constructor(
)
}

private suspend fun hentOmsorgsdagerForFnr(
fnr: String,
navn: String
): OppgaveDto? {
val omsorgspengerSakDto = omsorgspengerService.hentOmsorgspengerSakDto(OmsorgspengerSakFnrDto(fnr))
log.info("Fikk svar fra omsorgsdager=${omsorgspengerSakDto?.saksnummer}")
if (omsorgspengerSakDto != null) {
val statusDto = OppgaveStatusDto(
erReservert = false,
reservertTilTidspunkt = null,
erReservertAvInnloggetBruker = false,
reservertAv = null,
reservertAvNavn = null,
flyttetReservasjon = null
)
//TODO fyll ut denne bedre?
return OppgaveDto(
statusDto,
null,
null,
omsorgspengerSakDto.saksnummer,
navn,
Fagsystem.OMSORGSPENGER.kode,
fnr,
BehandlingType.FORSTEGANGSSOKNAD,
FagsakYtelseType.OMSORGSDAGER,
BehandlingStatus.OPPRETTET,
true,
LocalDateTime.now(),
LocalDateTime.now(),
UUID.randomUUID(),
tilBeslutter = false,
utbetalingTilBruker = false,
avklarArbeidsforhold = false,
selvstendigFrilans = false,
søktGradering = false,
)
}
return null
}

private suspend fun hentOppgaver(aktorId: String): MutableList<OppgaveDto> {
val oppgaver: List<Oppgave> = oppgaveRepository.hentOppgaverMedAktorId(aktorId)
return lagOppgaveDtoer(oppgaver).oppgaver
Expand Down
4 changes: 0 additions & 4 deletions src/main/resources/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ nav {
baseuri = "",
baseuri = ${?OPPGAVE_BASE_URI},
}
scopes {
omsorgspenger_sak : ${?OMSORGSPENGER_SAK_SCOPE}
}
trust_store {
path: ""
path: ${?NAV_TRUSTSTORE_PATH}
Expand All @@ -36,7 +33,6 @@ nav {
register_urls {
pdl_url: ${?PDL_URL}
k9_url: ${?APP_K9SAK_URL}
omsorgspenger_url: ${?APP_OMSORGSPENGER_URL}
}
sak_og_behandling {
gateway: ""
Expand Down
Loading

0 comments on commit d004825

Please sign in to comment.