コード例 #1
0
ファイル: Cases.php プロジェクト: nhenderson/processmaker
    /**
     * Get list Cases Advanced Search with Paged
     *
     * @param string $start {@from path}
     * @param string $limit {@from path}
     * @param string $sort {@from path}
     * @param string $dir {@from path}
     * @param string $cat_uid {@from path}
     * @param string $pro_uid {@from path}
     * @param string $app_status {@from path}
     * @param string $usr_uid {@from path}
     * @param string $date_from {@from path}
     * @param string $date_to {@from path}
     * @param string $search {@from path}
     * @return array
     *
     * @author Brayan Pereyra (Cochalo) <*****@*****.**>
     * @copyright Colosa - Bolivia
     *
     * @url GET /advanced-search/paged
     */
    public function doGetCasesListAdvancedSearchPaged(
        $start = 0,
        $limit = 0,
        $sort = 'APP_CACHE_VIEW.APP_NUMBER',
        $dir = 'DESC',
        $cat_uid = '',
        $pro_uid = '',
        $app_status = '',
        $usr_uid = '',
        $date_from = '',
        $date_to = '',
        $search = ''
    ) {
        try {
            $dataList['userId'] = $this->getUserId();
            $dataList['action'] = 'search';
            $dataList['paged']  = true;

            $dataList['start'] = $start;
            $dataList['limit'] = $limit;
            $dataList['sort'] = $sort;
            $dataList['dir'] = $dir;
            $dataList['category'] = $cat_uid;
            $dataList['process'] = $pro_uid;
            $dataList['status'] = $app_status;
            $dataList['user'] = $usr_uid;
            $dataList['dateFrom'] = $date_from;
            $dataList['dateTo'] = $date_to;
            $dataList['search'] = $search;
            $oCases = new \ProcessMaker\BusinessModel\Cases();
            $response = $oCases->getList($dataList);
            return $response;
        } catch (\Exception $e) {
            throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
        }
    }
コード例 #2
0
ファイル: Light.php プロジェクト: nhenderson/processmaker
    /**
     * Get list Cases Unassigned
     *
     * @copyright Colosa - Bolivia
     *
     * @url GET /unassigned
     */
    public function doGetCasesListUnassigned(
        $start = 0,
        $limit = 0,
        $sort = 'APP_CACHE_VIEW.APP_NUMBER',
        $dir = 'DESC',
        $cat_uid = '',
        $pro_uid = '',
        $search = '',
        $newestthan = '',
        $oldestthan =''
    ) {
        try {
            $dataList['userId'] = $this->getUserId();
            $dataList['action'] = 'unassigned';
            $dataList['paged']  = false;

            $dataList['start']    = $start;
            $dataList['limit']    = $limit;
            $dataList['sort']     = $sort;
            $dataList['dir']      = ($newestthan != '') ? 'ASC':$dir;
            $dataList['category'] = $cat_uid;
            $dataList['process']  = $pro_uid;
            $dataList['search']   = $search;
            $dataList['newestthan']  = $newestthan;
            $dataList['oldestthan']  = $oldestthan;
            $oCases   = new \ProcessMaker\BusinessModel\Cases();
            $response = $oCases->getList($dataList);
            $result   = $this->parserDataUnassigned($response);
            return $result;
        } catch (\Exception $e) {
            throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
        }
    }
コード例 #3
0
ファイル: Light.php プロジェクト: emildev35/processmaker
 /**
  * Get list Cases Unassigned
  *
  * @copyright Colosa - Bolivia
  *
  * @url GET /unassigned
  */
 public function doGetCasesListUnassigned($start = 0, $limit = 0, $sort = 'APP_CACHE_VIEW.APP_NUMBER', $dir = 'DESC', $cat_uid = '', $pro_uid = '', $search = '', $newestthan = '', $oldestthan = '')
 {
     try {
         $dataList['userId'] = $this->getUserId();
         $dataList['action'] = 'unassigned';
         $dataList['paged'] = false;
         $dataList['start'] = $start;
         $dataList['limit'] = $limit;
         $dataList['sort'] = $sort;
         $dataList['dir'] = $newestthan != '' ? 'ASC' : $dir;
         $dataList['category'] = $cat_uid;
         $dataList['process'] = $pro_uid;
         $dataList['search'] = $search;
         $dataList['newestthan'] = $newestthan;
         $dataList['oldestthan'] = $oldestthan;
         Validator::throwExceptionIfDataNotMetIso8601Format($dataList, $this->arrayFieldIso8601);
         $dataList = DateTime::convertDataToUtc($dataList, $this->arrayFieldIso8601);
         $oCases = new \ProcessMaker\BusinessModel\Cases();
         $response = $oCases->getList($dataList);
         $result = $this->parserDataUnassigned($response);
         return DateTime::convertUtcToIso8601($result, $this->arrayFieldIso8601);
     } catch (\Exception $e) {
         throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
     }
 }