当前位置: 首页>>代码示例>>PHP>>正文


PHP AppDelegationPeer::doCount方法代码示例

本文整理汇总了PHP中AppDelegationPeer::doCount方法的典型用法代码示例。如果您正苦于以下问题:PHP AppDelegationPeer::doCount方法的具体用法?PHP AppDelegationPeer::doCount怎么用?PHP AppDelegationPeer::doCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AppDelegationPeer的用法示例。


在下文中一共展示了AppDelegationPeer::doCount方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: derivateCase

    /**

     * derivate Case moves the case to the next task in the process according to the routing rules

     *

     * @param string $userId

     * @param string $caseId

     * @param string $delIndex

     * @param array $tasks

     * @param bool   $bExecuteTriggersBeforeAssignment

     * @return $result will return an object

     */

    public function derivateCase ($userId, $caseId, $delIndex, $bExecuteTriggersBeforeAssignment = false, $tasks = array())

    {

        $g = new G();



        try {

            $g->sessionVarSave();



            $_SESSION["APPLICATION"] = $caseId;

            $_SESSION["INDEX"] = $delIndex;

            $_SESSION["USER_LOGGED"] = $userId;



            $sStatus = 'TO_DO';



            $varResponse = '';

            $varTriggers = "\n";



            if ($delIndex == '') {

                $oCriteria = new Criteria( 'workflow' );

                $oCriteria->addSelectColumn( AppDelegationPeer::DEL_INDEX );

                $oCriteria->add( AppDelegationPeer::APP_UID, $caseId );

                $oCriteria->add( AppDelegationPeer::DEL_FINISH_DATE, null, Criteria::ISNULL );



                if (AppDelegationPeer::doCount( $oCriteria ) > 1) {

                    $result = new wsResponse( 20, G::loadTranslation( 'ID_SPECIFY_DELEGATION_INDEX' ) );

                    return $result;

                }



                $oDataset = AppDelegationPeer::doSelectRS( $oCriteria );

                $oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );

                $oDataset->next();

                $aRow = $oDataset->getRow();

                $delIndex = $aRow['DEL_INDEX'];

            }



            $oAppDel = new AppDelegation();

            $appdel = $oAppDel->Load( $caseId, $delIndex );



            if ($userId != $appdel['USR_UID']) {

                $result = new wsResponse( 17, G::loadTranslation( 'ID_CASE_ASSIGNED_ANOTHER_USER' ) );



//.........这里部分代码省略.........
开发者ID:nhenderson,项目名称:processmaker,代码行数:101,代码来源:class.wsBase.php

示例2: getSummary

 /**
  * get the case summary data
  *
  * @param string $httpData->appUid
  * @param string $httpData->delIndex
  * @return array containg the case summary data
  */
 function getSummary($httpData)
 {
     $labels = array();
     $form = new Form('cases/cases_Resume', PATH_XMLFORM, SYS_LANG);
     G::LoadClass('case');
     $case = new Cases();
     foreach ($form->fields as $fieldName => $field) {
         $labels[$fieldName] = $field->label;
     }
     if (isset($_SESSION['_applicationFields']) && $_SESSION['_processData']) {
         $applicationFields = $_SESSION['_applicationFields'];
         unset($_SESSION['_applicationFields']);
         $processData = $_SESSION['_processData'];
         unset($_SESSION['_processData']);
     } else {
         if ($httpData->action == 'sent') {
             // Get the last valid delegation for participated list
             $criteria = new Criteria();
             $criteria->addSelectColumn(AppDelegationPeer::DEL_INDEX);
             $criteria->add(AppDelegationPeer::APP_UID, $httpData->appUid);
             $criteria->add(AppDelegationPeer::DEL_FINISH_DATE, null, Criteria::ISNULL);
             $criteria->addDescendingOrderByColumn(AppDelegationPeer::DEL_INDEX);
             if (AppDelegationPeer::doCount($criteria) > 0) {
                 $dataset = AppDelegationPeer::doSelectRS($criteria);
                 $dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
                 $dataset->next();
                 $row = $dataset->getRow();
                 $httpData->delIndex = $row['DEL_INDEX'];
             }
         }
         $applicationFields = $case->loadCase($httpData->appUid, $httpData->delIndex);
         $process = new Process();
         $processData = $process->load($applicationFields['PRO_UID']);
     }
     $data = array();
     $task = new Task();
     $taskData = $task->load($applicationFields['TAS_UID']);
     $currentUser = $applicationFields['CURRENT_USER'] != '' ? $applicationFields['CURRENT_USER'] : '[' . G::LoadTranslation('ID_UNASSIGNED') . ']';
     $data[] = array('label' => $labels['PRO_TITLE'], 'value' => $processData['PRO_TITLE'], 'section' => $labels['TITLE1']);
     $data[] = array('label' => $labels['TITLE'], 'value' => $applicationFields['TITLE'], 'section' => $labels['TITLE1']);
     $data[] = array('label' => $labels['APP_NUMBER'], 'value' => $applicationFields['APP_NUMBER'], 'section' => $labels['TITLE1']);
     $data[] = array('label' => $labels['STATUS'], 'value' => $applicationFields['STATUS'], 'section' => $labels['TITLE1']);
     $data[] = array('label' => $labels['APP_UID'], 'value' => $applicationFields['APP_UID'], 'section' => $labels['TITLE1']);
     $data[] = array('label' => $labels['CREATOR'], 'value' => $applicationFields['CREATOR'], 'section' => $labels['TITLE1']);
     $data[] = array('label' => $labels['CREATE_DATE'], 'value' => $applicationFields['CREATE_DATE'], 'section' => $labels['TITLE1']);
     $data[] = array('label' => $labels['UPDATE_DATE'], 'value' => $applicationFields['UPDATE_DATE'], 'section' => $labels['TITLE1']);
     $data[] = array('label' => $labels['DESCRIPTION'], 'value' => $applicationFields['DESCRIPTION'], 'section' => $labels['TITLE1']);
     // note added by krlos pacha carlos[at]colosa[dot]com
     //getting this field if it doesn't exist. Related 7994 bug
     $taskData['TAS_TITLE'] = array_key_exists('TAS_TITLE', $taskData) ? $taskData['TAS_TITLE'] : Content::Load("TAS_TITLE", "", $applicationFields['TAS_UID'], SYS_LANG);
     $data[] = array('label' => $labels['TAS_TITLE'], 'value' => $taskData['TAS_TITLE'], 'section' => $labels['TITLE2']);
     $data[] = array('label' => $labels['CURRENT_USER'], 'value' => $currentUser, 'section' => $labels['TITLE2']);
     $data[] = array('label' => $labels['DEL_DELEGATE_DATE'], 'value' => $applicationFields['DEL_DELEGATE_DATE'], 'section' => $labels['TITLE2']);
     $data[] = array('label' => $labels['DEL_INIT_DATE'], 'value' => $applicationFields['DEL_INIT_DATE'], 'section' => $labels['TITLE2']);
     $data[] = array('label' => $labels['DEL_TASK_DUE_DATE'], 'value' => $applicationFields['DEL_TASK_DUE_DATE'], 'section' => $labels['TITLE2']);
     $data[] = array('label' => $labels['DEL_FINISH_DATE'], 'value' => $applicationFields['DEL_FINISH_DATE'], 'section' => $labels['TITLE2']);
     //$data[] = array('label'=>$labels['DYN_UID'] ,           'value' => $processData['PRO_DYNAFORMS']['PROCESS'];, 'section'=>$labels['DYN_UID']);
     return $data;
 }
开发者ID:rodrigoivan,项目名称:processmaker,代码行数:66,代码来源:appProxy.php

示例3: thisIsTheCurrentUser

    public function thisIsTheCurrentUser($sApplicationUID, $iIndex, $sUserUID, $sAction = '', $sURL = '')

    {

        $c = new Criteria('workflow');

        $c->add(AppDelegationPeer::APP_UID, $sApplicationUID);

        $c->add(AppDelegationPeer::DEL_INDEX, $iIndex);

        $c->add(AppDelegationPeer::USR_UID, $sUserUID);

        switch ($sAction) {

            case '':

                return (boolean) AppDelegationPeer::doCount($c);

                break;

            case 'REDIRECT':

                if (!(boolean) AppDelegationPeer::doCount($c)) {

                    $c = new Criteria('workflow');

                    $c->addSelectColumn(UsersPeer::USR_USERNAME);

                    $c->addSelectColumn(UsersPeer::USR_FIRSTNAME);

                    $c->addSelectColumn(UsersPeer::USR_LASTNAME);

                    $c->add(AppDelegationPeer::APP_UID, $sApplicationUID);

                    $c->add(AppDelegationPeer::DEL_INDEX, $iIndex);

                    $c->addJoin(AppDelegationPeer::USR_UID, UsersPeer::USR_UID, Criteria::LEFT_JOIN);

                    $oDataset = AppDelegationPeer::doSelectRs($c);

                    $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);

                    $oDataset->next();

                    $aData = $oDataset->getRow();

                    G::SendMessageText(

                            G::LoadTranslation('ID_CASE_IS_CURRENTLY_WITH_ANOTHER_USER') . ': ' .

                            $aData['USR_FIRSTNAME'] . ' ' . $aData['USR_LASTNAME'] .

                            ' (' . $aData['USR_USERNAME'] . ')', 'error'

                    );

                    G::header('Location: ' . $sURL);

                    die;

                } else {

                    $c->add(AppDelegationPeer::DEL_FINISH_DATE, null, Criteria::ISNULL);

                    if (!(boolean) AppDelegationPeer::doCount($c)) {

                        G::SendMessageText(G::LoadTranslation('ID_CASE_ALREADY_DERIVATED'), 'error');

                        G::header('Location: ' . $sURL);

                        die;

                    }

                }

                break;

            case 'SHOW_MESSAGE':

                if (!(boolean) AppDelegationPeer::doCount($c)) {

                    $c = new Criteria('workflow');

                    $c->addSelectColumn(UsersPeer::USR_USERNAME);

                    $c->addSelectColumn(UsersPeer::USR_FIRSTNAME);

                    $c->addSelectColumn(UsersPeer::USR_LASTNAME);

                    $c->add(AppDelegationPeer::APP_UID, $sApplicationUID);

                    $c->add(AppDelegationPeer::DEL_INDEX, $iIndex);

                    $c->addJoin(AppDelegationPeer::USR_UID, UsersPeer::USR_UID, Criteria::LEFT_JOIN);

                    $oDataset = AppDelegationPeer::doSelectRs($c);

                    $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);

//.........这里部分代码省略.........
开发者ID:nhenderson,项目名称:processmaker,代码行数:101,代码来源:class.case.php

示例4: while

                $criteria->addSelectColumn(AppDelayPeer::APP_UID);
                $criteria->addSelectColumn(AppDelayPeer::APP_DEL_INDEX);
                $criteria->add(AppDelayPeer::PRO_UID, $oData->pro_uid);
                $criteria->add(AppDelayPeer::APP_TYPE, 'PAUSE');
                $criteria->add(AppDelayPeer::APP_DISABLE_ACTION_DATE, null, Criteria::ISNULL);
                $dataset = AppDelayPeer::doSelectRS($criteria);
                if ($dataset->getRecordCount() > 0) {
                    $dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
                    $dataset->next();
                    while ($row = $dataset->getRow()) {
                        $criteria = new Criteria('workflow');
                        $criteria->addSelectColumn(AppDelegationPeer::TAS_UID);
                        $criteria->add(AppDelegationPeer::APP_UID, $row['APP_UID']);
                        $criteria->add(AppDelegationPeer::DEL_INDEX, $row['APP_DEL_INDEX']);
                        $criteria->add(AppDelegationPeer::TAS_UID, $oData->task_uid);
                        $casesNumRec += AppDelegationPeer::doCount($criteria);
                        $dataset->next();
                    }
                }
            }
            $response = new stdclass();
            $response->casesNumRec = $casesNumRec;
            //$json = new Services_JSON();
            $sOutput = Bootstrap::json_encode($response);
            break;
        case "verifyNameFile":
            $response = array();
            $status = "OK";

            $filename = $_POST["filename"];
开发者ID:hpx2206,项目名称:processmaker-1,代码行数:30,代码来源:processes_Ajax.php

示例5: Criteria

         $oCriteria->add(AppDelegationPeer::TAS_UID, $aTasks, Criteria::IN);
         $oCriteria->add($oCriteria->getNewCriterion(AppDelegationPeer::DEL_FINISH_DATE, null, Criteria::ISNULL)->addOr($oCriteria->getNewCriterion(AppDelegationPeer::DEL_FINISH_DATE, '')));
         if (AppDelegationPeer::doCount($oCriteria) > 0) {
             $oStage->color = '#FF0000';
         } else {
             $oCriteria = new Criteria('workflow');
             $oCriteria->add(AppDelegationPeer::APP_UID, $_SESSION['APPLICATION']);
             $oCriteria->add(AppDelegationPeer::TAS_UID, $aTasks, Criteria::IN);
             $oCriteria->add(AppDelegationPeer::DEL_THREAD_STATUS, 'CLOSED');
             if (AppDelegationPeer::doCount($oCriteria) > 0) {
                 $oStage->color = '#006633';
             } else {
                 $oCriteria = new Criteria('workflow');
                 $oCriteria->add(AppDelegationPeer::APP_UID, $_SESSION['APPLICATION']);
                 $oCriteria->add(AppDelegationPeer::TAS_UID, $aTasks, Criteria::IN);
                 if (AppDelegationPeer::doCount($oCriteria) == 0) {
                     $oStage->color = '#939598';
                 }
             }
         }
     }
     $oSM->stages[] = $oStage;
     $oDataset->next();
 }
 foreach ($oSM->stages as $iKey => $oStage) {
     if (isset($oSM->stages[$iKey + 1])) {
         $oDerivation = new stdclass();
         $oDerivation->stage = $oSM->stages[$iKey + 1]->uid;
         $oSM->stages[$iKey]->derivation->to = array($oDerivation);
         $oSM->stages[$iKey]->derivation->type = 0;
     }
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:tracker_Ajax.php


注:本文中的AppDelegationPeer::doCount方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。