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


PHP Cases::reassignCase方法代码示例

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


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

示例1: reassignCase

    /**

     * reassign Case

     *

     * @param string sessionId : The session ID (which was obtained during login)

     * @param string caseId : The case ID (which can be obtained with the caseList() function)

     * @param string delIndex : The delegation index number of the case (which can be obtained with the caseList()

     * function).

     * @param string userIdSource : The user who is currently assigned the case.

     * @param string userIdTarget : The target user who will be newly assigned to the case.

     * @return $result will return an object

     */

    public function reassignCase ($sessionId, $caseId, $delIndex, $userIdSource, $userIdTarget)

    {

        $g = new G();



        try {

            $g->sessionVarSave();



            $_SESSION["APPLICATION"] = $caseId;

            $_SESSION["INDEX"] = $delIndex;

            $_SESSION["USER_LOGGED"] = $userIdSource;



            if ($userIdTarget == $userIdSource) {

                $result = new wsResponse( 30, G::loadTranslation( 'ID_TARGET_ORIGIN_USER_SAME' ) );



                $g->sessionVarRestore();



                return $result;

            }



            /**

             * ****************( 1 )*****************

             */

            $oCriteria = new Criteria( 'workflow' );

            $oCriteria->add( UsersPeer::USR_STATUS, 'ACTIVE' );

            $oCriteria->add( UsersPeer::USR_UID, $userIdSource );

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

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

            $oDataset->next();

            $aRow = $oDataset->getRow();



            if (! is_array( $aRow )) {

                $result = new wsResponse( 31, G::loadTranslation( 'ID_INVALID_ORIGIN_USER' ) );



                $g->sessionVarRestore();



                return $result;

            }



            /**

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

示例2: Cases

     G::RenderPage('publish', 'raw');
     break;
     /* @Author Erik Amaru Ortiz <erik@colosa.com> */
 /* @Author Erik Amaru Ortiz <erik@colosa.com> */
 case 'reassignByUser':
     G::LoadClass('case');
     $oCases = new Cases();
     $aCases = array();
     if (isset($_POST['items']) && trim($_POST['items']) != '') {
         $sItems = $_POST['items'];
         $aItems = explode(',', $sItems);
         $FROM_USR_UID = $_POST['USR_UID'];
         foreach ($aItems as $item) {
             list($APP_UID, $USR_UID) = explode('|', $item);
             $aCase = $oCases->loadCaseInCurrentDelegation($APP_UID, true);
             $oCase->reassignCase($aCase['APP_UID'], $aCase['DEL_INDEX'], $FROM_USR_UID, $USR_UID);
             array_push($aCases, $aCase);
         }
         //G::pr($aCases);
         //require_once 'classes/model/Users.php';
         $oUser = new Users();
         $sText = '';
         foreach ($aCases as $aCase) {
             $aCaseUpdated = $oCases->loadCaseInCurrentDelegation($aCase['APP_UID'], true);
             $aUser = $oUser->load($aCaseUpdated['USR_UID']);
             $sText .= $aCaseUpdated['APP_PRO_TITLE'] . ' - ' . ' Case: ' . $aCaseUpdated['APP_NUMBER'] . '# (' . $aCaseUpdated['APP_TAS_TITLE'] . ') <b> => Reassigned to => </b> <font color="blue">' . $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'] . ' [' . $aUser['USR_USERNAME'] . ']' . '</font><br />';
         }
         $G_PUBLISH = new Publisher();
         $aMessage['MESSAGE'] = $sText;
         $aMessage['URL'] = 'cases_ReassignByUser?REASSIGN_USER=' . $_POST['USR_UID'];
         $G_PUBLISH->AddContent('xmlform', 'xmlform', 'cases/cases_ReassignShowInfo', '', $aMessage);
开发者ID:bqevin,项目名称:processmaker,代码行数:31,代码来源:cases_Ajax.php

示例3: Task

    $task = new Task();
    $tasks = $task->load($_SESSION['TASK']);
    $result->data = $case->getUsersToReassign($_SESSION['TASK'], $_SESSION['USER_LOGGED'], $tasks['PRO_UID']);
    print G::json_encode($result);
}
if ($actionAjax == 'reassignCase') {
    $APP_UID = $_REQUEST["APP_UID"];
    $DEL_INDEX = $_REQUEST["DEL_INDEX"];
    $_SESSION['APPLICATION'] = $APP_UID;
    $_SESSION['INDEX'] = $DEL_INDEX;
    $cases = new Cases();
    $user = new Users();
    $app = new Application();
    $TO_USR_UID = $_POST['USR_UID'];
    try {
        $cases->reassignCase($_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], $TO_USR_UID);
        $caseData = $app->load($_SESSION['APPLICATION']);
        $userData = $user->load($TO_USR_UID);
        //print_r($caseData);
        $data['APP_NUMBER'] = $caseData['APP_NUMBER'];
        $data['USER'] = $userData['USR_LASTNAME'] . ' ' . $userData['USR_FIRSTNAME'];
        //TODO change with the farmated username from environment conf
        $result->status = 0;
        $result->msg = G::LoadTranslation('ID_REASSIGNMENT_SUCCESS', SYS_LANG, $data);
    } catch (Exception $e) {
        $result->status = 1;
        $result->msg = $e->getMessage();
    }
    print G::json_encode($result);
}
if ($actionAjax == 'showHistoryMessage') {
开发者ID:bqevin,项目名称:processmaker,代码行数:31,代码来源:casesList_Ajax.php

示例4: reassignCase

 public function reassignCase()
 {
     $cases = new Cases();
     $user = new Users();
     $app = new Application();
     $TO_USR_UID = $_POST['USR_UID'];
     try {
         $cases->reassignCase($_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], $TO_USR_UID);
         $caseData = $app->load($_SESSION['APPLICATION']);
         $userData = $user->load($TO_USR_UID);
         //print_r($caseData);
         $data['APP_NUMBER'] = $caseData['APP_NUMBER'];
         $data['USER'] = $userData['USR_LASTNAME'] . ' ' . $userData['USR_FIRSTNAME'];
         //TODO change with the farmated username from environment conf
         $result->status = 0;
         $result->msg = G::LoadTranslation('ID_REASSIGNMENT_SUCCESS', SYS_LANG, $data);
     } catch (Exception $e) {
         $result->status = 1;
         $result->msg = $e->getMessage();
     }
     print G::json_encode($result);
 }
开发者ID:norahmollo,项目名称:processmaker,代码行数:22,代码来源:ajaxListener.php

示例5: Cases

 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
 * Coral Gables, FL, 33134, USA, or email info@colosa.com.
 *
 */
try {
    G::LoadClass('case');
    $oCase = new Cases();
    foreach ($_POST['USER'] as $sProcessUID => $sUserUID) {
        if ($sUserUID != '') {
            $oCriteria = new Criteria('workflow');
            $oCriteria->addSelectColumn(AppDelegationPeer::APP_UID);
            $oCriteria->addSelectColumn(AppDelegationPeer::DEL_INDEX);
            $oCriteria->add(AppDelegationPeer::PRO_UID, $sProcessUID);
            $oCriteria->add(AppDelegationPeer::USR_UID, $_POST['USR_UID']);
            $oCriteria->add(AppDelegationPeer::DEL_FINISH_DATE, null, Criteria::ISNULL);
            $oDataset = AppDelegationPeer::doSelectRS($oCriteria);
            $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
            $oDataset->next();
            while ($aRow = $oDataset->getRow()) {
                $oCase->reassignCase($aRow['APP_UID'], $aRow['DEL_INDEX'], $_SESSION['USER_LOGGED'], $sUserUID);
                $oDataset->next();
            }
        }
    }
} catch (Exception $oException) {
    die($oException->getMessage());
}
开发者ID:nshong,项目名称:processmaker,代码行数:31,代码来源:users_Reassign.php

示例6: foreach

    die;
}
//      $params = array ();
//      $sql = BasePeer::createSelectSql($oCasesReassignList, $params);
//      var_dump($sql);
if (is_array($aData)) {
    $currentCasesReassigned = 0;
    foreach ($aData as $data) {
        $oTmpReassignCriteria = $oCasesReassignList;
        $oTmpReassignCriteria->add(AppCacheViewPeer::TAS_UID, $data->TAS_UID);
        $rs = AppCacheViewPeer::doSelectRS($oTmpReassignCriteria);
        $rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
        $rs->next();
        $row = $rs->getRow();
        $aCase = $oCases->loadCaseInCurrentDelegation($data->APP_UID);
        $oCases->reassignCase($aCase['APP_UID'], $aCase['DEL_INDEX'], $aCase['USR_UID'] != '' ? $aCase['USR_UID'] : $_SESSION['USER_LOGGED'], $data->APP_REASSIGN_USER_UID);
        $currentCasesReassigned++;
        $casesReassignedCount++;
        $serverResponse[] = array('APP_REASSIGN_USER' => $data->APP_REASSIGN_USER, 'APP_TITLE' => $data->APP_TITLE, 'TAS_TITLE' => $data->APP_TAS_TITLE, 'REASSIGNED_CASES' => $currentCasesReassigned);
    }
} else {
    $oTmpReassignCriteria = $oCasesReassignList;
    $oTmpReassignCriteria->add(AppCacheViewPeer::TAS_UID, $aData->TAS_UID);
    $rs = AppCacheViewPeer::doSelectRS($oTmpReassignCriteria);
    $rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
    $rs->next();
    $row = $rs->getRow();
    $currentCasesReassigned = 0;
    while (is_array($row)) {
        $APP_UID = $row['APP_UID'];
        $aCase = $oCases->loadCaseInCurrentDelegation($APP_UID);
开发者ID:rodrigoivan,项目名称:processmaker,代码行数:31,代码来源:proxySaveReassignCasesList.php

示例7: Cases

         G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
         G::header('location: ../login/login');
         die;
         break;
 }
 G::LoadClass('case');
 $oCase = new Cases();
 $aCases = array();
 $aUsers = array();
 $c = 0;
 if (isset($_POST['USERS'])) {
     if (is_array($_POST['USERS'])) {
         foreach ($_POST['USERS'] as $sKey => $sUser) {
             if ($sUser != '') {
                 $c++;
                 $oCase->reassignCase($_POST['APPLICATIONS'][$sKey], $_POST['INDEXES'][$sKey], $_POST['USR_UID'], $sUser);
                 $aCases[] = $_POST['APPLICATIONS'][$sKey];
                 $aUsers[] = $sUser;
             }
         }
     }
 }
 G::LoadClass('case');
 $oCase = new Cases();
 require_once 'classes/model/Users.php';
 $oUser = new Users();
 $sText = '';
 foreach ($aCases as $sKey => $sCase) {
     $aCase = $oCase->loadCase($sCase);
     $aUser = $oUser->load($aUsers[$sKey]);
     $sText .= $aCase['TITLE'] . ' => ' . $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'] . ' (' . $aUser['USR_USERNAME'] . ')' . '<br />';
开发者ID:nshong,项目名称:processmaker,代码行数:31,代码来源:users_DeleteReassignEnd.php

示例8: reassignCase

 function reassignCase($params)
 {
     $cases = new Cases();
     $cases->reassignCase($_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], $_POST['USR_UID'], $_POST['THETYPE']);
     $this->success = true;
 }
开发者ID:nshong,项目名称:processmaker,代码行数:6,代码来源:adhocUserProxy.php

示例9: Cases

     case -2:
         G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
         G::header('location: ../login/login');
         die;
         break;
     case -1:
         G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
         G::header('location: ../login/login');
         die;
         break;
 }
 //print_r($_POST); die;
 G::LoadClass('case');
 $oCase = new Cases();
 if ($_POST['USERS'] != '') {
     $oCase->reassignCase($_POST['APP_UID'], $_POST['DEL_INDEX'], $_SESSION['USER_LOGGED'], $_POST['USERS']);
 }
 require_once 'classes/model/Users.php';
 $oUser = new Users();
 $aUser = $oUser->load($_POST['USERS']);
 $Fields = array();
 $Fields['USERS'] = $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'] . ' (' . $aUser['USR_USERNAME'] . ')';
 G::LoadClass('case');
 $oCases = new Cases();
 $aCases = $oCases->loadCase($_POST['APP_UID'], $_POST['DEL_INDEX']);
 $Fields['APP_NUMBER'] = $aCases['APP_NUMBER'];
 $G_MAIN_MENU = 'processmaker';
 $G_SUB_MENU = 'cases';
 $G_ID_MENU_SELECTED = 'CASES';
 $G_ID_SUB_MENU_SELECTED = 'CASES_TO_REASSIGN';
 $G_PUBLISH = new Publisher();
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:cases_Reassign_save.php


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