示例#1
0
 /**
  * Get actors asssigned to task
  *
  * @param object $httpData{tas_uid, tu_type},
  */
 public function getActorsTask($httpData)
 {
     require_once 'classes/model/TaskUser.php';
     $usersTaskList = array();
     $task = new TaskUser();
     $usersTask = $task->getUsersTask($httpData->tas_uid, $httpData->tu_type);
     foreach ($usersTask->data as $userTask) {
         $usersTaskListItem['TAS_UID'] = $userTask['TAS_UID'];
         if ($userTask['TU_RELATION'] == 1) {
             $usersTaskListItem['USR_USERNAME'] = $userTask['USR_USERNAME'];
             $usersTaskListItem['USR_FIRSTNAME'] = $userTask['USR_FIRSTNAME'];
             $usersTaskListItem['USR_LASTNAME'] = $userTask['USR_LASTNAME'];
         } else {
             $usersTaskListItem['NAME'] = $userTask['GRP_TITLE'];
         }
         $usersTaskListItem['TU_RELATION'] = $userTask['TU_RELATION'];
         $usersTaskListItem['USR_UID'] = $userTask['USR_UID'];
         $usersTaskList[] = $usersTaskListItem;
     }
     $this->data = $usersTaskList;
     $this->totalCount = $usersTask->totalCount;
 }
示例#2
0
 public function getUsersTask($param)
 {
     require_once 'classes/model/TaskUser.php';
     G::LoadClass('configuration');
     $usersTaskList = array();
     $task = new TaskUser();
     $conf = new Configurations();
     $TU_TYPE = 1;
     $usersTask = $task->getUsersTask($param['TAS_UID'], $TU_TYPE);
     foreach ($usersTask->data as $userTask) {
         $usersTaskListItem['TAS_UID'] = $userTask['TAS_UID'];
         if ($userTask['TU_RELATION'] == 1) {
             $usersTaskListItem['USR_USERNAME'] = $userTask['USR_USERNAME'];
             $usersTaskListItem['USR_FIRSTNAME'] = $userTask['USR_FIRSTNAME'];
             $usersTaskListItem['USR_LASTNAME'] = $userTask['USR_LASTNAME'];
         } else {
             $usersTaskListItem['NAME'] = $userTask['GRP_TITLE'];
         }
         $usersTaskListItem['TU_RELATION'] = $userTask['TU_RELATION'];
         $usersTaskListItem['USR_UID'] = $userTask['USR_UID'];
         $usersTaskList[] = $usersTaskListItem;
     }
     $result->data = $usersTaskList;
     $result->totalCount = $usersTask->totalCount;
     print G::json_encode($result);
 }