Ignore:
Timestamp:
09/02/10 16:04:25 (14 years ago)
Author:
pereira.jair
Message:

Ticket #1186 - Organograma - Adicionado mobile e homePhone no cartão do funcionario

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/workflow/inc/local/classes/class.wf_orgchart.php

    r3167 r3212  
    155155                $output = $result->GetArray(-1); 
    156156 
     157                return $output; 
     158        } 
     159         
     160        /** 
     161         * Searches for all the supervisors of an organization. 
     162         * 
     163         * This method will search in table areas for all the supervisors and replacement in the organization., todas as áreas que pertencem à organização solicitada. 
     164         * @param int $organizationID the ID of the Organization. 
     165         * @return array Uma array seqüencial contendo as áreas de uma organização e seus titulares e substitutos. Cada linha do array conterá: 
     166         * - area_id 
     167         * - titular_funcionario_id: o id do funcionario titular da área. Corresponde ao uidNumber do funcionário no catálogo Ldap. 
     168         * - substituto_funcionario_id: o id do funcionario que está substituindo o titular temporariamente 
     169         * @access public 
     170         */ 
     171        function getOrganizationSupervisors($organizationID) { 
     172                $query = "  SELECT  
     173                                                a.titular_funcionario_id,  
     174                                                s.funcionario_id as substituto_funcionario_id,  
     175                                                a.area_id 
     176                                        FROM  
     177                                                area a  
     178                                                LEFT OUTER JOIN substituicao s  
     179                                                ON ((a.area_id = s.area_id) AND (CURRENT_DATE BETWEEN s.data_inicio AND s.data_fim)) 
     180                                        WHERE  
     181                                                a.titular_funcionario_id is not null  
     182                                                and a.ativa = 'S'  
     183                                                AND organizacao_id = ? 
     184                                        GROUP BY  
     185                                                a.titular_funcionario_id, 
     186                                                s.funcionario_id,  
     187                                                a.area_id"; 
     188                $result = $this->db->query($query, array($organizationID)); 
     189                $output = $result->GetArray(-1); 
    157190                return $output; 
    158191        } 
Note: See TracChangeset for help on using the changeset viewer.