649 |
$list_tasks = array(); |
$list_tasks = array(); |
650 |
foreach ($res['result'] as $task) { |
foreach ($res['result'] as $task) { |
651 |
$task['timestamp_log'] = json_decode($task['timestamp_log'], true); |
$task['timestamp_log'] = json_decode($task['timestamp_log'], true); |
652 |
$task['dossier'] = $task['object_id']; |
$task['dossier'] = $task['dossier']; |
653 |
if ($this->get_lien_objet_by_type($task['type']) === 'document_numerise') { |
if ($this->get_lien_objet_by_type($task['type']) === 'document_numerise') { |
654 |
$val_dn = $this->get_document_numerise_data($task['object_id']); |
$val_dn = $this->get_document_numerise_data($task['object_id']); |
655 |
$task['dossier'] = $val_dn['dossier']; |
} |
656 |
|
if ($task['stream'] === 'output') { |
657 |
|
$task['external_uids'] = $this->get_all_external_uids($task['dossier']); |
658 |
} |
} |
659 |
$list_tasks[$task['task']] = $task; |
$list_tasks[$task['task']] = $task; |
660 |
} |
} |
808 |
return $inst_external_uid->getVal('external_uid'); |
return $inst_external_uid->getVal('external_uid'); |
809 |
} |
} |
810 |
|
|
811 |
|
protected function get_all_external_uids($fk_idx) { |
812 |
|
$link_objects = array( |
813 |
|
'dossier_autorisation', |
814 |
|
'dossier', |
815 |
|
'consultation', |
816 |
|
'document_numerise', |
817 |
|
); |
818 |
|
$val_external_uid = array(); |
819 |
|
foreach ($link_objects as $link_object) { |
820 |
|
$external_uid = $this->get_external_uid($fk_idx, $link_object); |
821 |
|
if ($external_uid !== '' && $external_uid !== null) { |
822 |
|
$val_external_uid[$link_object] = $external_uid; |
823 |
|
} |
824 |
|
} |
825 |
|
return $val_external_uid; |
826 |
|
} |
827 |
|
|
828 |
protected function get_demandeurs_data(string $dossier) { |
protected function get_demandeurs_data(string $dossier) { |
829 |
$val_demandeur = array(); |
$val_demandeur = array(); |
830 |
$inst_di = $this->f->get_inst__om_dbform(array( |
$inst_di = $this->f->get_inst__om_dbform(array( |
994 |
)); |
)); |
995 |
$val_ad = $inst_ad->get_json_data(); |
$val_ad = $inst_ad->get_json_data(); |
996 |
$val_ad['txAvis'] = "Voir document joint"; |
$val_ad['txAvis'] = "Voir document joint"; |
997 |
|
if (isset($val_ad['tacite']) === true |
998 |
|
&& $val_ad['tacite'] === 't') { |
999 |
|
// |
1000 |
|
$val_ad['txAvis'] = "Sans objet"; |
1001 |
|
} |
1002 |
return $val_ad; |
return $val_ad; |
1003 |
} |
} |
1004 |
|
|