diff --git a/composer.lock b/composer.lock index 158de302b4ae824f3bfb0633264bc589dae38659..e688adba5839be464225f45c7764802089746896 100755 --- a/composer.lock +++ b/composer.lock @@ -2896,7 +2896,7 @@ "source": { "type": "git", "url": "https://git.unicaen.fr/lib/unicaen/siham.git", - "reference": "cf1929786d816d6cfb7f0646741b9a8296371040" + "reference": "af707552271432f46eb16fe86b0718501d8b2980" }, "require": { "zendframework/zend-mail": "^2.10", @@ -2921,7 +2921,7 @@ } ], "description": "PHP library for SIHAM webservices", - "time": "2021-09-16T12:33:49+00:00" + "time": "2021-09-21T12:38:46+00:00" }, { "name": "unicaen/tbl", @@ -6579,16 +6579,16 @@ }, { "name": "phpdocumentor/type-resolver", - "version": "1.4.0", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" + "reference": "30f38bffc6f24293dadd1823936372dfa9e86e2f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", - "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/30f38bffc6f24293dadd1823936372dfa9e86e2f", + "reference": "30f38bffc6f24293dadd1823936372dfa9e86e2f", "shasum": "" }, "require": { @@ -6596,7 +6596,8 @@ "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "ext-tokenizer": "*" + "ext-tokenizer": "*", + "psalm/phar": "^4.8" }, "type": "library", "extra": { @@ -6620,7 +6621,7 @@ } ], "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "time": "2020-09-17T18:55:26+00:00" + "time": "2021-09-17T15:28:14+00:00" }, { "name": "phpspec/prophecy", diff --git a/data/ddl/table/INTERVENANT.php b/data/ddl/table/INTERVENANT.php index 974c642f7be1bb899b9379e7a31efdf82ec6e371..b1f99a6c720a2e6d4c659287b3408a234c7d9ba3 100644 --- a/data/ddl/table/INTERVENANT.php +++ b/data/ddl/table/INTERVENANT.php @@ -705,6 +705,18 @@ return [ 'position' => 58, 'commentaire' => NULL, ], + 'EXPORT_DATE' => [ + 'name' => 'EXPORT_DATE', + 'type' => 'date', + 'bdd-type' => 'DATE', + 'length' => 0, + 'scale' => NULL, + 'precision' => NULL, + 'nullable' => TRUE, + 'default' => NULL, + 'position' => 59, + 'commentaire' => 'Date du dernier export vers le SIRH', + ], ], 'columns-order' => 'ID,ANNEE_ID,CODE,UTILISATEUR_CODE,STRUCTURE_ID,STATUT_ID,GRADE_ID,DISCIPLINE_ID,CIVILITE_ID,NOM_USUEL,PRENOM,DATE_NAISSANCE,NOM_PATRONYMIQUE,COMMUNE_NAISSANCE,PAYS_NAISSANCE_ID,DEPARTEMENT_NAISSANCE_ID,PAYS_NATIONALITE_ID,TEL_PRO,TEL_PERSO,EMAIL_PRO,EMAIL_PERSO,ADDR_PRECISIONS,ADDR_NUMERO,ADDR_NUMERO_COMPL_ID,ADDR_VOIRIE_ID,ADDR_VOIE,ADDR_LIEU_DIT,ADDR_CODE_POSTAL,ADDR_COMMUNE,ADDR_PAYS_ID,NUMERO_INSEE,NUMERO_INSEE_PROVISOIRE,IBAN,BIC,RIB_HORS_SEPA,AUTRE_1,AUTRE_2,AUTRE_3,AUTRE_4,AUTRE_5,EMPLOYEUR_ID,MONTANT_INDEMNITE_FC,CRITERE_RECHERCHE,SOURCE_ID,SOURCE_CODE,SYNC_STATUT,SYNC_STRUCTURE,HISTO_CREATION,HISTO_CREATEUR_ID,HISTO_MODIFICATION,HISTO_MODIFICATEUR_ID,HISTO_DESTRUCTION,HISTO_DESTRUCTEUR_ID', ]; diff --git a/module/Application/src/Application/Entity/Db/Intervenant.php b/module/Application/src/Application/Entity/Db/Intervenant.php index 807f6e59780e07e808f107a1f28a9cce8d9d03cf..24ae196d41c355e6c195cfe8256fafea7ab278f2 100755 --- a/module/Application/src/Application/Entity/Db/Intervenant.php +++ b/module/Application/src/Application/Entity/Db/Intervenant.php @@ -275,6 +275,11 @@ class Intervenant implements HistoriqueAwareInterface, ResourceInterface, Import */ protected $hasMiseEnPaiement = null; + /** + * @var \DateTime + */ + protected $exportDate; + /** @@ -1216,6 +1221,30 @@ class Intervenant implements HistoriqueAwareInterface, ResourceInterface, Import + /** + * @return \DateTime + */ + public function getExportDate(): ?\DateTime + { + return $this->exportDate; + } + + + + /** + * @param \DateTime $exportDate + * + * @return Intervenant + */ + public function setExportDate(?\DateTime $exportDate): Intervenant + { + $this->exportDate = $exportDate; + + return $this; + } + + + public function getValidite(): string { if (!$this->validiteDebut && !$this->validiteFin) { diff --git a/module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.Intervenant.dcm.xml b/module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.Intervenant.dcm.xml index 5925f11676a5de41f324682febc80dec516c988b..e299e02e300eabf83982422f2356178903ea2123 100755 --- a/module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.Intervenant.dcm.xml +++ b/module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.Intervenant.dcm.xml @@ -86,6 +86,7 @@ <field name="validiteDebut" type="datetime" column="VALIDITE_DEBUT" nullable="true"/> <field name="validiteFin" type="datetime" column="VALIDITE_FIN" nullable="true"/> + <field name="exportDate" type="datetime" column="EXPORT_DATE" nullable="true"/> <many-to-one field="source" target-entity="UnicaenImport\Entity\Db\Source"> <join-column name="SOURCE_ID" referenced-column-name="ID"/> diff --git a/module/Application/src/Application/Service/IntervenantService.php b/module/Application/src/Application/Service/IntervenantService.php index 097b1ca12fad1a681c133bcb1445601afc3155f2..2d29edadf9a5968fa4063c1730211bc3a1adab2a 100755 --- a/module/Application/src/Application/Service/IntervenantService.php +++ b/module/Application/src/Application/Service/IntervenantService.php @@ -580,4 +580,16 @@ class IntervenantService extends AbstractEntityService return $intervenant; } + + + public function updateExportDate(Intervenant $intervenant): Intervenant + { + $date = new \DateTime(); + $intervenant->setExportDate($date); + $this->getEntityManager()->persist($intervenant); + $this->getEntityManager()->flush(); + + return $intervenant; + } + }