Skip to content

Commit

Permalink
evolutions et corrections extraction candidatures
Browse files Browse the repository at this point in the history
  • Loading branch information
khergalant committed Feb 22, 2024
1 parent f58e664 commit e49fe39
Show file tree
Hide file tree
Showing 8 changed files with 467 additions and 227 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,13 @@
@Table(name = "candidature")
@Data
@EqualsAndHashCode(of = "idCand")
@ToString(exclude = { "candidat", "pjCands", "formulaireCands", "formulaireCandidatures", "lastTypeDecision",
"formation", "opi" })
@ToString(exclude = { "candidat",
"pjCands",
"formulaireCands",
"formulaireCandidatures",
"lastTypeDecision",
"formation",
"opi" })
@SuppressWarnings("serial")
public class Candidature implements Serializable {

Expand Down Expand Up @@ -179,7 +184,7 @@ public class Candidature implements Serializable {
// bi-directional many-to-one association to SiScolPays
@ManyToOne
@JoinColumns({ @JoinColumn(name = "cod_cat_exo_ext", referencedColumnName = "cod_cat_exo_ext"),
@JoinColumn(name = "typ_siscol", referencedColumnName = "typ_siscol", insertable = false, updatable = false) })
@JoinColumn(name = "typ_siscol", referencedColumnName = "typ_siscol", insertable = false, updatable = false) })
private SiScolCatExoExt siScolCatExoExt;

