Skip to content

Commit

Permalink
* Statusmapper Fullmakt backend
Browse files Browse the repository at this point in the history
#deploy-test-dolly-backend
  • Loading branch information
stigus committed Oct 17, 2024
1 parent 36dd4af commit 5568444
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public enum SystemTyper {
INST2("Institusjonsopphold (INST2)"),
KONTOREGISTER("Bankkontoregister"),
KRRSTUB("Digital kontaktinformasjon (DKIF)"),
FULLMAKT("Fullmakt"),
FULLMAKT("Fullmakt (Representasjon)"),
MEDL("Medlemskap (MEDL)"),
ORGANISASJON_FORVALTER("Enhetsregisteret (EREG)"),
PDLIMPORT("Import av personer (TESTNORGE)"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,16 @@
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class BestillingFullmaktStatusMapper {

private static final String OK_STATUS = "Synkronisering mot fullmakt (Representasjon) tok";

public static List<RsStatusRapport> buildFullmaktStatusMap(List<BestillingProgress> progressList) {

Map<String, List<String>> statusMap = new HashMap<>();

progressList.forEach(progress -> {
if (isNotBlank(progress.getFullmaktStatus())) {
if (statusMap.containsKey(progress.getFullmaktStatus())) {
var status = progress.getFullmaktStatus().contains(OK_STATUS) ? "OK" : progress.getFullmaktStatus();
if (statusMap.containsKey(status)) {
statusMap.get(progress.getFullmaktStatus()).add(progress.getIdent());
} else {
statusMap.put(progress.getFullmaktStatus(), listOf(progress.getIdent()));
Expand Down

0 comments on commit 5568444

Please sign in to comment.