Loading documentation/release/3.1.0.md +32 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,15 @@ create or replace View V_PREECOG_CORRESPONDANCE_TYPE AS null AS D_FERMETURE FROM DUAL ; -- ajout de la colonne référencant le type_id dans la vue des correspondances ou recréation de la vue. create or replace VIEW V_PREECOG_CORRESPONDANCE AS select ID, C_BAP, LIB_COURT, LIB_LONG, D_OUVERTURE, D_FERMETURE, 1 AS TYPE_ID -- ATTENTION ICI BRICOLAGE UNICAEN -- from BAP ; ``` Modification de la base de données côté EMC2 Loading Loading @@ -92,6 +101,29 @@ Nouvelle synchro 'preserved_id' => true, ], ], [ 'name' => 'CARRIERE_CORRESPONDANCE', 'order' => 1010, 'source' => [ 'name' => 'octopus', 'code' => 'OCTOPUS', 'select' => " SELECT B.ID AS ID_ORIG, B.C_BAP, B.LIB_COURT, B.LIB_LONG, B.D_OUVERTURE, B.D_FERMETURE, B.TYPE_ID FROM V_PREECOG_CORRESPONDANCE B ", 'connection' => 'octopus', 'source_code_column' => 'ID_ORIG', ], 'destination' => [ 'name' => 'Listing des Correspondances (BAP, ...)', 'table' => 'carriere_correspondance', 'connection' => 'default', 'source_code_column' => 'id_orig', 'intermediate_table_auto_drop' => true, 'preserved_id' => true, ], ], ... ], ``` Loading module/Carriere/src/Carriere/Entity/Db/Correspondance.php +30 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,10 @@ class Correspondance { /** @var ArrayCollection (AgentGrade) */ private $agentGrades; private ?CorrespondanceType $type = null; private ?DateTime $dateOuverture = null; private ?DateTime $dateFermeture = null; /** * @return int */ Loading Loading @@ -114,6 +118,32 @@ class Correspondance { $this->type = $type; } /** * @return DateTime|null */ public function getDateOuverture(): ?DateTime { return $this->dateOuverture; } /** * @param DateTime|null $dateOuverture */ public function setDateOuverture(?DateTime $dateOuverture): void { $this->dateOuverture = $dateOuverture; } public function getDateFermeture(): ?DateTime { return $this->dateFermeture; } public function setDateFermeture(?DateTime $dateFermeture): void { $this->dateFermeture = $dateFermeture; } /** * @return DateTime */ Loading module/Carriere/src/Carriere/Entity/Db/Mapping/Carriere.Entity.Db.Correspondance.dcm.xml +2 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,8 @@ <field name="categorie" column="c_bap" type="string" length="10" /> <field name="libelleCourt" column="lib_court" type="string" length="20" /> <field name="libelleLong" column="lib_long" type="string" length="200" /> <field name="dateOuverture" column="d_ouverture" type="datetime" /> <field name="dateFermeture" column="d_fermeture" type="datetime" /> <many-to-one target-entity="Carriere\Entity\Db\CorrespondanceType" field="type"> <join-column name="type_id" referenced-column-name="id"/> Loading module/Carriere/src/Carriere/Service/Correspondance/CorrespondanceService.php +1 −1 Original line number Diff line number Diff line Loading @@ -64,7 +64,7 @@ class CorrespondanceService { $correspondances = $this->getCorrespondances($champ, $ordre, $avecAgent); $options = []; foreach($correspondances as $correspondance) { $options[$correspondance->getId()] = $correspondance->getCategorie() . " - " . $correspondance->getLibelleLong(); $options[$correspondance->getId()] = (($correspondance->getType())?$correspondance->getType()->getLibelleCourt():""). " ". $correspondance->getLibelleCourt() . " - " . $correspondance->getLibelleLong(); } return $options; } Loading module/Carriere/view/carriere/correspondance/index.phtml +3 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,9 @@ use Carriere\Entity\Db\Correspondance; use Carriere\Provider\Privilege\CorpsPrivileges; $date = new DateTime(); $correspondances = array_filter($correspondances, function (Correspondance $a) use ($date) { return $a->getDateFermeture() === null OR $a->getDateFermeture() > $date;}); $canAfficher = $this->isAllowed(CorpsPrivileges::getResourceId(CorpsPrivileges::CORPS_AFFICHER)); $this->headTitle("Liste des correspondances"); Loading Loading
documentation/release/3.1.0.md +32 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,15 @@ create or replace View V_PREECOG_CORRESPONDANCE_TYPE AS null AS D_FERMETURE FROM DUAL ; -- ajout de la colonne référencant le type_id dans la vue des correspondances ou recréation de la vue. create or replace VIEW V_PREECOG_CORRESPONDANCE AS select ID, C_BAP, LIB_COURT, LIB_LONG, D_OUVERTURE, D_FERMETURE, 1 AS TYPE_ID -- ATTENTION ICI BRICOLAGE UNICAEN -- from BAP ; ``` Modification de la base de données côté EMC2 Loading Loading @@ -92,6 +101,29 @@ Nouvelle synchro 'preserved_id' => true, ], ], [ 'name' => 'CARRIERE_CORRESPONDANCE', 'order' => 1010, 'source' => [ 'name' => 'octopus', 'code' => 'OCTOPUS', 'select' => " SELECT B.ID AS ID_ORIG, B.C_BAP, B.LIB_COURT, B.LIB_LONG, B.D_OUVERTURE, B.D_FERMETURE, B.TYPE_ID FROM V_PREECOG_CORRESPONDANCE B ", 'connection' => 'octopus', 'source_code_column' => 'ID_ORIG', ], 'destination' => [ 'name' => 'Listing des Correspondances (BAP, ...)', 'table' => 'carriere_correspondance', 'connection' => 'default', 'source_code_column' => 'id_orig', 'intermediate_table_auto_drop' => true, 'preserved_id' => true, ], ], ... ], ``` Loading
module/Carriere/src/Carriere/Entity/Db/Correspondance.php +30 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,10 @@ class Correspondance { /** @var ArrayCollection (AgentGrade) */ private $agentGrades; private ?CorrespondanceType $type = null; private ?DateTime $dateOuverture = null; private ?DateTime $dateFermeture = null; /** * @return int */ Loading Loading @@ -114,6 +118,32 @@ class Correspondance { $this->type = $type; } /** * @return DateTime|null */ public function getDateOuverture(): ?DateTime { return $this->dateOuverture; } /** * @param DateTime|null $dateOuverture */ public function setDateOuverture(?DateTime $dateOuverture): void { $this->dateOuverture = $dateOuverture; } public function getDateFermeture(): ?DateTime { return $this->dateFermeture; } public function setDateFermeture(?DateTime $dateFermeture): void { $this->dateFermeture = $dateFermeture; } /** * @return DateTime */ Loading
module/Carriere/src/Carriere/Entity/Db/Mapping/Carriere.Entity.Db.Correspondance.dcm.xml +2 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,8 @@ <field name="categorie" column="c_bap" type="string" length="10" /> <field name="libelleCourt" column="lib_court" type="string" length="20" /> <field name="libelleLong" column="lib_long" type="string" length="200" /> <field name="dateOuverture" column="d_ouverture" type="datetime" /> <field name="dateFermeture" column="d_fermeture" type="datetime" /> <many-to-one target-entity="Carriere\Entity\Db\CorrespondanceType" field="type"> <join-column name="type_id" referenced-column-name="id"/> Loading
module/Carriere/src/Carriere/Service/Correspondance/CorrespondanceService.php +1 −1 Original line number Diff line number Diff line Loading @@ -64,7 +64,7 @@ class CorrespondanceService { $correspondances = $this->getCorrespondances($champ, $ordre, $avecAgent); $options = []; foreach($correspondances as $correspondance) { $options[$correspondance->getId()] = $correspondance->getCategorie() . " - " . $correspondance->getLibelleLong(); $options[$correspondance->getId()] = (($correspondance->getType())?$correspondance->getType()->getLibelleCourt():""). " ". $correspondance->getLibelleCourt() . " - " . $correspondance->getLibelleLong(); } return $options; } Loading
module/Carriere/view/carriere/correspondance/index.phtml +3 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,9 @@ use Carriere\Entity\Db\Correspondance; use Carriere\Provider\Privilege\CorpsPrivileges; $date = new DateTime(); $correspondances = array_filter($correspondances, function (Correspondance $a) use ($date) { return $a->getDateFermeture() === null OR $a->getDateFermeture() > $date;}); $canAfficher = $this->isAllowed(CorpsPrivileges::getResourceId(CorpsPrivileges::CORPS_AFFICHER)); $this->headTitle("Liste des correspondances"); Loading