package org.lilie.services.eliot.impression.donnees.eleve
import org.lilie.services.eliot.impression.utils.ChampPublipostage
-import org.lilie.services.eliot.scolarite.Personne
import java.text.SimpleDateFormat
import org.lilie.services.eliot.applications.ModuleEliot
-import org.lilie.services.eliot.scolarite.StructureEnseignement
import org.lilie.services.eliot.impression.constantes.TypeMedia
import org.lilie.services.eliot.impression.donnees.eleve.absences.AbsencesImpression
import org.lilie.services.eliot.impression.donnees.eleve.absences.RetardImpression
* @author othe
*/
//TOREFACT : extraire un ancêtre commun au requetage absences/notes et au brevet - renommage
-@SuppressWarnings(['PropertyName', 'MethodCount'])
-class EleveImpressionInfo {
+@SuppressWarnings('PropertyName')
+class EleveImpressionInfo extends ResponsableImpression {
// media cible d'impression des données de l'élève
TypeMedia typeMedia
- /**
- * Permet de savoir sur quelle adresse on vaut faire le publipostage
- */
- SelectionAdresseResponsableEnum selectionAdresseResponsable =
- SelectionAdresseResponsableEnum.ADRESSE_RESPONSABLE1
-
- // objet de données associé aux informations d'impression
- // élève
- Personne personne
- // responsable1
- Personne responsable1
- // responsable2
- Personne responsable2
- // structure enseignement
- StructureEnseignement structureEnseignement
-
- // identifiant de la personne
- @ChampPublipostage(applications = [])
- Long personneId
-
// identifiant de la page (combinaison de l'id de la personne et du type de responsable)
@ChampPublipostage(applications = [])
String pageId
-
public String getPageId() {
personneId.toString() + ":" + selectionAdresseResponsable.toString()
}
@ChampPublipostage(applications = [ModuleEliot.ELIOT_ABSENCES, ModuleEliot.ELIOT_NOTES, ModuleEliot.SMS])
String classe_PeriodeFin = ""
@ChampPublipostage(applications = [ModuleEliot.ELIOT_ABSENCES, ModuleEliot.ELIOT_NOTES, ModuleEliot.BREVET, ModuleEliot.SMS])
- String eleve_Nom
- @ChampPublipostage(applications = [ModuleEliot.ELIOT_ABSENCES, ModuleEliot.ELIOT_NOTES, ModuleEliot.BREVET, ModuleEliot.SMS])
- String eleve_Prenom
- @ChampPublipostage(applications = [ModuleEliot.ELIOT_ABSENCES, ModuleEliot.ELIOT_NOTES, ModuleEliot.BREVET, ModuleEliot.SMS])
- String eleve_Regime
- @ChampPublipostage(applications = [ModuleEliot.ELIOT_ABSENCES, ModuleEliot.ELIOT_NOTES, ModuleEliot.BREVET, ModuleEliot.SMS])
- String eleve_Sexe
- @ChampPublipostage(applications = [ModuleEliot.ELIOT_ABSENCES, ModuleEliot.ELIOT_NOTES, ModuleEliot.BREVET, ModuleEliot.SMS])
String eleve_Classe
@ChampPublipostage(applications = [ModuleEliot.ELIOT_ABSENCES, ModuleEliot.ELIOT_NOTES, ModuleEliot.BREVET, ModuleEliot.SMS])
String eleve_ClasseLibelleLong
@ChampPublipostage(applications = [ModuleEliot.ELIOT_ABSENCES, ModuleEliot.ELIOT_NOTES, ModuleEliot.SMS])
String classe_Effectif = ""
@ChampPublipostage(applications = [ModuleEliot.ELIOT_ABSENCES, ModuleEliot.ELIOT_NOTES, ModuleEliot.BREVET, ModuleEliot.SMS])
- String eleve_DateNaissance
- @ChampPublipostage(applications = [ModuleEliot.ELIOT_ABSENCES, ModuleEliot.ELIOT_NOTES, ModuleEliot.BREVET, ModuleEliot.SMS])
String dateDuJour
@ChampPublipostage(applications = [ModuleEliot.ELIOT_ABSENCES, ModuleEliot.ELIOT_NOTES, ModuleEliot.SMS])
JasperReport ligneMatiere = null
- @ChampPublipostage(estChampMemo = true)
- String textSignature
-
- @ChampPublipostage(estChampMemo = true)
- String textAdresse
-
- @ChampPublipostage(estChampMemo = true)
- String textEtablissement
-
- @ChampPublipostage(estChampMemo = true)
- String textCorpsDeLettre
-
- @ChampPublipostage(estChampMemo = true)
- String textInfoEleve
-
- @ChampPublipostage(estChampMemo = true)
- String textObservation
-
- @ChampPublipostage(estChampMemo = true)
- String textTitre
-
- @ChampPublipostage(applications = [ModuleEliot.ELIOT_ABSENCES, ModuleEliot.ELIOT_NOTES, ModuleEliot.SMS])
- String parent_Nom
-
- @ChampPublipostage(applications = [ModuleEliot.ELIOT_ABSENCES, ModuleEliot.ELIOT_NOTES, ModuleEliot.SMS])
- String parent_Prenom
-
- @ChampPublipostage(applications = [ModuleEliot.ELIOT_ABSENCES, ModuleEliot.ELIOT_NOTES, ModuleEliot.SMS])
- String parent_Adresse
-
- @ChampPublipostage(applications = [ModuleEliot.ELIOT_ABSENCES, ModuleEliot.ELIOT_NOTES, ModuleEliot.SMS])
- String parent_CodePostal
-
- @ChampPublipostage(applications = [ModuleEliot.ELIOT_ABSENCES, ModuleEliot.ELIOT_NOTES, ModuleEliot.SMS])
- String parent_Ville
-
@ChampPublipostage(applications = [ModuleEliot.SMS])
String Date_Absence
return tableau
}
- String parent1_Nom
-
- public String getParent1_Nom() {
- getParent_Nom()
- }
-
- String parent1_Prenom
-
- public String getParent1_Prenom() {
- getParent_Prenom()
- }
-
- String parent1_Adresse
-
- public String getParent1_Adresse() {
- getParent_Adresse()
- }
-
- String parent1_CodePostal
-
- public String getParent1_CodePostal() {
- getParent_CodePostal()
- }
-
- String parent1_Ville
-
- public String getParent1_Ville() {
- getParent_Ville()
- }
-
- String parent2_Nom
-
- public String getParent2_Nom() {
- getParent_Nom()
- }
-
- String parent2_Prenom
-
- public String getParent2_Prenom() {
- getParent_Prenom()
- }
-
- String parent2_Adresse
-
- public String getParent2_Adresse() {
- getParent_Adresse()
- }
-
- String parent2_CodePostal
-
- public String getParent2_CodePostal() {
- getParent_CodePostal()
- }
-
- String parent2_Ville
-
- public String getParent2_Ville() {
- getParent_Ville()
- }
-
- public String getParent_Nom() {
- switch (selectionAdresseResponsable) {
- case SelectionAdresseResponsableEnum.ADRESSE_RESPONSABLE1:
- return parent1_Nom
- case SelectionAdresseResponsableEnum.ADRESSE_RESPONSABLE2:
- return parent2_Nom
- }
- }
-
- public String getParent_Prenom() {
- switch (selectionAdresseResponsable) {
- case SelectionAdresseResponsableEnum.ADRESSE_RESPONSABLE1:
- return parent1_Prenom
- case SelectionAdresseResponsableEnum.ADRESSE_RESPONSABLE2:
- return parent2_Prenom
- }
- }
-
- public String getParent_Adresse() {
- switch (selectionAdresseResponsable) {
- case SelectionAdresseResponsableEnum.ADRESSE_RESPONSABLE1:
- return parent1_Adresse
- case SelectionAdresseResponsableEnum.ADRESSE_RESPONSABLE2:
- return parent2_Adresse
- }
- }
-
- public String getParent_Ville() {
- switch (selectionAdresseResponsable) {
- case SelectionAdresseResponsableEnum.ADRESSE_RESPONSABLE1:
- return parent1_Ville
- case SelectionAdresseResponsableEnum.ADRESSE_RESPONSABLE2:
- return parent2_Ville
- }
- }
-
- public String getParent_CodePostal() {
- switch (selectionAdresseResponsable) {
- case SelectionAdresseResponsableEnum.ADRESSE_RESPONSABLE1:
- return parent1_CodePostal
- case SelectionAdresseResponsableEnum.ADRESSE_RESPONSABLE2:
- return parent2_CodePostal
- }
- }
-
- /**
- * indique si le destinataire du publipostage est valide
- */
- public Boolean isDestinataireCourrierValide() {
-
- switch (selectionAdresseResponsable) {
- case SelectionAdresseResponsableEnum.ADRESSE_RESPONSABLE1:
- return (parent1_Nom) &&
- (parent1_Adresse) &&
- (parent1_CodePostal) &&
- (parent1_Ville)
-
- case SelectionAdresseResponsableEnum.ADRESSE_RESPONSABLE2:
- return (parent2_Nom) &&
- (parent2_Adresse) &&
- (parent2_CodePostal) &&
- (parent2_Ville)
-
- }
- }
-
/**
* teste si la destinataire du sms à un numéro de portable
*/
return false
}
-
void setPeriodeDebut(Date dateDebutPeriode) {
classe_PeriodeDebut = df.format(dateDebutPeriode)
}
classe_PeriodeFin = df.format(dateFinPeriode)
}
- /**
- * Permet de savoir si l'adresse 2 est différente de l'adresse 1
- */
- public boolean isAdresse2DifferenteAdresse1() {
-
- if (parent1_Adresse?.trim()?.toLowerCase() != parent2_Adresse?.trim()?.toLowerCase()) {
- return true
- }
-
- if (parent1_CodePostal?.trim()?.toLowerCase() != parent2_CodePostal?.trim()?.toLowerCase()) {
- return true
- }
-
- if (parent1_Ville?.trim()?.toLowerCase() != parent2_Ville?.trim()?.toLowerCase()) {
- return true
- }
-
- return false
- }
-
- /**
- * Permet de savoir si le téléphone portable 2 est différent du téléphone portable 1
- */
- public boolean isPortable2DifferentPortable1() {
- String portable1
- if (responsable1) {
- portable1 = responsable1.getTelephonePortable()
- } else {
- portable1 = ""
- }
-
-
- String portable2
- if (responsable2) {
- portable2 = responsable2.getTelephonePortable()
- } else {
- portable2 = ""
- }
-
- if (portable1 == portable2) {
- return false
- }
-
- return true
- }
-
-
- public String toString() {
- String resultat =
- "Eleve : " +
- eleve_Nom +
- " " +
- eleve_Prenom +
- " Classe prof principal : " + classe_ProfPrincipal +
- " Classe : " + eleve_Classe +
- " Personne id : " + personneId
- return resultat
- }
-
- String parent_portable
-
- public String getParent_portable() {
- switch (selectionAdresseResponsable) {
- case SelectionAdresseResponsableEnum.ADRESSE_RESPONSABLE1:
- if (responsable1) {
- return responsable1.getTelephonePortable()
- } else {
- return ""
- }
- case SelectionAdresseResponsableEnum.ADRESSE_RESPONSABLE2:
- if (responsable2) {
- return responsable2.getTelephonePortable()
- } else {
- return ""
- }
- }
- }
-
/**
* indique si le responsable accepte l'envoi de sms
*/
}
- /**
- * Retourne le responsable associé choisit
- */
- public Personne getResponsable() {
-
- switch (selectionAdresseResponsable) {
- case SelectionAdresseResponsableEnum.ADRESSE_RESPONSABLE1:
- return responsable1
- case SelectionAdresseResponsableEnum.ADRESSE_RESPONSABLE2:
- return responsable2
- }
-
- }
-
public Boolean getSelection(SelectionAdresseResponsableEnum selectionAdresseResponsableEnum) {
}
+ public String toString() {
+ String resultat =
+ "Eleve : " +
+ eleve_Nom +
+ " " +
+ eleve_Prenom +
+ " Classe prof principal : " + classe_ProfPrincipal +
+ " Classe : " + eleve_Classe +
+ " Personne id : " + personneId
+ return resultat
+ }
+
}