本文整理汇总了PHP中AppDelegationPeer::doSelectOne方法的典型用法代码示例。如果您正苦于以下问题:PHP AppDelegationPeer::doSelectOne方法的具体用法?PHP AppDelegationPeer::doSelectOne怎么用?PHP AppDelegationPeer::doSelectOne使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AppDelegationPeer
的用法示例。
在下文中一共展示了AppDelegationPeer::doSelectOne方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getCurrentDelegation
public function getCurrentDelegation($sApplicationUID = '', $sUserUID = '')
{
$oCriteria = new Criteria();
$oCriteria->add(AppDelegationPeer::APP_UID, $sApplicationUID);
$oCriteria->add(AppDelegationPeer::USR_UID, $sUserUID);
$oCriteria->add(AppDelegationPeer::DEL_THREAD_STATUS, 'OPEN');
$oCriteria->addDescendingOrderByColumn(AppDelegationPeer::DEL_DELEGATE_DATE);
$oApplication = AppDelegationPeer::doSelectOne($oCriteria);
if (!is_null($oApplication)) {
return $oApplication->getDelIndex();
}
//if the user is not in the task, we need to return a valid del index, so we are returning the latest delindex
$oCriteria = new Criteria();
$oCriteria->add(AppDelegationPeer::APP_UID, $sApplicationUID);
$oCriteria->addDescendingOrderByColumn(AppDelegationPeer::DEL_DELEGATE_DATE);
$oApplication = AppDelegationPeer::doSelectOne($oCriteria);
if (!is_null($oApplication)) {
return $oApplication->getDelIndex();
}
throw ( new Exception('this case has 0 delegations') );
}
示例2: getValidateSelfService
public function getValidateSelfService($data)
{
$paused = false;
$data = array_change_key_case($data, CASE_LOWER);
$sTaskUID = $data['act_uid'];
$caseType = isset($data['case_type']) ? $data['case_type'] == 'assigned' ? $data['case_type'] : 'unassigned' : 'unassigned';
$response = new \stdclass();
$oCriteria = new \Criteria();
$arrayCondition = array();
$arrayCondition[] = array(\AppDelegationPeer::APP_UID, \AppDelayPeer::APP_UID);
$arrayCondition[] = array(\AppDelegationPeer::DEL_INDEX, \AppDelayPeer::APP_DEL_INDEX);
$oCriteria->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);
$oCriteria->add(\AppDelegationPeer::TAS_UID, $sTaskUID);
$oCriteria->add(\AppDelayPeer::APP_DISABLE_ACTION_USER, "0");
$oResult = \AppDelegationPeer::doSelectOne($oCriteria);
if (!empty($oResult)) {
$paused = true;
}
$response->paused = $paused;
$oCriteria = new \Criteria();
$oCriteria->add(\AppDelegationPeer::DEL_THREAD_STATUS, "OPEN");
$oCriteria->add(\AppDelegationPeer::TAS_UID, $sTaskUID);
if ($caseType == 'unassigned') {
$oCriteria->add(\AppDelegationPeer::USR_UID, "", \Criteria::EQUAL);
}
$oApplication = \AppDelegationPeer::doSelectOne($oCriteria);
$response->result = true;
if (!empty($oApplication) || $paused) {
$response->result = false;
$response->message = G::LoadTranslation('ID_CURRENT_ASSING_TYPE_WITH_CASES');
}
return $response;
}
示例3: validateAssignType
public function validateAssignType($newValues, $oldValues)
{
if (isset($newValues['TAS_ASSIGN_TYPE']) && isset($oldValues['TAS_ASSIGN_TYPE'])) {
$newAssigType = $newValues['TAS_ASSIGN_TYPE'];
$oldAssigType = $oldValues['TAS_ASSIGN_TYPE'];
if ($newAssigType == 'SELF_SERVICE') {
$newAssigType = isset($newValues['TAS_GROUP_VARIABLE']) ? empty($newValues['TAS_GROUP_VARIABLE']) ? 'SELF_SERVICE' : 'SELF_SERVICE_VALUE_BASED' : 'SELF_SERVICE';
}
if ($oldAssigType == 'SELF_SERVICE') {
$oldAssigType = isset($oldValues['TAS_GROUP_VARIABLE']) ? empty($oldValues['TAS_GROUP_VARIABLE']) ? 'SELF_SERVICE' : 'SELF_SERVICE_VALUE_BASED' : 'SELF_SERVICE';
}
if ($oldAssigType == 'SELF_SERVICE' && $newAssigType != 'SELF_SERVICE' || $oldAssigType == 'SELF_SERVICE_VALUE_BASED' && $newAssigType != 'SELF_SERVICE_VALUE_BASED') {
$oCriteria = new Criteria();
$oCriteria->add(AppDelegationPeer::DEL_THREAD_STATUS, "OPEN");
$oCriteria->add(AppDelegationPeer::TAS_UID, $newValues['TAS_UID']);
$oCriteria->add(AppDelegationPeer::USR_UID, "");
$oApplication = AppDelegationPeer::doSelectOne($oCriteria);
if (!empty($oApplication)) {
throw new Exception(G::LoadTranslation('ID_CURRENT_ASSING_TYPE_WITH_CASES'));
}
}
}
}