Skip to content

Commit

Permalink
feat(process-file): Identify 2D-Doc on CVEC
Browse files Browse the repository at this point in the history
  • Loading branch information
juliette-derancourt committed Dec 1, 2023
1 parent b3b7638 commit 18c73c4
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ public String getAuthenticationStatus() {
case INVALID -> analysis.getBarCodeType() == TWO_D_DOC ? "Falsifié" : "Non authentifié";
case API_ERROR -> "Impossible de vérifier l'authenticité auprès de l'émetteur";
case ERROR -> "Erreur lors de l'authentification";
case UNKNOWN_DOCUMENT -> "Non reconnu ou expiré";
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ public enum BarCodeDocumentType {

FREE_INVOICE("Facture Free"),

UNKNOWN("Unknown"),
;
CVEC("Contribution vie étudiante"),

UNKNOWN("Unknown");

private final String label;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ public enum FileAuthenticationStatus {
INVALID,
API_ERROR,
ERROR,
UNKNOWN_DOCUMENT,
;

public static FileAuthenticationStatus of(boolean isAuthentic) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public BarCodeDocumentType getDocumentType() {
case "FPE2" -> BarCodeDocumentType.PUBLIC_PAYSLIP;
case "FRE0" -> BarCodeDocumentType.FREE_INVOICE;
case "THA1" -> BarCodeDocumentType.THALES_PAYSLIP;
case "CNO3" -> BarCodeDocumentType.CVEC;
default -> BarCodeDocumentType.UNKNOWN;
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public boolean isCompatibleWith(Document document) {
DocumentSlot documentSlot = new DocumentSlot(document.getDocumentCategory(), document.getDocumentSubCategory(), document.getGuarantor() != null);
return switch (documentType) {
case TAX_ASSESSMENT -> documentSlot.canReceiveTaxAssessment();
case TAX_DECLARATION -> false;
case TAX_DECLARATION, CVEC -> false;
case PAYFIT_PAYSLIP, SNCF_PAYSLIP, PUBLIC_PAYSLIP, THALES_PAYSLIP -> documentSlot.canReceivePayslip();
case FREE_INVOICE -> documentSlot.canReceiveInvoice();
case UNKNOWN -> true;
Expand Down

0 comments on commit 18c73c4

Please sign in to comment.