Changeset 2972
- Timestamp:
- 06/28/10 08:45:18 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/workflow/inc/local/classes/class.wf_orgchart.php
r2591 r2972 480 480 return $output; 481 481 } 482 483 /** 484 * Return all areas that the employee is a supervisor. 485 * 486 * Search in the organization for all areas that the employee is a supervisor. 487 * @param int $employeeID The ID of employee 488 * @return array Array containing all the areas that the employeee is a supervisor. 489 * @access public 490 */ 491 function getSupervisorAreas($employeeID) { 492 493 if (!$employeeID) { 494 return false; 495 } 496 497 $query = "SELECT 498 a.area_id 499 FROM 500 area a 501 LEFT OUTER JOIN substituicao s ON ((a.area_id = s.area_id) 502 AND (CURRENT_DATE BETWEEN s.data_inicio AND s.data_fim)) 503 WHERE 504 a.titular_funcionario_id = ? OR 505 s.funcionario_id = ? 506 GROUP BY 507 a.area_id"; 508 509 $result = $this->db->query($query, array($employeeID,$employeeID)); 510 if (!$result) 511 return false; 512 513 $output = $result->GetArray(-1); 514 return $output; 515 } 482 516 483 517 /**
Note: See TracChangeset
for help on using the changeset viewer.