@Column(name = "comp_exo_ext_cand", length = 200, nullable = true)
Expand Down Expand Up @@ -254,47 +259,17 @@ public class Candidature implements Serializable {

// bi-directional many-to-many association to Tag
@ManyToMany(cascade = CascadeType.MERGE)
@JoinTable(name = "tag_candidature", joinColumns = { @JoinColumn(name = "id_cand") }, inverseJoinColumns = {
@JoinTable(name = "tag_candidature",
joinColumns = { @JoinColumn(name = "id_cand") },
inverseJoinColumns = {
@JoinColumn(name = "id_tag") })
private List<Tag> tags;

/* Attributs Transient */
@Transient
private TypeDecisionCandidature lastTypeDecision;
@Transient
private String datCreCandStr;
@Transient
private String datModTypStatutCandStr;
@Transient
private String datReceptDossierCandStr;
@Transient
private String datTransDossierCandStr;
@Transient
private String datCompletDossierCandStr;
@Transient
private String datIncompletDossierCandStr;
@Transient
private String datAnnulCandStr;
@Transient
private String datModPjForm;
@Transient
private String datNewConfirmCandStr;
@Transient
private String datNewRetourCandStr;
@Transient
private String tagsStr;
@Transient
private String tagsSortable;
@Transient
private String blocNoteStr;
@Transient
private String catExoStr;
@Transient
private String mntChargeStr;
@Transient
private String codOpiStr;
@Transient
private String datPassageOpiStr;

@PrePersist
private void onPrePersist() {
Expand All @@ -308,8 +283,8 @@ private void onPreUpdate() {
}

public Candidature(final String typSiScol, final String user, final Candidat candidat, final Formation formation,
final TypeTraitement typeTraitement, final TypeStatut statut, final Boolean temPropositionCand,
final Boolean temValidTypTraitCand) {
final TypeTraitement typeTraitement, final TypeStatut statut, final Boolean temPropositionCand,
final Boolean temValidTypTraitCand) {
super();
this.typSiScol = typSiScol;
this.temRelanceCand = false;
Expand All @@ -329,7 +304,6 @@ public Candidature() {

/**
* Modifie la liste des PJ
*
* @param pjCand
*/
public void updatePjCand(final PjCand pjCand) {
Expand All @@ -339,7 +313,6 @@ public void updatePjCand(final PjCand pjCand) {

/**
* Modifie la liste des questions
*
* @param questionCand
*/
public void updateQuestionCand(final QuestionCand questionCand) {
Expand All @@ -349,7 +322,6 @@ public void updateQuestionCand(final QuestionCand questionCand) {

/**
* Modifie la liste des Form
*
* @param formulaireCand
*/
public void updateFormulaireCand(final FormulaireCand formulaireCand) {
Expand Down Expand Up @@ -386,7 +358,6 @@ public void removeFormulaireCand(final FormulaireCand formulaireCand) {

/**
* Modifie une decision
*
* @param typeDecision
*/
public void setTypeDecision(final TypeDecisionCandidature typeDecision) {
Expand All @@ -396,7 +367,6 @@ public void setTypeDecision(final TypeDecisionCandidature typeDecision) {

/**
* Supprime une decision
*
* @param typeDecision
*/
public void removeTypeDecision(final TypeDecisionCandidature typeDecision) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import javax.persistence.ManyToOne;
import javax.persistence.PrePersist;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

Expand Down Expand Up @@ -122,15 +121,6 @@ public class TypeDecisionCandidature implements Serializable {
@NotNull
private TypeDecision typeDecision;

@Transient
private String datValidTypeDecCandStr;

@Transient
private String preselectStr;

@Transient
private String preselectDateTypeDecCandStr;

@PrePersist
private void onPrePersist() {
if (datCreTypeDecCand == null) {
Expand Down
38 changes: 38 additions & 0 deletions src/main/java/fr/univlorraine/ecandidat/utils/MethodUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import java.time.Instant;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.time.temporal.Temporal;
Expand Down Expand Up @@ -278,6 +279,30 @@ public static String formatToExport(final String txt) {
return txt;
}

/**
* Formate un Integer
* @param nb
* @return un txt formaté
*/
public static String formatIntToExport(final Integer nb) {
if (nb == null) {
return "";
}
return String.valueOf(nb);
}

/**
* Formate un Boolean
* @param val
* @return un txt formaté
*/
public static String formatBoolToExport(final Boolean val) {
if (val == null) {
return "";
}
return val ? ConstanteUtils.TYP_BOOLEAN_YES : ConstanteUtils.TYP_BOOLEAN_NO;
}

/**
* Formate un texte et supprime les balise HTML
* @param txt
Expand Down Expand Up @@ -531,6 +556,19 @@ public static String formatDate(final LocalDate date, final DateTimeFormatter fo
}
}

/**
* @param date
* @param formatterDate
* @return la date formatee
*/
public static String formatTime(final LocalTime time, final DateTimeFormatter formatterTime) {
if (time == null) {
return "";
} else {
return time.format(formatterTime);
}
}

/** @return la version des WS */
public static String getClassVersion(final Class<?> theClass) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public CtrCandExportWindow(final Commission commission, final List<Candidature>
public CtrCandExportWindow() {
/* Style */
setModal(true);
setWidth(700, Unit.PIXELS);
setWidth(720, Unit.PIXELS);
setResizable(true);
setClosable(true);

Expand Down Expand Up @@ -118,6 +118,7 @@ public CtrCandExportWindow() {
setOptionLeft.add(new ExportListCandidatureOption("telHide", applicationContext.getMessage("export.option.tel", null, UI.getCurrent().getLocale())));
setOptionLeft.add(new ExportListCandidatureOption("telPortHide", applicationContext.getMessage("export.option.telPort", null, UI.getCurrent().getLocale())));
setOptionLeft.add(new ExportListCandidatureOption("mailHide", applicationContext.getMessage("export.option.mail", null, UI.getCurrent().getLocale())));
setOptionLeft.add(new ExportListCandidatureOption("bacHide", applicationContext.getMessage("export.option.bac", null, UI.getCurrent().getLocale())));
setOptionLeft.add(new ExportListCandidatureOption("adresseHide", applicationContext.getMessage("export.option.adresse", null, UI.getCurrent().getLocale())));
setOptionLeft.add(new ExportListCandidatureOption("adresseDiviseHide", applicationContext.getMessage("export.option.adresse.div", null, UI.getCurrent().getLocale())));
setOptionLeft.add(new ExportListCandidatureOption("etablissementHide", applicationContext.getMessage("export.option.etablissement", null, UI.getCurrent().getLocale())));
Expand All @@ -130,9 +131,9 @@ public CtrCandExportWindow() {
setOptionLeft.add(new ExportListCandidatureOption("dateCandHide", applicationContext.getMessage("export.option.dateCand", null, UI.getCurrent().getLocale())));
setOptionLeft.add(new ExportListCandidatureOption("dateTransHide", applicationContext.getMessage("export.option.dateTrans", null, UI.getCurrent().getLocale())));
setOptionLeft.add(new ExportListCandidatureOption("statutHide", applicationContext.getMessage("export.option.statut", null, UI.getCurrent().getLocale())));
setOptionLeft.add(new ExportListCandidatureOption("dateModStatutHide", applicationContext.getMessage("export.option.dateModStatut", null, UI.getCurrent().getLocale())));

final LinkedHashSet<ExportListCandidatureOption> setOptionRight = new LinkedHashSet<>();
setOptionRight.add(new ExportListCandidatureOption("dateModStatutHide", applicationContext.getMessage("export.option.dateModStatut", null, UI.getCurrent().getLocale())));
setOptionRight.add(new ExportListCandidatureOption("dateReceptHide", applicationContext.getMessage("export.option.dateRecept", null, UI.getCurrent().getLocale())));
setOptionRight.add(new ExportListCandidatureOption("dateCompletHide", applicationContext.getMessage("export.option.dateComplet", null, UI.getCurrent().getLocale())));
setOptionRight.add(new ExportListCandidatureOption("dateIncompletHide", applicationContext.getMessage("export.option.dateIncomplet", null, UI.getCurrent().getLocale())));
Expand All @@ -147,7 +148,6 @@ public CtrCandExportWindow() {
setOptionRight.add(new ExportListCandidatureOption("rangHide", applicationContext.getMessage("export.option.rang", null, UI.getCurrent().getLocale())));
setOptionRight.add(new ExportListCandidatureOption("rangReelHide", applicationContext.getMessage("export.option.rangReel", null, UI.getCurrent().getLocale())));
setOptionRight.add(new ExportListCandidatureOption("preselectionHide", applicationContext.getMessage("export.option.preselection", null, UI.getCurrent().getLocale())));
setOptionRight.add(new ExportListCandidatureOption("preselectionDiviseHide", applicationContext.getMessage("export.option.preselection.div", null, UI.getCurrent().getLocale())));
setOptionRight.add(new ExportListCandidatureOption("commentaireHide", applicationContext.getMessage("export.option.commentaire", null, UI.getCurrent().getLocale())));
setOptionRight.add(new ExportListCandidatureOption("confirmHide", applicationContext.getMessage("export.option.confirm", null, UI.getCurrent().getLocale())));
setOptionRight.add(new ExportListCandidatureOption("datNewConfirmHide", applicationContext.getMessage("export.option.datNewConfirm", null, UI.getCurrent().getLocale())));
Expand Down
143 changes: 81 additions & 62 deletions src/main/resources/i18n/backoffice/backoffice-messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -694,68 +694,87 @@ droitprofilind.title = Administrateurs
droitprofilind.window.confirmDelete = Voulez-vous supprimer le profil ''{0}'' \u00E0 l''utilisateur ''{1}'' ?
droitprofilind.window.confirmDeleteTitle = Suppression d'un utilisateur

export.btn.check = Tout cocher
export.btn.uncheck = Tout d\u00E9cocher
export.caption = Choisissez vos colonnes \u00E0 exporter
export.error = Une erreur est survenue lors de la cr\u00E9ation du fichier
export.footer = {0} - nombre de candidatures : {1} - Export\u00E9 le {2}
export.footer.check = Pied de page visible
export.nom.fichier = candidatures-{0}-{1}.xlsx
export.option.adresse = Adresse format\u00E9e
export.option.adresse.div = Adresse fractionn\u00E9e
export.option.avisCand = Avis
export.option.avisValid = Avis valid\u00E9
export.option.catExo = Cat\u00E9gorie situation droits
export.option.civilite = Civilit\u00E9
export.option.cleIne = Cl\u00E9 INE
export.option.codForm = Code formation
export.option.codOpi = Code OPI
export.option.commentaire = Commentaire
export.option.commission = Commission
export.option.compExo = Compl\u00E9ment situation droits
export.option.confirm = Confirmation/D\u00E9sistement
export.option.datAnnul = Date annulation
export.option.datNewConfirm = Date confirm. manuelle/LC
export.option.datNewRetour = Date retour manuelle
export.option.datPassageOpi = Date passage OPI
export.option.dateCand = Date du voeux
export.option.dateComplet = Date statut complet
export.option.dateIncomplet = Date statut incomplet
export.option.dateModPj = Date de derni\u00E8re modification des pi\u00E8ces
export.option.dateModStatut = Date de modification du statut du dossier
export.option.dateRecept = Date de r\u00E9ception
export.option.dateTrans = Date de transmission
export.option.dateValid = Date de validation
export.option.dtnaiss = Date de naissance
export.option.etablissement = Dernier \u00E9tablissement
export.option.etuId = Code \u00E9tudiant
export.option.ine = INE
export.option.langue = Langue
export.option.lastDip = Dernier dipl\u00F4me
export.option.lastLibDip = Dernier dipl\u00F4me (libell\u00E9)
export.option.libForm = Libell\u00E9 formation
export.option.mail = Mail
export.option.mntCharge = Montant restant \u00E0 charge
export.option.motif = Motif
export.option.nationalite = Nationalit\u00E9
export.option.nomPat = Nom patronymique
export.option.nomUsu = Nom usuel
export.option.numDossier = No dossier
export.option.postit = Bloc note
export.option.prenom = Pr\u00E9nom
export.option.preselection = Pr\u00E9s\u00E9lection
export.option.preselection.div = Pr\u00E9s\u00E9lection fractionn\u00E9e
export.option.rang = Rang
export.option.rangReel = Rang r\u00E9el
export.option.statut = Statut du dossier
export.option.tag = Libell\u00E9 des tags
export.option.tel = T\u00E9l\u00E9phone
export.option.telPort = T\u00E9l\u00E9phone portable
export.option.temFc = T\u00E9moin FC
export.option.typeTrait = Type de traitement
export.option.typeTraitValid = Type de traitement valid\u00E9
export.option.userAnnul = Annul\u00E9 par
export.window = Export de candidatures
export.btn.check = Tout cocher
export.btn.uncheck = Tout d\u00E9cocher
export.caption = Choisissez vos colonnes \u00E0 exporter
export.error = Une erreur est survenue lors de la cr\u00E9ation du fichier
export.footer = {0} - nombre de candidatures : {1} - Export\u00E9 le {2}
export.footer.check = Pied de page visible
export.nom.fichier = candidatures-{0}-{1}.xlsx
export.option.adresse = Adresse format\u00E9e
export.option.adresse.div = Adresse fractionn\u00E9e
export.option.avisCand = Avis
export.option.avisValid = Avis valid\u00E9
export.option.bac = Donn\u00E9es baccalaur\u00E9at
export.option.bac.anneeObtBac = Bac Ann\u00E9e
export.option.bac.siScolBacOuxEqu = Bac S\u00E9rie
export.option.bac.siScolCommune = Bac Commune
export.option.bac.siScolDepartement = Bac D\u00E9partement
export.option.bac.siScolEtablissement = Bac Etablissement
export.option.bac.siScolMentionNivBac = Bac Mention
export.option.bac.siScolOpt1Bac = Bac Option 1
export.option.bac.siScolOpt2Bac = Bac Option 2
export.option.bac.siScolOpt3Bac = Bac Option 3
export.option.bac.siScolOpt4Bac = Bac Option 4
export.option.bac.siScolPays = Bac Pays
export.option.bac.siScolSpe1BacTer = Bac Sp\u00E9. 1
export.option.bac.siScolSpe2BacTer = Bac Sp\u00E9. 2
export.option.bac.siScolSpeBacPre = Bac Sp\u00E9. 1\u00E8re
export.option.catExo = Cat\u00E9gorie situation droits
export.option.civilite = Civilit\u00E9
export.option.cleIne = Cl\u00E9 INE
export.option.codForm = Code formation
export.option.codOpi = Code OPI
export.option.commentaire = Commentaire
export.option.commission = Commission
export.option.compExo = Compl\u00E9ment situation droits
export.option.confirm = Confirmation/D\u00E9sistement
export.option.confirm.confirm = CONFIRMATION
export.option.confirm.desist = DESISTEMENT
export.option.datAnnul = Date annulation
export.option.datNewConfirm = Date confirm. manuelle/LC
export.option.datNewRetour = Date retour manuelle
export.option.datPassageOpi = Date passage OPI
export.option.dateCand = Date du voeux
export.option.dateComplet = Date statut complet
export.option.dateIncomplet = Date statut incomplet
export.option.dateModPj = Date de derni\u00E8re modification des pi\u00E8ces
export.option.dateModStatut = Date de modification du statut du dossier
export.option.dateRecept = Date de r\u00E9ception
export.option.dateTrans = Date de transmission
export.option.dateValid = Date de validation
export.option.dtnaiss = Date de naissance
export.option.etablissement = Dernier \u00E9tablissement
export.option.etuId = Code \u00E9tudiant
export.option.ine = INE
export.option.langue = Langue
export.option.lastDip = Dernier dipl\u00F4me
export.option.lastLibDip = Dernier dipl\u00F4me (libell\u00E9)
export.option.libForm = Libell\u00E9 formation
export.option.mail = Mail
export.option.mntCharge = Montant restant \u00E0 charge
export.option.motif = Motif
export.option.nationalite = Nationalit\u00E9
export.option.nomPat = Nom patronymique
export.option.nomUsu = Nom usuel
export.option.numDossier = No dossier
export.option.postit = Bloc note
export.option.prenom = Pr\u00E9nom
export.option.preselectDate = Pr\u00E9s\u00E9l. Date
export.option.preselectHeure = Pr\u00E9s\u00E9l. Heure
export.option.preselectLieu = Pr\u00E9s\u00E9l. Lieu
export.option.preselection = Pr\u00E9s\u00E9lection
export.option.rang = Rang
export.option.rangReel = Rang r\u00E9el
export.option.statut = Statut du dossier
export.option.tag = Libell\u00E9 des tags
export.option.tel = T\u00E9l\u00E9phone
export.option.telPort = T\u00E9l\u00E9phone portable
export.option.temFc = T\u00E9moin FC
export.option.typeTrait = Type de traitement
export.option.typeTraitValid = Type de traitement valid\u00E9
export.option.userAnnul = Annul\u00E9 par
export.window = Export de candidatures

faq.btnNouveau = Nouvelle entr\u00E9e FAQ
faq.table.i18nQuestion = Question\u0009
Expand Down
Loading

0 comments on commit e49fe39

Please sign in to comment.