Commit 2fce249f authored by Cédric Girardot's avatar Cédric Girardot

Feat : Ajoute date de décès dans l'import des individus

Change-Id: I64a279f1d8a7f5a4bd4cd7853c6f8769dab27f4d
parent 3b4cc586
......@@ -129,6 +129,7 @@ class ImportCommand extends Command
$array_value['mail_mdr'] = trim($contentFileLineDetail[11]);
$array_value['libelle'] = trim($contentFileLineDetail[12]);
$array_value['code'] = trim($contentFileLineDetail[13]);
$array_value['date_deces'] = trim($contentFileLineDetail[14]);
try {
$this->addIndividu($array_value);
......@@ -182,6 +183,7 @@ class ImportCommand extends Command
$individu = new Person();
$cr_date = new \DateTime($this->convertDate($array_value['date_naissance']));
$deathDate = $array_value['date_deces'] ? new \DateTime($this->convertDate($array_value['date_deces'])) : null;
$individu
->setPersonNum($array_value['num_ind'])
......@@ -197,7 +199,8 @@ class ImportCommand extends Command
->setDepartmentalHouseMail($array_value['mail_mdr'])
->setPhone($array_value['telephone'])
->setLabel($array_value['libelle'])
->setHelpCode($array_value['code']);
->setHelpCode($array_value['code'])
->setDeathDate($deathDate);
$entityManager->persist($individu);
$entityManager->flush();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment