Skip to content

Commit

Permalink
punkter for kvalitetssikring
Browse files Browse the repository at this point in the history
  • Loading branch information
JulieHillRoa committed Feb 14, 2025
1 parent 4dac86b commit 67f5775
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package no.nav.veilarbvedtaksstotte.service;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import no.nav.common.types.identer.AktorId;
import no.nav.poao_tilgang.client.TilgangType;
import no.nav.veilarbvedtaksstotte.client.person.VeilarbpersonClient;
Expand All @@ -25,6 +26,7 @@
import static no.nav.veilarbvedtaksstotte.utils.AutentiseringUtils.erBeslutterForVedtak;
import static no.nav.veilarbvedtaksstotte.utils.VedtakUtils.erBeslutterProsessStartet;

@Slf4j
@Service
@RequiredArgsConstructor
public class BeslutterService {
Expand Down Expand Up @@ -139,6 +141,8 @@ public void setGodkjentAvBeslutter(long vedtakId) {
vedtakStatusEndringService.godkjentAvBeslutter(utkast);
meldingRepository.opprettSystemMelding(utkast.getId(), SystemMeldingType.BESLUTTER_HAR_GODKJENT, innloggetVeilederIdent);
metricsService.rapporterTidMellomUtkastOpprettetTilGodkjent(utkast);
// TODO Er det her man burde sette at veileder har godtkjent?
log.info("Vedtak godkjent av beslutter - statistikk");
}

public void oppdaterBeslutterProsessStatus(long vedtakId) {
Expand All @@ -165,10 +169,14 @@ public void oppdaterBeslutterProsessStatus(long vedtakId) {
beslutteroversiktRepository.oppdaterStatus(utkast.getId(), BeslutteroversiktStatus.KLAR_TIL_BESLUTTER);
meldingRepository.opprettSystemMelding(vedtakId, SystemMeldingType.SENDT_TIL_BESLUTTER, innloggetVeilederIdent);
vedtakStatusEndringService.klarTilBeslutter(utkast);
//TODO kanskje det burde være noen sakrad her?
log.info("Sendt til beslutter - statistikk - behandlinggsstatus: SENDT_TIL_KVALITETSSIKRING");
} else {
beslutteroversiktRepository.oppdaterStatus(utkast.getId(), BeslutteroversiktStatus.KLAR_TIL_VEILEDER);
meldingRepository.opprettSystemMelding(vedtakId, SystemMeldingType.SENDT_TIL_VEILEDER, innloggetVeilederIdent);
vedtakStatusEndringService.klarTilVeileder(utkast);
//TODO kanskje det burde være noen sakrad her?
log.info("Sendt til veileder - statistikk - behandlinggsstatus: UNDER_BEHANDLING");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ public void opprettBrukerDialogMelding(long vedtakId, String melding) {

if (erBeslutterForVedtak(innloggetVeilederIdent, utkast)) {
metricsService.repporterDialogMeldingSendtAvVeilederOgBeslutter(melding, "beslutter");
log.debug("opprettBrukerdialogMelding: melding sendt av beslutter ${}", utkast.getBeslutterProsessStatus());
log.info("opprettBrukerdialogMelding: melding sendt av beslutter ${}", utkast.getBeslutterProsessStatus());
//TODO flytte denne koden til beslutterservice isteden?
if (utkast.getBeslutterProsessStatus() == BeslutterProsessStatus.GODKJENT_AV_BESLUTTER) {
sakStatistikkService.kvalitetssikrerGodkjenner(utkast, innloggetVeilederIdent);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class SakStatistikkService @Autowired constructor(
val statistikkPaa = unleashClient.isEnabled(SAK_STATISTIKK_PAA)
val log: Logger = LoggerFactory.getLogger(AiaBackendClientImpl::class.java)
if (statistikkPaa) {
log.debug("Er i kvalitetssikrerGodkjenner - sakstatistikk")
log.info("Er i kvalitetssikrerGodkjenner - sakstatistikk")
val aktorId = AktorId(vedtak.aktorId)
val fnr = aktorOppslagClient.hentFnr(aktorId)

Expand Down

0 comments on commit 67f5775

Please sign in to comment.