diff --git a/appli_sf/src/Command/ImportCommand.php b/appli_sf/src/Command/ImportCommand.php index a6f3acbb99aaefd3edf895a3a8851033907e9ade..b837c3337bd717d041d64edc8fc1673bb5fa9bf2 100644 --- a/appli_sf/src/Command/ImportCommand.php +++ b/appli_sf/src/Command/ImportCommand.php @@ -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();