Skip to content
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

FIX: Overstyring av arbeidsforhold iay #545

Merged
merged 2 commits into from
Sep 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
package no.nav.folketrygdloven.kalkulus.iay.arbeid.v1;

import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;

import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import no.nav.folketrygdloven.kalkulus.felles.v1.Aktør;
import no.nav.folketrygdloven.kalkulus.felles.v1.InternArbeidsforholdRefDto;
import no.nav.folketrygdloven.kalkulus.felles.v1.Periode;
import no.nav.folketrygdloven.kalkulus.iay.IayProsent;
import no.nav.folketrygdloven.kalkulus.kodeverk.ArbeidsforholdHandlingType;

@JsonIgnoreProperties(ignoreUnknown = true)
Expand All @@ -31,17 +35,35 @@ public class ArbeidsforholdOverstyringDto {
@Valid
private ArbeidsforholdHandlingType handling;

@JsonProperty("stillingsprosent")
@Valid
private IayProsent stillingsprosent;

@JsonProperty("arbeidsforholdOverstyrtePerioder")
@Valid
@Size()
private List<Periode> arbeidsforholdOverstyrtePerioder;

public ArbeidsforholdOverstyringDto() {
// default ctor
}

@Deprecated
public ArbeidsforholdOverstyringDto(@Valid @NotNull Aktør arbeidsgiver, @Valid InternArbeidsforholdRefDto arbeidsforholdRefDto, @Valid ArbeidsforholdHandlingType handling) {
this.arbeidsgiver = arbeidsgiver;
this.arbeidsforholdRefDto = arbeidsforholdRefDto;
this.handling = handling;
}

public ArbeidsforholdOverstyringDto(@Valid @NotNull Aktør arbeidsgiver, @Valid InternArbeidsforholdRefDto arbeidsforholdRefDto, @Valid ArbeidsforholdHandlingType handling,
IayProsent stillingsprosent, List<Periode> arbeidsforholdOverstyrtePerioder) {
this.arbeidsgiver = arbeidsgiver;
this.arbeidsforholdRefDto = arbeidsforholdRefDto;
this.handling = handling;
this.stillingsprosent = stillingsprosent;
this.arbeidsforholdOverstyrtePerioder = arbeidsforholdOverstyrtePerioder;
}

public Aktør getArbeidsgiver() {
return arbeidsgiver;
}
Expand Down