/[openfoncier]/trunk/obj/task.class.php
ViewVC logotype

Diff of /trunk/obj/task.class.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 9871 by softime, Fri Jan 22 09:43:34 2021 UTC revision 9872 by softime, Fri Jan 22 10:52:37 2021 UTC
# Line 650  class task extends task_gen { Line 650  class task extends task_gen {
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['dossier'];              $task['dossier'] = $task['dossier'];
             $task['external_uid'] = $this->get_external_uid($task['dossier'], '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          }          }
# Line 807  class task extends task_gen { Line 808  class task extends task_gen {
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(

Legend:
Removed from v.9871  
changed lines
  Added in v.9872

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26