+ CS
Moved declaration of cli function to cliWorskpaces
This commit is contained in:
@@ -1,16 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
CLI::taskName('list-ids');
|
|
||||||
CLI::taskDescription(<<<EOT
|
|
||||||
Complete the PRO_ID and USR_ID in the LIST_* tables.
|
|
||||||
EOT
|
|
||||||
);
|
|
||||||
CLI::taskOpt("lang", "", "lLANG", "lang=LANG");
|
|
||||||
CLI::taskArg('workspace');
|
|
||||||
CLI::taskRun("list_ids");
|
|
||||||
G::LoadClass("wsTools");
|
|
||||||
|
|
||||||
function list_ids($command, $args)
|
function cliListIds($command, $args)
|
||||||
{
|
{
|
||||||
|
G::LoadClass("wsTools");
|
||||||
CLI::logging("list-ids INIT\n");
|
CLI::logging("list-ids INIT\n");
|
||||||
|
|
||||||
$workspaces = get_workspaces_from_args($command);
|
$workspaces = get_workspaces_from_args($command);
|
||||||
@@ -18,9 +10,12 @@ function list_ids($command, $args)
|
|||||||
foreach ($workspaces as $index => $workspace) {
|
foreach ($workspaces as $index => $workspace) {
|
||||||
$hostPort1 = explode(":", $workspace->dbInfo['DB_HOST']);
|
$hostPort1 = explode(":", $workspace->dbInfo['DB_HOST']);
|
||||||
$hostPort = $hostPort1[0] . (isset($hostPort[1]) ? ";port=" . $hostPort[1] : "");
|
$hostPort = $hostPort1[0] . (isset($hostPort[1]) ? ";port=" . $hostPort[1] : "");
|
||||||
$connectionString = sprintf("%s:host=%s;dbname=%s",
|
$connectionString = sprintf(
|
||||||
$workspace->dbInfo['DB_ADAPTER'], $hostPort,
|
"%s:host=%s;dbname=%s",
|
||||||
$workspace->dbInfo['DB_NAME']);
|
$workspace->dbInfo['DB_ADAPTER'],
|
||||||
|
$hostPort,
|
||||||
|
$workspace->dbInfo['DB_NAME']
|
||||||
|
);
|
||||||
$dbh = new PDO(
|
$dbh = new PDO(
|
||||||
$connectionString,
|
$connectionString,
|
||||||
$workspace->dbInfo['DB_USER'],
|
$workspace->dbInfo['DB_USER'],
|
||||||
|
|||||||
@@ -313,6 +313,21 @@ EOT
|
|||||||
CLI::taskArg('workspace', true, true);
|
CLI::taskArg('workspace', true, true);
|
||||||
CLI::taskRun("run_migrate_self_service_value");
|
CLI::taskRun("run_migrate_self_service_value");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Complete the PRO_ID and USR_ID in the LIST_* tables.
|
||||||
|
*
|
||||||
|
* It calls the list_ids@cliListIds.php
|
||||||
|
*/
|
||||||
|
CLI::taskName('list-ids');
|
||||||
|
CLI::taskDescription(<<<EOT
|
||||||
|
Complete the PRO_ID and USR_ID in the LIST_* tables.
|
||||||
|
EOT
|
||||||
|
);
|
||||||
|
CLI::taskOpt("lang", "", "lLANG", "lang=LANG");
|
||||||
|
CLI::taskArg('workspace');
|
||||||
|
CLI::taskRun("cliListIds");
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function run_info
|
* Function run_info
|
||||||
* access public
|
* access public
|
||||||
|
|||||||
@@ -14,7 +14,10 @@ require_once 'classes/model/om/BaseListCanceled.php';
|
|||||||
*
|
*
|
||||||
* @package classes.model
|
* @package classes.model
|
||||||
*/
|
*/
|
||||||
class ListCanceled extends BaseListCanceled {
|
// @codingStandardsIgnoreStart
|
||||||
|
class ListCanceled extends BaseListCanceled
|
||||||
|
{
|
||||||
|
// @codingStandardsIgnoreEnd
|
||||||
/**
|
/**
|
||||||
* Create List Canceled Table
|
* Create List Canceled Table
|
||||||
*
|
*
|
||||||
@@ -215,11 +218,17 @@ class ListCanceled extends BaseListCanceled {
|
|||||||
|
|
||||||
if ($search != '') {
|
if ($search != '') {
|
||||||
$criteria->add(
|
$criteria->add(
|
||||||
$criteria->getNewCriterion('CON_APP.CON_VALUE', '%' . $search . '%', Criteria::LIKE)->addOr(
|
$criteria->getNewCriterion('CON_APP.CON_VALUE', '%' . $search . '%', Criteria::LIKE)
|
||||||
$criteria->getNewCriterion('CON_TAS.CON_VALUE', '%' . $search . '%', Criteria::LIKE)->addOr(
|
->addOr(
|
||||||
$criteria->getNewCriterion(ListCanceledPeer::APP_UID, $search, Criteria::EQUAL)->addOr(
|
$criteria->getNewCriterion('CON_TAS.CON_VALUE', '%' . $search . '%', Criteria::LIKE)
|
||||||
|
->addOr(
|
||||||
|
$criteria->getNewCriterion(ListCanceledPeer::APP_UID, $search, Criteria::EQUAL)
|
||||||
|
->addOr(
|
||||||
$criteria->getNewCriterion(ListCanceledPeer::APP_NUMBER, $search, Criteria::EQUAL)
|
$criteria->getNewCriterion(ListCanceledPeer::APP_NUMBER, $search, Criteria::EQUAL)
|
||||||
))));
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($process != '') {
|
if ($process != '') {
|
||||||
@@ -246,8 +255,19 @@ class ListCanceled extends BaseListCanceled {
|
|||||||
$dateTo = $dateTo . " 23:59:59";
|
$dateTo = $dateTo . " 23:59:59";
|
||||||
}
|
}
|
||||||
|
|
||||||
$criteria->add( $criteria->getNewCriterion( ListCanceledPeer::DEL_DELEGATE_DATE, $dateFrom, Criteria::GREATER_EQUAL )->
|
$criteria->add(
|
||||||
addAnd( $criteria->getNewCriterion( ListCanceledPeer::DEL_DELEGATE_DATE, $dateTo, Criteria::LESS_EQUAL ) ) );
|
$criteria->getNewCriterion(
|
||||||
|
ListCanceledPeer::DEL_DELEGATE_DATE,
|
||||||
|
$dateFrom,
|
||||||
|
Criteria::GREATER_EQUAL
|
||||||
|
)->addAnd(
|
||||||
|
$criteria->getNewCriterion(
|
||||||
|
ListCanceledPeer::DEL_DELEGATE_DATE,
|
||||||
|
$dateTo,
|
||||||
|
Criteria::LESS_EQUAL
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
$dateFrom = $dateFrom . " 00:00:00";
|
$dateFrom = $dateFrom . " 00:00:00";
|
||||||
|
|
||||||
@@ -336,4 +356,3 @@ class ListCanceled extends BaseListCanceled {
|
|||||||
return (int)$aRow['TOTAL'];
|
return (int)$aRow['TOTAL'];
|
||||||
}
|
}
|
||||||
} // ListCanceled
|
} // ListCanceled
|
||||||
|
|
||||||
|
|||||||
@@ -14,8 +14,10 @@ require_once 'classes/model/om/BaseListCompleted.php';
|
|||||||
*
|
*
|
||||||
* @package classes.model
|
* @package classes.model
|
||||||
*/
|
*/
|
||||||
|
// @codingStandardsIgnoreStart
|
||||||
class ListCompleted extends BaseListCompleted
|
class ListCompleted extends BaseListCompleted
|
||||||
{
|
{
|
||||||
|
// @codingStandardsIgnoreEnd
|
||||||
/**
|
/**
|
||||||
* Create List Completed Table
|
* Create List Completed Table
|
||||||
*
|
*
|
||||||
@@ -207,11 +209,17 @@ class ListCompleted extends BaseListCompleted
|
|||||||
|
|
||||||
if ($search != '') {
|
if ($search != '') {
|
||||||
$criteria->add(
|
$criteria->add(
|
||||||
$criteria->getNewCriterion('CON_APP.CON_VALUE', '%' . $search . '%', Criteria::LIKE)->addOr(
|
$criteria->getNewCriterion('CON_APP.CON_VALUE', '%' . $search . '%', Criteria::LIKE)
|
||||||
$criteria->getNewCriterion('CON_TAS.CON_VALUE', '%' . $search . '%', Criteria::LIKE)->addOr(
|
->addOr(
|
||||||
$criteria->getNewCriterion(ListCompletedPeer::APP_UID, $search, Criteria::EQUAL)->addOr(
|
$criteria->getNewCriterion('CON_TAS.CON_VALUE', '%' . $search . '%', Criteria::LIKE)
|
||||||
|
->addOr(
|
||||||
|
$criteria->getNewCriterion(ListCompletedPeer::APP_UID, $search, Criteria::EQUAL)
|
||||||
|
->addOr(
|
||||||
$criteria->getNewCriterion(ListCompletedPeer::APP_NUMBER, $search, Criteria::EQUAL)
|
$criteria->getNewCriterion(ListCompletedPeer::APP_NUMBER, $search, Criteria::EQUAL)
|
||||||
))));
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($process != '') {
|
if ($process != '') {
|
||||||
@@ -238,8 +246,19 @@ class ListCompleted extends BaseListCompleted
|
|||||||
$dateTo = $dateTo . " 23:59:59";
|
$dateTo = $dateTo . " 23:59:59";
|
||||||
}
|
}
|
||||||
|
|
||||||
$criteria->add( $criteria->getNewCriterion( ListCompletedPeer::DEL_DELEGATE_DATE, $dateFrom, Criteria::GREATER_EQUAL )->
|
$criteria->add(
|
||||||
addAnd( $criteria->getNewCriterion( ListCompletedPeer::DEL_DELEGATE_DATE, $dateTo, Criteria::LESS_EQUAL ) ) );
|
$criteria->getNewCriterion(
|
||||||
|
ListCompletedPeer::DEL_DELEGATE_DATE,
|
||||||
|
$dateFrom,
|
||||||
|
Criteria::GREATER_EQUAL
|
||||||
|
)->addAnd(
|
||||||
|
$criteria->getNewCriterion(
|
||||||
|
ListCompletedPeer::DEL_DELEGATE_DATE,
|
||||||
|
$dateTo,
|
||||||
|
Criteria::LESS_EQUAL
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
$dateFrom = $dateFrom . " 00:00:00";
|
$dateFrom = $dateFrom . " 00:00:00";
|
||||||
|
|
||||||
@@ -325,4 +344,3 @@ class ListCompleted extends BaseListCompleted
|
|||||||
return (int)$aRow['TOTAL'];
|
return (int)$aRow['TOTAL'];
|
||||||
}
|
}
|
||||||
} // ListCompleted
|
} // ListCompleted
|
||||||
|
|
||||||
|
|||||||
@@ -13,9 +13,10 @@ require_once 'classes/model/om/BaseListInbox.php';
|
|||||||
*
|
*
|
||||||
* @package classes.model
|
* @package classes.model
|
||||||
*/
|
*/
|
||||||
|
// @codingStandardsIgnoreStart
|
||||||
class ListInbox extends BaseListInbox
|
class ListInbox extends BaseListInbox
|
||||||
{
|
{
|
||||||
|
// @codingStandardsIgnoreEnd
|
||||||
/**
|
/**
|
||||||
* Create List Inbox Table
|
* Create List Inbox Table
|
||||||
*
|
*
|
||||||
@@ -141,7 +142,11 @@ class ListInbox extends BaseListInbox
|
|||||||
$listParticipatedLast = new ListParticipatedLast();
|
$listParticipatedLast = new ListParticipatedLast();
|
||||||
$listParticipatedLast->refresh($data);
|
$listParticipatedLast->refresh($data);
|
||||||
} else {
|
} else {
|
||||||
if (isset($data["APP_UID"]) && isset($data["USER_UID"]) && isset($data["DEL_INDEX"]) && isset($data["APP_TITLE"])) {
|
if (isset($data["APP_UID"]) &&
|
||||||
|
isset($data["USER_UID"]) &&
|
||||||
|
isset($data["DEL_INDEX"]) &&
|
||||||
|
isset($data["APP_TITLE"])
|
||||||
|
) {
|
||||||
//Update
|
//Update
|
||||||
//Update - SET
|
//Update - SET
|
||||||
$criteriaSet = new Criteria("workflow");
|
$criteriaSet = new Criteria("workflow");
|
||||||
@@ -157,7 +162,10 @@ class ListInbox extends BaseListInbox
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if((array_key_exists('TAS_UID', $data) && isset($data['TAS_UID'])) && (array_key_exists('TAS_UID', $data) && isset($data['PRO_UID'])) && isset($data['APP_UID'])) {
|
if ((array_key_exists('TAS_UID', $data) && isset($data['TAS_UID'])) &&
|
||||||
|
(array_key_exists('TAS_UID', $data) && isset($data['PRO_UID'])) &&
|
||||||
|
isset($data['APP_UID'])
|
||||||
|
) {
|
||||||
$data['DEL_PRIORITY'] = $this->getTaskPriority($data['TAS_UID'], $data['PRO_UID'], $data["APP_UID"]);
|
$data['DEL_PRIORITY'] = $this->getTaskPriority($data['TAS_UID'], $data['PRO_UID'], $data["APP_UID"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -255,8 +263,11 @@ class ListInbox extends BaseListInbox
|
|||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function newRow ($data, $delPreviusUsrUid, $isSelfService = false)
|
public function newRow(
|
||||||
{
|
$data,
|
||||||
|
$delPreviusUsrUid,
|
||||||
|
$isSelfService = false
|
||||||
|
) {
|
||||||
$removeList = true;
|
$removeList = true;
|
||||||
if (isset($data['REMOVED_LIST'])) {
|
if (isset($data['REMOVED_LIST'])) {
|
||||||
$removeList = $data['REMOVED_LIST'];
|
$removeList = $data['REMOVED_LIST'];
|
||||||
@@ -408,42 +419,65 @@ class ListInbox extends BaseListInbox
|
|||||||
default://todo
|
default://todo
|
||||||
$criteria->add(ListInboxPeer::APP_STATUS, 'TO_DO', Criteria::EQUAL);
|
$criteria->add(ListInboxPeer::APP_STATUS, 'TO_DO', Criteria::EQUAL);
|
||||||
$criteria->add(ListInboxPeer::USR_UID, $usrUid, Criteria::EQUAL);
|
$criteria->add(ListInboxPeer::USR_UID, $usrUid, Criteria::EQUAL);
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Filter Read Unread All
|
//Filter Read Unread All
|
||||||
switch ($filter) {
|
switch ($filter) {
|
||||||
case 'read':
|
case 'read':
|
||||||
$criteria->add( ListInboxPeer::DEL_INIT_DATE, NULL, Criteria::ISNOTNULL );
|
$criteria->add(ListInboxPeer::DEL_INIT_DATE, null, Criteria::ISNOTNULL);
|
||||||
break;
|
break;
|
||||||
case 'unread':
|
case 'unread':
|
||||||
$criteria->add( ListInboxPeer::DEL_INIT_DATE, NULL, Criteria::ISNULL );
|
$criteria->add(ListInboxPeer::DEL_INIT_DATE, null, Criteria::ISNULL);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Filter Task Status
|
//Filter Task Status
|
||||||
switch ($filterStatus) {
|
switch ($filterStatus) {
|
||||||
case 'ON_TIME':
|
case 'ON_TIME':
|
||||||
$criteria->add( ListInboxPeer::DEL_RISK_DATE , "TIMEDIFF(". ListInboxPeer::DEL_RISK_DATE." , NOW( ) ) > 0", Criteria::CUSTOM);
|
$criteria->add(
|
||||||
|
ListInboxPeer::DEL_RISK_DATE,
|
||||||
|
"TIMEDIFF(". ListInboxPeer::DEL_RISK_DATE." , NOW( ) ) > 0",
|
||||||
|
Criteria::CUSTOM
|
||||||
|
);
|
||||||
break;
|
break;
|
||||||
case 'AT_RISK':
|
case 'AT_RISK':
|
||||||
$criteria->add( ListInboxPeer::DEL_RISK_DATE , "TIMEDIFF(". ListInboxPeer::DEL_RISK_DATE .", NOW( ) ) < 0", Criteria::CUSTOM);
|
$criteria->add(
|
||||||
$criteria->add( ListInboxPeer::DEL_DUE_DATE , "TIMEDIFF(". ListInboxPeer::DEL_DUE_DATE .", NOW( ) ) > 0", Criteria::CUSTOM);
|
ListInboxPeer::DEL_RISK_DATE,
|
||||||
|
"TIMEDIFF(". ListInboxPeer::DEL_RISK_DATE .", NOW( ) ) < 0",
|
||||||
|
Criteria::CUSTOM
|
||||||
|
);
|
||||||
|
$criteria->add(
|
||||||
|
ListInboxPeer::DEL_DUE_DATE,
|
||||||
|
"TIMEDIFF(". ListInboxPeer::DEL_DUE_DATE .", NOW( ) ) > 0",
|
||||||
|
Criteria::CUSTOM
|
||||||
|
);
|
||||||
break;
|
break;
|
||||||
case 'OVERDUE':
|
case 'OVERDUE':
|
||||||
$criteria->add( ListInboxPeer::DEL_DUE_DATE , "TIMEDIFF(". ListInboxPeer::DEL_DUE_DATE." , NOW( ) ) < 0", Criteria::CUSTOM);
|
$criteria->add(
|
||||||
|
ListInboxPeer::DEL_DUE_DATE,
|
||||||
|
"TIMEDIFF(". ListInboxPeer::DEL_DUE_DATE." , NOW( ) ) < 0",
|
||||||
|
Criteria::CUSTOM
|
||||||
|
);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Filter Search
|
//Filter Search
|
||||||
if ($search != '') {
|
if ($search != '') {
|
||||||
$criteria->add(
|
$criteria->add(
|
||||||
$criteria->getNewCriterion(ListInboxPeer::APP_TITLE, '%' . $search . '%', Criteria::LIKE)->addOr(
|
$criteria->getNewCriterion(ListInboxPeer::APP_TITLE, '%' . $search . '%', Criteria::LIKE)
|
||||||
$criteria->getNewCriterion(ListInboxPeer::APP_TAS_TITLE, '%' . $search . '%', Criteria::LIKE)->addOr(
|
->addOr(
|
||||||
$criteria->getNewCriterion(ListInboxPeer::APP_PRO_TITLE, '%' . $search . '%', Criteria::LIKE)->addOr(
|
$criteria->getNewCriterion(ListInboxPeer::APP_TAS_TITLE, '%' . $search . '%', Criteria::LIKE)
|
||||||
$criteria->getNewCriterion(ListInboxPeer::APP_UID, $search, Criteria::EQUAL)->addOr(
|
->addOr(
|
||||||
|
$criteria->getNewCriterion(ListInboxPeer::APP_PRO_TITLE, '%' . $search . '%', Criteria::LIKE)
|
||||||
|
->addOr(
|
||||||
|
$criteria->getNewCriterion(ListInboxPeer::APP_UID, $search, Criteria::EQUAL)
|
||||||
|
->addOr(
|
||||||
$criteria->getNewCriterion(ListInboxPeer::APP_NUMBER, $search, Criteria::EQUAL)
|
$criteria->getNewCriterion(ListInboxPeer::APP_NUMBER, $search, Criteria::EQUAL)
|
||||||
)))));
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Filter Process Id
|
//Filter Process Id
|
||||||
@@ -502,7 +536,9 @@ class ListInbox extends BaseListInbox
|
|||||||
$criteria->addJoin(ListInboxPeer::USR_UID, UsersPeer::USR_UID, Criteria::LEFT_JOIN);
|
$criteria->addJoin(ListInboxPeer::USR_UID, UsersPeer::USR_UID, Criteria::LEFT_JOIN);
|
||||||
self::loadFilters($criteria, $filters);
|
self::loadFilters($criteria, $filters);
|
||||||
|
|
||||||
$sort = (!empty($filters['sort'])) ? ListInboxPeer::TABLE_NAME.'.'.$filters['sort'] : "LIST_INBOX.APP_UPDATE_DATE";
|
$sort = (!empty($filters['sort'])) ?
|
||||||
|
ListInboxPeer::TABLE_NAME.'.'.$filters['sort'] :
|
||||||
|
"LIST_INBOX.APP_UPDATE_DATE";
|
||||||
$dir = isset($filters['dir']) ? $filters['dir'] : "ASC";
|
$dir = isset($filters['dir']) ? $filters['dir'] : "ASC";
|
||||||
$start = isset($filters['start']) ? $filters['start'] : "0";
|
$start = isset($filters['start']) ? $filters['start'] : "0";
|
||||||
$limit = isset($filters['limit']) ? $filters['limit'] : "25";
|
$limit = isset($filters['limit']) ? $filters['limit'] : "25";
|
||||||
@@ -525,7 +561,10 @@ class ListInbox extends BaseListInbox
|
|||||||
$aPriorities = array('1' => 'VL', '2' => 'L', '3' => 'N', '4' => 'H', '5' => 'VH');
|
$aPriorities = array('1' => 'VL', '2' => 'L', '3' => 'N', '4' => 'H', '5' => 'VH');
|
||||||
while ($dataset->next()) {
|
while ($dataset->next()) {
|
||||||
$aRow = (is_null($callbackRecord))? $dataset->getRow() : $callbackRecord($dataset->getRow());
|
$aRow = (is_null($callbackRecord))? $dataset->getRow() : $callbackRecord($dataset->getRow());
|
||||||
$aRow['DEL_PRIORITY'] = (isset($aRow['DEL_PRIORITY']) && is_numeric($aRow['DEL_PRIORITY']) && $aRow['DEL_PRIORITY'] <= 5 && $aRow['DEL_PRIORITY'] > 0 ) ? $aRow['DEL_PRIORITY'] : 3;
|
$aRow['DEL_PRIORITY'] = (isset($aRow['DEL_PRIORITY']) &&
|
||||||
|
is_numeric($aRow['DEL_PRIORITY']) &&
|
||||||
|
$aRow['DEL_PRIORITY'] <= 5 &&
|
||||||
|
$aRow['DEL_PRIORITY'] > 0) ? $aRow['DEL_PRIORITY'] : 3;
|
||||||
$aRow['DEL_PRIORITY'] = G::LoadTranslation("ID_PRIORITY_{$aPriorities[$aRow['DEL_PRIORITY']]}");
|
$aRow['DEL_PRIORITY'] = G::LoadTranslation("ID_PRIORITY_{$aPriorities[$aRow['DEL_PRIORITY']]}");
|
||||||
$data[] = $aRow;
|
$data[] = $aRow;
|
||||||
}
|
}
|
||||||
@@ -565,7 +604,7 @@ class ListInbox extends BaseListInbox
|
|||||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||||
$dataset->next();
|
$dataset->next();
|
||||||
$aRow = $dataset->getRow();
|
$aRow = $dataset->getRow();
|
||||||
return isset($aRow[$fieldName]) ? $aRow[$fieldName] : NULL;
|
return isset($aRow[$fieldName]) ? $aRow[$fieldName] : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -591,4 +630,3 @@ class ListInbox extends BaseListInbox
|
|||||||
return (int)$aRow['TOTAL'];
|
return (int)$aRow['TOTAL'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,8 +14,10 @@ require_once 'classes/model/om/BaseListMyInbox.php';
|
|||||||
*
|
*
|
||||||
* @package classes.model
|
* @package classes.model
|
||||||
*/
|
*/
|
||||||
|
// @codingStandardsIgnoreStart
|
||||||
class ListMyInbox extends BaseListMyInbox
|
class ListMyInbox extends BaseListMyInbox
|
||||||
{
|
{
|
||||||
|
// @codingStandardsIgnoreEnd
|
||||||
/**
|
/**
|
||||||
* Create List My Inbox Table
|
* Create List My Inbox Table
|
||||||
*
|
*
|
||||||
@@ -184,11 +186,17 @@ class ListMyInbox extends BaseListMyInbox
|
|||||||
|
|
||||||
if ($search != '') {
|
if ($search != '') {
|
||||||
$criteria->add(
|
$criteria->add(
|
||||||
$criteria->getNewCriterion('CON_APP.CON_VALUE', '%' . $search . '%', Criteria::LIKE)->addOr(
|
$criteria->getNewCriterion('CON_APP.CON_VALUE', '%' . $search . '%', Criteria::LIKE)
|
||||||
$criteria->getNewCriterion('CON_TAS.CON_VALUE', '%' . $search . '%', Criteria::LIKE)->addOr(
|
->addOr(
|
||||||
$criteria->getNewCriterion(ListMyInboxPeer::APP_UID, $search, Criteria::EQUAL)->addOr(
|
$criteria->getNewCriterion('CON_TAS.CON_VALUE', '%' . $search . '%', Criteria::LIKE)
|
||||||
|
->addOr(
|
||||||
|
$criteria->getNewCriterion(ListMyInboxPeer::APP_UID, $search, Criteria::EQUAL)
|
||||||
|
->addOr(
|
||||||
$criteria->getNewCriterion(ListMyInboxPeer::APP_NUMBER, $search, Criteria::EQUAL)
|
$criteria->getNewCriterion(ListMyInboxPeer::APP_NUMBER, $search, Criteria::EQUAL)
|
||||||
))));
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($process != '') {
|
if ($process != '') {
|
||||||
@@ -215,8 +223,19 @@ class ListMyInbox extends BaseListMyInbox
|
|||||||
$dateTo = $dateTo . " 23:59:59";
|
$dateTo = $dateTo . " 23:59:59";
|
||||||
}
|
}
|
||||||
|
|
||||||
$criteria->add( $criteria->getNewCriterion( ListMyInboxPeer::DEL_DELEGATE_DATE, $dateFrom, Criteria::GREATER_EQUAL )->
|
$criteria->add(
|
||||||
addAnd( $criteria->getNewCriterion( ListMyInboxPeer::DEL_DELEGATE_DATE, $dateTo, Criteria::LESS_EQUAL ) ) );
|
$criteria->getNewCriterion(
|
||||||
|
ListMyInboxPeer::DEL_DELEGATE_DATE,
|
||||||
|
$dateFrom,
|
||||||
|
Criteria::GREATER_EQUAL
|
||||||
|
)->addAnd(
|
||||||
|
$criteria->getNewCriterion(
|
||||||
|
ListMyInboxPeer::DEL_DELEGATE_DATE,
|
||||||
|
$dateTo,
|
||||||
|
Criteria::LESS_EQUAL
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
$dateFrom = $dateFrom . " 00:00:00";
|
$dateFrom = $dateFrom . " 00:00:00";
|
||||||
|
|
||||||
@@ -313,4 +332,3 @@ class ListMyInbox extends BaseListMyInbox
|
|||||||
return (int)$aRow['TOTAL'];
|
return (int)$aRow['TOTAL'];
|
||||||
}
|
}
|
||||||
} // ListMyInbox
|
} // ListMyInbox
|
||||||
|
|
||||||
|
|||||||
@@ -14,8 +14,10 @@ require_once 'classes/model/om/BaseListParticipatedHistory.php';
|
|||||||
*
|
*
|
||||||
* @package classes.model
|
* @package classes.model
|
||||||
*/
|
*/
|
||||||
|
// @codingStandardsIgnoreStart
|
||||||
class ListParticipatedHistory extends BaseListParticipatedHistory
|
class ListParticipatedHistory extends BaseListParticipatedHistory
|
||||||
{
|
{
|
||||||
|
// @codingStandardsIgnoreEnd
|
||||||
/**
|
/**
|
||||||
* Create List Participated History Table
|
* Create List Participated History Table
|
||||||
*
|
*
|
||||||
@@ -139,9 +141,17 @@ class ListParticipatedHistory extends BaseListParticipatedHistory
|
|||||||
$criteria->add(
|
$criteria->add(
|
||||||
$criteria->getNewCriterion('CON_APP.CON_VALUE', '%' . $search . '%', Criteria::LIKE)->addOr(
|
$criteria->getNewCriterion('CON_APP.CON_VALUE', '%' . $search . '%', Criteria::LIKE)->addOr(
|
||||||
$criteria->getNewCriterion('CON_TAS.CON_VALUE', '%' . $search . '%', Criteria::LIKE)->addOr(
|
$criteria->getNewCriterion('CON_TAS.CON_VALUE', '%' . $search . '%', Criteria::LIKE)->addOr(
|
||||||
$criteria->getNewCriterion(ListParticipatedHistoryPeer::APP_UID, $search, Criteria::EQUAL)->addOr(
|
$criteria->getNewCriterion(ListParticipatedHistoryPeer::APP_UID, $search, Criteria::EQUAL)
|
||||||
$criteria->getNewCriterion(ListParticipatedHistoryPeer::APP_NUMBER, $search, Criteria::EQUAL)
|
->addOr(
|
||||||
))));
|
$criteria->getNewCriterion(
|
||||||
|
ListParticipatedHistoryPeer::APP_NUMBER,
|
||||||
|
$search,
|
||||||
|
Criteria::EQUAL
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($process != '') {
|
if ($process != '') {
|
||||||
@@ -168,8 +178,19 @@ class ListParticipatedHistory extends BaseListParticipatedHistory
|
|||||||
$dateTo = $dateTo . " 23:59:59";
|
$dateTo = $dateTo . " 23:59:59";
|
||||||
}
|
}
|
||||||
|
|
||||||
$criteria->add( $criteria->getNewCriterion( ListParticipatedHistoryPeer::DEL_DELEGATE_DATE, $dateFrom, Criteria::GREATER_EQUAL )->
|
$criteria->add(
|
||||||
addAnd( $criteria->getNewCriterion( ListParticipatedHistoryPeer::DEL_DELEGATE_DATE, $dateTo, Criteria::LESS_EQUAL ) ) );
|
$criteria->getNewCriterion(
|
||||||
|
ListParticipatedHistoryPeer::DEL_DELEGATE_DATE,
|
||||||
|
$dateFrom,
|
||||||
|
Criteria::GREATER_EQUAL
|
||||||
|
)->addAnd(
|
||||||
|
$criteria->getNewCriterion(
|
||||||
|
ListParticipatedHistoryPeer::DEL_DELEGATE_DATE,
|
||||||
|
$dateTo,
|
||||||
|
Criteria::LESS_EQUAL
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
$dateFrom = $dateFrom . " 00:00:00";
|
$dateFrom = $dateFrom . " 00:00:00";
|
||||||
|
|
||||||
@@ -262,4 +283,3 @@ class ListParticipatedHistory extends BaseListParticipatedHistory
|
|||||||
return (int)$aRow['TOTAL'];
|
return (int)$aRow['TOTAL'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
// @codingStandardsIgnoreStart
|
||||||
require_once 'classes/model/om/BaseListParticipatedLast.php';
|
require_once 'classes/model/om/BaseListParticipatedLast.php';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Skeleton subclass for representing a row from the 'LIST_PARTICIPATED_LAST' table.
|
* Skeleton subclass for representing a row from the 'LIST_PARTICIPATED_LAST' table.
|
||||||
*
|
*
|
||||||
@@ -11,18 +11,16 @@ require_once 'classes/model/om/BaseListParticipatedLast.php';
|
|||||||
* You should add additional methods to this class to meet the
|
* You should add additional methods to this class to meet the
|
||||||
* application requirements. This class will only be generated as
|
* application requirements. This class will only be generated as
|
||||||
* long as it does not already exist in the output directory.
|
* long as it does not already exist in the output directory.
|
||||||
*
|
|
||||||
* @package classes.model
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class ListParticipatedLast extends BaseListParticipatedLast
|
class ListParticipatedLast extends BaseListParticipatedLast
|
||||||
{
|
{
|
||||||
|
// @codingStandardsIgnoreEnd
|
||||||
/**
|
/**
|
||||||
* Create List Participated History Table
|
* Create List Participated History Table.
|
||||||
*
|
*
|
||||||
* @param type $data
|
* @param type $data
|
||||||
* @return type
|
|
||||||
*
|
*
|
||||||
|
* @return type
|
||||||
*/
|
*/
|
||||||
public function create($data)
|
public function create($data)
|
||||||
{
|
{
|
||||||
@@ -57,11 +55,11 @@ class ListParticipatedLast extends BaseListParticipatedLast
|
|||||||
$row = $this->getRowFromList($getData);
|
$row = $this->getRowFromList($getData);
|
||||||
if (is_array($row) && sizeof($row)) {
|
if (is_array($row) && sizeof($row)) {
|
||||||
$set = array(
|
$set = array(
|
||||||
"DEL_CURRENT_USR_USERNAME" => "",
|
'DEL_CURRENT_USR_USERNAME' => '',
|
||||||
"DEL_CURRENT_USR_FIRSTNAME" => "",
|
'DEL_CURRENT_USR_FIRSTNAME' => '',
|
||||||
"DEL_CURRENT_USR_LASTNAME" => "",
|
'DEL_CURRENT_USR_LASTNAME' => '',
|
||||||
"APP_TAS_TITLE" => $data['APP_TAS_TITLE'],
|
'APP_TAS_TITLE' => $data['APP_TAS_TITLE'],
|
||||||
"DEL_CURRENT_TAS_TITLE" => $data['APP_TAS_TITLE']);
|
'DEL_CURRENT_TAS_TITLE' => $data['APP_TAS_TITLE'], );
|
||||||
$this->updateCurrentUser($row, $set);
|
$this->updateCurrentUser($row, $set);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -91,11 +89,12 @@ class ListParticipatedLast extends BaseListParticipatedLast
|
|||||||
if ($this->validate()) {
|
if ($this->validate()) {
|
||||||
$result = $this->save();
|
$result = $this->save();
|
||||||
} else {
|
} else {
|
||||||
$e = new Exception( "Failed Validation in class " . get_class( $this ) . "." );
|
$e = new Exception('Failed Validation in class '.get_class($this).'.');
|
||||||
$e->aValidationFailures = $this->getValidationFailures();
|
$e->aValidationFailures = $this->getValidationFailures();
|
||||||
throw ($e);
|
throw ($e);
|
||||||
}
|
}
|
||||||
$con->commit();
|
$con->commit();
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$con->rollback();
|
$con->rollback();
|
||||||
@@ -104,10 +103,12 @@ class ListParticipatedLast extends BaseListParticipatedLast
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update List Participated History Table
|
* Update List Participated History Table.
|
||||||
*
|
*
|
||||||
* @param type $data
|
* @param type $data
|
||||||
|
*
|
||||||
* @return type
|
* @return type
|
||||||
|
*
|
||||||
* @throws type
|
* @throws type
|
||||||
*/
|
*/
|
||||||
public function update($data)
|
public function update($data)
|
||||||
@@ -132,10 +133,11 @@ class ListParticipatedLast extends BaseListParticipatedLast
|
|||||||
if ($this->validate()) {
|
if ($this->validate()) {
|
||||||
$result = $this->save();
|
$result = $this->save();
|
||||||
$con->commit();
|
$con->commit();
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
} else {
|
} else {
|
||||||
$con->rollback();
|
$con->rollback();
|
||||||
throw (new Exception( "Failed Validation in class " . get_class( $this ) . "." ));
|
throw (new Exception('Failed Validation in class '.get_class($this).'.'));
|
||||||
}
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$con->rollback();
|
$con->rollback();
|
||||||
@@ -143,12 +145,13 @@ class ListParticipatedLast extends BaseListParticipatedLast
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Refresh List Participated Last
|
* Refresh List Participated Last.
|
||||||
*
|
*
|
||||||
* @param type $seqName
|
* @param type $seqName
|
||||||
* @return type
|
|
||||||
* @throws type
|
|
||||||
*
|
*
|
||||||
|
* @return type
|
||||||
|
*
|
||||||
|
* @throws type
|
||||||
*/
|
*/
|
||||||
public function refresh($data, $isSelfService = false)
|
public function refresh($data, $isSelfService = false)
|
||||||
{
|
{
|
||||||
@@ -165,7 +168,7 @@ class ListParticipatedLast extends BaseListParticipatedLast
|
|||||||
$data['APP_STATUS_ID'] = Application::$app_status_values[$data['APP_STATUS']];
|
$data['APP_STATUS_ID'] = Application::$app_status_values[$data['APP_STATUS']];
|
||||||
}
|
}
|
||||||
if (!$isSelfService) {
|
if (!$isSelfService) {
|
||||||
if ($data["USR_UID"] == "") {
|
if ($data['USR_UID'] == '') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -180,10 +183,10 @@ class ListParticipatedLast extends BaseListParticipatedLast
|
|||||||
$aRow = $dataset->getRow();
|
$aRow = $dataset->getRow();
|
||||||
|
|
||||||
//Update - WHERE
|
//Update - WHERE
|
||||||
$criteriaWhere = new Criteria("workflow");
|
$criteriaWhere = new Criteria('workflow');
|
||||||
$criteriaWhere->add(ListParticipatedLastPeer::APP_UID, $data["APP_UID"], Criteria::EQUAL);
|
$criteriaWhere->add(ListParticipatedLastPeer::APP_UID, $data['APP_UID'], Criteria::EQUAL);
|
||||||
//Update - SET
|
//Update - SET
|
||||||
$criteriaSet = new Criteria("workflow");
|
$criteriaSet = new Criteria('workflow');
|
||||||
$criteriaSet->add(ListParticipatedLastPeer::DEL_CURRENT_USR_USERNAME, $aRow['USR_USERNAME']);
|
$criteriaSet->add(ListParticipatedLastPeer::DEL_CURRENT_USR_USERNAME, $aRow['USR_USERNAME']);
|
||||||
$criteriaSet->add(ListParticipatedLastPeer::DEL_CURRENT_USR_FIRSTNAME, $aRow['USR_FIRSTNAME']);
|
$criteriaSet->add(ListParticipatedLastPeer::DEL_CURRENT_USR_FIRSTNAME, $aRow['USR_FIRSTNAME']);
|
||||||
$criteriaSet->add(ListParticipatedLastPeer::DEL_CURRENT_USR_LASTNAME, $aRow['USR_LASTNAME']);
|
$criteriaSet->add(ListParticipatedLastPeer::DEL_CURRENT_USR_LASTNAME, $aRow['USR_LASTNAME']);
|
||||||
@@ -192,32 +195,31 @@ class ListParticipatedLast extends BaseListParticipatedLast
|
|||||||
$criteriaSet->add(ListParticipatedLastPeer::DEL_CURRENT_TAS_TITLE, $data['APP_TAS_TITLE']);
|
$criteriaSet->add(ListParticipatedLastPeer::DEL_CURRENT_TAS_TITLE, $data['APP_TAS_TITLE']);
|
||||||
}
|
}
|
||||||
|
|
||||||
BasePeer::doUpdate($criteriaWhere, $criteriaSet, Propel::getConnection("workflow"));
|
BasePeer::doUpdate($criteriaWhere, $criteriaSet, Propel::getConnection('workflow'));
|
||||||
|
|
||||||
}
|
}
|
||||||
$this->update($data);
|
$this->update($data);
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Remove List Participated History
|
* Remove List Participated History.
|
||||||
*
|
*
|
||||||
* @param type $seqName
|
* @param type $seqName
|
||||||
* @return type
|
|
||||||
* @throws type
|
|
||||||
*
|
*
|
||||||
|
* @return type
|
||||||
|
*
|
||||||
|
* @throws type
|
||||||
*/
|
*/
|
||||||
public function remove($app_uid, $usr_uid, $del_index)
|
public function remove($app_uid, $usr_uid, $del_index)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if (!is_null(ListParticipatedLastPeer::retrieveByPK($app_uid, $usr_uid, $del_index))) {
|
if (!is_null(ListParticipatedLastPeer::retrieveByPK($app_uid, $usr_uid, $del_index))) {
|
||||||
$criteria = new Criteria("workflow");
|
$criteria = new Criteria('workflow');
|
||||||
|
|
||||||
$criteria->add(ListParticipatedLastPeer::APP_UID, $app_uid);
|
$criteria->add(ListParticipatedLastPeer::APP_UID, $app_uid);
|
||||||
$criteria->add(ListParticipatedLastPeer::USR_UID, $usr_uid);
|
$criteria->add(ListParticipatedLastPeer::USR_UID, $usr_uid);
|
||||||
$criteria->add(ListParticipatedLastPeer::DEL_INDEX, $del_index);
|
$criteria->add(ListParticipatedLastPeer::DEL_INDEX, $del_index);
|
||||||
$result = ListParticipatedLastPeer::doDelete($criteria);
|
$result = ListParticipatedLastPeer::doDelete($criteria);
|
||||||
} else {
|
} else {
|
||||||
$criteria = new Criteria("workflow");
|
$criteria = new Criteria('workflow');
|
||||||
$criteria->add(ListParticipatedLastPeer::APP_UID, $app_uid);
|
$criteria->add(ListParticipatedLastPeer::APP_UID, $app_uid);
|
||||||
$criteria->add(ListParticipatedLastPeer::USR_UID, $usr_uid);
|
$criteria->add(ListParticipatedLastPeer::USR_UID, $usr_uid);
|
||||||
$rsCriteria = ListParticipatedLastPeer::doSelectRS($criteria);
|
$rsCriteria = ListParticipatedLastPeer::doSelectRS($criteria);
|
||||||
@@ -232,16 +234,15 @@ class ListParticipatedLast extends BaseListParticipatedLast
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function loadFilters(&$criteria, $filters)
|
public function loadFilters(&$criteria, $filters)
|
||||||
{
|
{
|
||||||
$filter = isset($filters['filter']) ? $filters['filter'] : "";
|
$filter = isset($filters['filter']) ? $filters['filter'] : '';
|
||||||
$search = isset($filters['search']) ? $filters['search'] : "";
|
$search = isset($filters['search']) ? $filters['search'] : '';
|
||||||
$process = isset($filters['process']) ? $filters['process'] : "";
|
$process = isset($filters['process']) ? $filters['process'] : '';
|
||||||
$category = isset($filters['category']) ? $filters['category'] : "";
|
$category = isset($filters['category']) ? $filters['category'] : '';
|
||||||
$dateFrom = isset($filters['dateFrom']) ? $filters['dateFrom'] : "";
|
$dateFrom = isset($filters['dateFrom']) ? $filters['dateFrom'] : '';
|
||||||
$dateTo = isset($filters['dateTo']) ? $filters['dateTo'] : "";
|
$dateTo = isset($filters['dateTo']) ? $filters['dateTo'] : '';
|
||||||
$filterStatus = isset($filters['filterStatus']) ? $filters['filterStatus'] : "";
|
$filterStatus = isset($filters['filterStatus']) ? $filters['filterStatus'] : '';
|
||||||
$newestthan = isset($filters['newestthan']) ? $filters['newestthan'] : '';
|
$newestthan = isset($filters['newestthan']) ? $filters['newestthan'] : '';
|
||||||
$oldestthan = isset($filters['oldestthan']) ? $filters['oldestthan'] : '';
|
$oldestthan = isset($filters['oldestthan']) ? $filters['oldestthan'] : '';
|
||||||
|
|
||||||
@@ -272,11 +273,17 @@ class ListParticipatedLast extends BaseListParticipatedLast
|
|||||||
|
|
||||||
if ($search != '') {
|
if ($search != '') {
|
||||||
$criteria->add(
|
$criteria->add(
|
||||||
$criteria->getNewCriterion(ListParticipatedLastPeer::APP_TITLE, '%' . $search . '%', Criteria::LIKE)->addOr(
|
$criteria->getNewCriterion(ListParticipatedLastPeer::APP_TITLE, '%'.$search.'%', Criteria::LIKE)
|
||||||
$criteria->getNewCriterion(ListParticipatedLastPeer::APP_TAS_TITLE, '%' . $search . '%', Criteria::LIKE)->addOr(
|
->addOr(
|
||||||
$criteria->getNewCriterion(ListParticipatedLastPeer::APP_UID, $search, Criteria::EQUAL)->addOr(
|
$criteria->getNewCriterion(ListParticipatedLastPeer::APP_TAS_TITLE, '%'.$search.'%', Criteria::LIKE)
|
||||||
|
->addOr(
|
||||||
|
$criteria->getNewCriterion(ListParticipatedLastPeer::APP_UID, $search, Criteria::EQUAL)
|
||||||
|
->addOr(
|
||||||
$criteria->getNewCriterion(ListParticipatedLastPeer::APP_NUMBER, $search, Criteria::EQUAL)
|
$criteria->getNewCriterion(ListParticipatedLastPeer::APP_NUMBER, $search, Criteria::EQUAL)
|
||||||
))));
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($process != '') {
|
if ($process != '') {
|
||||||
@@ -329,13 +336,15 @@ class ListParticipatedLast extends BaseListParticipatedLast
|
|||||||
|
|
||||||
self::loadFilters($criteria, $filters);
|
self::loadFilters($criteria, $filters);
|
||||||
|
|
||||||
$sort = (!empty($filters['sort'])) ? ListParticipatedLastPeer::TABLE_NAME.'.'.$filters['sort'] : "DEL_DELEGATE_DATE";
|
$sort = (!empty($filters['sort'])) ?
|
||||||
$dir = isset($filters['dir']) ? $filters['dir'] : "ASC";
|
ListParticipatedLastPeer::TABLE_NAME.'.'.$filters['sort'] :
|
||||||
$start = isset($filters['start']) ? $filters['start'] : "0";
|
'DEL_DELEGATE_DATE';
|
||||||
$limit = isset($filters['limit']) ? $filters['limit'] : "25";
|
$dir = isset($filters['dir']) ? $filters['dir'] : 'ASC';
|
||||||
|
$start = isset($filters['start']) ? $filters['start'] : '0';
|
||||||
|
$limit = isset($filters['limit']) ? $filters['limit'] : '25';
|
||||||
$paged = isset($filters['paged']) ? $filters['paged'] : 1;
|
$paged = isset($filters['paged']) ? $filters['paged'] : 1;
|
||||||
|
|
||||||
if ($dir == "DESC") {
|
if ($dir == 'DESC') {
|
||||||
$criteria->addDescendingOrderByColumn($sort);
|
$criteria->addDescendingOrderByColumn($sort);
|
||||||
} else {
|
} else {
|
||||||
$criteria->addAscendingOrderByColumn($sort);
|
$criteria->addAscendingOrderByColumn($sort);
|
||||||
@@ -354,7 +363,11 @@ class ListParticipatedLast extends BaseListParticipatedLast
|
|||||||
$aPriorities = array('1' => 'VL', '2' => 'L', '3' => 'N', '4' => 'H', '5' => 'VH');
|
$aPriorities = array('1' => 'VL', '2' => 'L', '3' => 'N', '4' => 'H', '5' => 'VH');
|
||||||
while ($dataset->next()) {
|
while ($dataset->next()) {
|
||||||
$aRow = (is_null($callbackRecord)) ? $dataset->getRow() : $callbackRecord($dataset->getRow());
|
$aRow = (is_null($callbackRecord)) ? $dataset->getRow() : $callbackRecord($dataset->getRow());
|
||||||
$aRow['DEL_PRIORITY'] = (isset($aRow['DEL_PRIORITY']) && is_numeric($aRow['DEL_PRIORITY']) && $aRow['DEL_PRIORITY'] <= 5 && $aRow['DEL_PRIORITY'] > 0 ) ? $aRow['DEL_PRIORITY'] : 3;
|
$aRow['DEL_PRIORITY'] = (
|
||||||
|
isset($aRow['DEL_PRIORITY']) &&
|
||||||
|
is_numeric($aRow['DEL_PRIORITY']) &&
|
||||||
|
$aRow['DEL_PRIORITY'] <= 5 &&
|
||||||
|
$aRow['DEL_PRIORITY'] > 0) ? $aRow['DEL_PRIORITY'] : 3;
|
||||||
$aRow['DEL_PRIORITY'] = G::LoadTranslation("ID_PRIORITY_{$aPriorities[$aRow['DEL_PRIORITY']]}");
|
$aRow['DEL_PRIORITY'] = G::LoadTranslation("ID_PRIORITY_{$aPriorities[$aRow['DEL_PRIORITY']]}");
|
||||||
$data[] = $aRow;
|
$data[] = $aRow;
|
||||||
}
|
}
|
||||||
@@ -362,8 +375,9 @@ class ListParticipatedLast extends BaseListParticipatedLast
|
|||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function primaryKeysExists($data) {
|
public function primaryKeysExists($data)
|
||||||
$criteria = new Criteria("workflow");
|
{
|
||||||
|
$criteria = new Criteria('workflow');
|
||||||
$criteria->add(ListParticipatedLastPeer::APP_UID, $data['APP_UID']);
|
$criteria->add(ListParticipatedLastPeer::APP_UID, $data['APP_UID']);
|
||||||
$criteria->add(ListParticipatedLastPeer::USR_UID, $data['USR_UID']);
|
$criteria->add(ListParticipatedLastPeer::USR_UID, $data['USR_UID']);
|
||||||
$criteria->add(ListParticipatedLastPeer::DEL_INDEX, $data['DEL_INDEX']);
|
$criteria->add(ListParticipatedLastPeer::DEL_INDEX, $data['DEL_INDEX']);
|
||||||
@@ -376,11 +390,13 @@ class ListParticipatedLast extends BaseListParticipatedLast
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getRowFromList($data) {
|
public function getRowFromList($data)
|
||||||
$criteria = new Criteria("workflow");
|
{
|
||||||
|
$criteria = new Criteria('workflow');
|
||||||
$criteria->add(ListParticipatedLastPeer::APP_UID, $data['APP_UID']);
|
$criteria->add(ListParticipatedLastPeer::APP_UID, $data['APP_UID']);
|
||||||
$criteria->add(ListParticipatedLastPeer::USR_UID, $data['USR_UID']);
|
$criteria->add(ListParticipatedLastPeer::USR_UID, $data['USR_UID']);
|
||||||
$dataset = ListParticipatedLastPeer::doSelectRS($criteria);
|
$dataset = ListParticipatedLastPeer::doSelectRS($criteria);
|
||||||
@@ -392,6 +408,7 @@ class ListParticipatedLast extends BaseListParticipatedLast
|
|||||||
return $aRow;
|
return $aRow;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -399,12 +416,12 @@ class ListParticipatedLast extends BaseListParticipatedLast
|
|||||||
{
|
{
|
||||||
$con = Propel::getConnection('workflow');
|
$con = Propel::getConnection('workflow');
|
||||||
//Update - WHERE
|
//Update - WHERE
|
||||||
$criteriaWhere = new Criteria("workflow");
|
$criteriaWhere = new Criteria('workflow');
|
||||||
$criteriaWhere->add(ListParticipatedLastPeer::APP_UID, $where["APP_UID"], Criteria::EQUAL);
|
$criteriaWhere->add(ListParticipatedLastPeer::APP_UID, $where['APP_UID'], Criteria::EQUAL);
|
||||||
$criteriaWhere->add(ListParticipatedLastPeer::USR_UID, $where["USR_UID"], Criteria::EQUAL);
|
$criteriaWhere->add(ListParticipatedLastPeer::USR_UID, $where['USR_UID'], Criteria::EQUAL);
|
||||||
$criteriaWhere->add(ListParticipatedLastPeer::DEL_INDEX, $where["DEL_INDEX"], Criteria::EQUAL);
|
$criteriaWhere->add(ListParticipatedLastPeer::DEL_INDEX, $where['DEL_INDEX'], Criteria::EQUAL);
|
||||||
//Update - SET
|
//Update - SET
|
||||||
$criteriaSet = new Criteria("workflow");
|
$criteriaSet = new Criteria('workflow');
|
||||||
foreach ($set as $k => $v) {
|
foreach ($set as $k => $v) {
|
||||||
eval('$criteriaSet->add( ListParticipatedLastPeer::'.$k.',$v, Criteria::EQUAL);');
|
eval('$criteriaSet->add( ListParticipatedLastPeer::'.$k.',$v, Criteria::EQUAL);');
|
||||||
}
|
}
|
||||||
@@ -412,9 +429,11 @@ class ListParticipatedLast extends BaseListParticipatedLast
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the number of cases of a user
|
* Returns the number of cases of a user.
|
||||||
|
*
|
||||||
* @param string $usrUid
|
* @param string $usrUid
|
||||||
* @param array $filters
|
* @param array $filters
|
||||||
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function getCountList($usrUid, $filters = array())
|
public function getCountList($usrUid, $filters = array())
|
||||||
@@ -429,7 +448,7 @@ class ListParticipatedLast extends BaseListParticipatedLast
|
|||||||
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||||
$dataset->next();
|
$dataset->next();
|
||||||
$aRow = $dataset->getRow();
|
$aRow = $dataset->getRow();
|
||||||
|
|
||||||
return (int) $aRow['TOTAL'];
|
return (int) $aRow['TOTAL'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,10 @@ require_once 'classes/model/om/BaseListPaused.php';
|
|||||||
*
|
*
|
||||||
* @package classes.model
|
* @package classes.model
|
||||||
*/
|
*/
|
||||||
class ListPaused extends BaseListPaused {
|
// @codingStandardsIgnoreStart
|
||||||
|
class ListPaused extends BaseListPaused
|
||||||
|
{
|
||||||
|
// @codingStandardsIgnoreEnd
|
||||||
/**
|
/**
|
||||||
* Create List Paused Table
|
* Create List Paused Table
|
||||||
*
|
*
|
||||||
@@ -220,20 +223,26 @@ class ListPaused extends BaseListPaused {
|
|||||||
//Filter Read Unread All
|
//Filter Read Unread All
|
||||||
switch ($filter) {
|
switch ($filter) {
|
||||||
case 'read':
|
case 'read':
|
||||||
$criteria->add(ListPausedPeer::DEL_INIT_DATE, NULL, Criteria::ISNOTNULL);
|
$criteria->add(ListPausedPeer::DEL_INIT_DATE, null, Criteria::ISNOTNULL);
|
||||||
break;
|
break;
|
||||||
case 'unread':
|
case 'unread':
|
||||||
$criteria->add(ListPausedPeer::DEL_INIT_DATE, NULL, Criteria::ISNULL);
|
$criteria->add(ListPausedPeer::DEL_INIT_DATE, null, Criteria::ISNULL);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($search != '') {
|
if ($search != '') {
|
||||||
$criteria->add(
|
$criteria->add(
|
||||||
$criteria->getNewCriterion(ListPausedPeer::APP_TITLE, '%' . $search . '%', Criteria::LIKE)->addOr(
|
$criteria->getNewCriterion(ListPausedPeer::APP_TITLE, '%' . $search . '%', Criteria::LIKE)
|
||||||
$criteria->getNewCriterion(ListPausedPeer::APP_TAS_TITLE, '%' . $search . '%', Criteria::LIKE)->addOr(
|
->addOr(
|
||||||
$criteria->getNewCriterion(ListPausedPeer::APP_UID, $search, Criteria::EQUAL)->addOr(
|
$criteria->getNewCriterion(ListPausedPeer::APP_TAS_TITLE, '%' . $search . '%', Criteria::LIKE)
|
||||||
|
->addOr(
|
||||||
|
$criteria->getNewCriterion(ListPausedPeer::APP_UID, $search, Criteria::EQUAL)
|
||||||
|
->addOr(
|
||||||
$criteria->getNewCriterion(ListPausedPeer::APP_NUMBER, $search, Criteria::EQUAL)
|
$criteria->getNewCriterion(ListPausedPeer::APP_NUMBER, $search, Criteria::EQUAL)
|
||||||
))));
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($process != '') {
|
if ($process != '') {
|
||||||
@@ -330,4 +339,3 @@ class ListPaused extends BaseListPaused {
|
|||||||
return (int)$aRow['TOTAL'];
|
return (int)$aRow['TOTAL'];
|
||||||
}
|
}
|
||||||
} // ListPaused
|
} // ListPaused
|
||||||
|
|
||||||
|
|||||||
@@ -14,8 +14,10 @@ require_once 'classes/model/om/BaseListUnassigned.php';
|
|||||||
*
|
*
|
||||||
* @package classes.model
|
* @package classes.model
|
||||||
*/
|
*/
|
||||||
|
// @codingStandardsIgnoreStart
|
||||||
class ListUnassigned extends BaseListUnassigned
|
class ListUnassigned extends BaseListUnassigned
|
||||||
{
|
{
|
||||||
|
// @codingStandardsIgnoreEnd
|
||||||
private $total = 0;
|
private $total = 0;
|
||||||
/**
|
/**
|
||||||
* Create List Unassigned Table
|
* Create List Unassigned Table
|
||||||
@@ -174,11 +176,17 @@ class ListUnassigned extends BaseListUnassigned
|
|||||||
|
|
||||||
if ($search != '') {
|
if ($search != '') {
|
||||||
$criteria->add(
|
$criteria->add(
|
||||||
$criteria->getNewCriterion(ListUnassignedPeer::APP_TITLE, '%' . $search . '%', Criteria::LIKE)->addOr(
|
$criteria->getNewCriterion(ListUnassignedPeer::APP_TITLE, '%' . $search . '%', Criteria::LIKE)
|
||||||
$criteria->getNewCriterion(ListUnassignedPeer::APP_TAS_TITLE, '%' . $search . '%', Criteria::LIKE)->addOr(
|
->addOr(
|
||||||
$criteria->getNewCriterion(ListUnassignedPeer::APP_UID, $search, Criteria::EQUAL)->addOr(
|
$criteria->getNewCriterion(ListUnassignedPeer::APP_TAS_TITLE, '%' . $search . '%', Criteria::LIKE)
|
||||||
|
->addOr(
|
||||||
|
$criteria->getNewCriterion(ListUnassignedPeer::APP_UID, $search, Criteria::EQUAL)
|
||||||
|
->addOr(
|
||||||
$criteria->getNewCriterion(ListUnassignedPeer::APP_NUMBER, $search, Criteria::EQUAL)
|
$criteria->getNewCriterion(ListUnassignedPeer::APP_NUMBER, $search, Criteria::EQUAL)
|
||||||
))));
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($process != '') {
|
if ($process != '') {
|
||||||
@@ -249,11 +257,15 @@ class ListUnassigned extends BaseListUnassigned
|
|||||||
Criteria::EQUAL
|
Criteria::EQUAL
|
||||||
)->addAnd(
|
)->addAnd(
|
||||||
$criteria->getNewCriterion(
|
$criteria->getNewCriterion(
|
||||||
ListUnassignedPeer::DEL_INDEX, $value["DEL_INDEX"], Criteria::EQUAL
|
ListUnassignedPeer::DEL_INDEX,
|
||||||
|
$value["DEL_INDEX"],
|
||||||
|
Criteria::EQUAL
|
||||||
)
|
)
|
||||||
)->addAnd(
|
)->addAnd(
|
||||||
$criteria->getNewCriterion(
|
$criteria->getNewCriterion(
|
||||||
ListUnassignedPeer::TAS_UID, $value["TAS_UID"], Criteria::EQUAL
|
ListUnassignedPeer::TAS_UID,
|
||||||
|
$value["TAS_UID"],
|
||||||
|
Criteria::EQUAL
|
||||||
)
|
)
|
||||||
)->addOr(
|
)->addOr(
|
||||||
$criterionAux
|
$criterionAux
|
||||||
@@ -271,7 +283,9 @@ class ListUnassigned extends BaseListUnassigned
|
|||||||
|
|
||||||
//Apply some filters
|
//Apply some filters
|
||||||
self::loadFilters($criteria, $filters);
|
self::loadFilters($criteria, $filters);
|
||||||
$sort = (!empty($filters['sort'])) ? ListUnassignedPeer::TABLE_NAME.'.'.$filters['sort'] : "LIST_UNASSIGNED.DEL_DELEGATE_DATE";
|
$sort = (!empty($filters['sort'])) ?
|
||||||
|
ListUnassignedPeer::TABLE_NAME.'.'.$filters['sort'] :
|
||||||
|
"LIST_UNASSIGNED.DEL_DELEGATE_DATE";
|
||||||
$dir = isset($filters['dir']) ? $filters['dir'] : "ASC";
|
$dir = isset($filters['dir']) ? $filters['dir'] : "ASC";
|
||||||
$start = isset($filters['start']) ? $filters['start'] : "0";
|
$start = isset($filters['start']) ? $filters['start'] : "0";
|
||||||
$limit = isset($filters['limit']) ? $filters['limit'] : "25";
|
$limit = isset($filters['limit']) ? $filters['limit'] : "25";
|
||||||
@@ -294,7 +308,10 @@ class ListUnassigned extends BaseListUnassigned
|
|||||||
$data = array();
|
$data = array();
|
||||||
while ($dataset->next()) {
|
while ($dataset->next()) {
|
||||||
$aRow = (is_null($callbackRecord))? $dataset->getRow() : $callbackRecord($dataset->getRow());
|
$aRow = (is_null($callbackRecord))? $dataset->getRow() : $callbackRecord($dataset->getRow());
|
||||||
$aRow['DEL_PRIORITY'] = (isset($aRow['DEL_PRIORITY']) && is_numeric($aRow['DEL_PRIORITY']) && $aRow['DEL_PRIORITY'] <= 5 && $aRow['DEL_PRIORITY'] > 0 ) ? $aRow['DEL_PRIORITY'] : 3;
|
$aRow['DEL_PRIORITY'] = (isset($aRow['DEL_PRIORITY']) &&
|
||||||
|
is_numeric($aRow['DEL_PRIORITY']) &&
|
||||||
|
$aRow['DEL_PRIORITY'] <= 5 &&
|
||||||
|
$aRow['DEL_PRIORITY'] > 0) ? $aRow['DEL_PRIORITY'] : 3;
|
||||||
$aRow['DEL_PRIORITY'] = G::LoadTranslation("ID_PRIORITY_{$aPriorities[$aRow['DEL_PRIORITY']]}");
|
$aRow['DEL_PRIORITY'] = G::LoadTranslation("ID_PRIORITY_{$aPriorities[$aRow['DEL_PRIORITY']]}");
|
||||||
$data[] = $aRow;
|
$data[] = $aRow;
|
||||||
}
|
}
|
||||||
@@ -326,9 +343,15 @@ class ListUnassigned extends BaseListUnassigned
|
|||||||
$criteria->addSelectColumn(AppAssignSelfServiceValuePeer::DEL_INDEX);
|
$criteria->addSelectColumn(AppAssignSelfServiceValuePeer::DEL_INDEX);
|
||||||
$criteria->addSelectColumn(AppAssignSelfServiceValuePeer::TAS_UID);
|
$criteria->addSelectColumn(AppAssignSelfServiceValuePeer::TAS_UID);
|
||||||
|
|
||||||
$criteria->add(AppAssignSelfServiceValuePeer::ID, AppAssignSelfServiceValuePeer::ID .
|
$criteria->add(
|
||||||
" IN (SELECT " . AppAssignSelfServiceValueGroupPeer::ID . " FROM " . AppAssignSelfServiceValueGroupPeer::TABLE_NAME .
|
AppAssignSelfServiceValuePeer::ID,
|
||||||
" WHERE " . AppAssignSelfServiceValueGroupPeer::GRP_UID . " IN ('" . implode("','", $arrayUid) . "'))", Criteria::CUSTOM);
|
AppAssignSelfServiceValuePeer::ID.
|
||||||
|
" IN (SELECT ".AppAssignSelfServiceValueGroupPeer::ID.
|
||||||
|
" FROM ".AppAssignSelfServiceValueGroupPeer::TABLE_NAME.
|
||||||
|
" WHERE ".AppAssignSelfServiceValueGroupPeer::GRP_UID." IN ('".
|
||||||
|
implode("','", $arrayUid)."'))",
|
||||||
|
Criteria::CUSTOM
|
||||||
|
);
|
||||||
|
|
||||||
$rsCriteria = AppAssignSelfServiceValuePeer::doSelectRS($criteria);
|
$rsCriteria = AppAssignSelfServiceValuePeer::doSelectRS($criteria);
|
||||||
$rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
$rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||||
@@ -431,13 +454,33 @@ class ListUnassigned extends BaseListUnassigned
|
|||||||
|
|
||||||
foreach ($arrayAppAssignSelfServiceValueData as $value) {
|
foreach ($arrayAppAssignSelfServiceValueData as $value) {
|
||||||
if (is_null($criterionAux)) {
|
if (is_null($criterionAux)) {
|
||||||
$criterionAux = $criteria->getNewCriterion(ListUnassignedPeer::APP_UID, $value["APP_UID"], Criteria::EQUAL)->addAnd(
|
$criterionAux = $criteria->getNewCriterion(
|
||||||
$criteria->getNewCriterion(ListUnassignedPeer::DEL_INDEX, $value["DEL_INDEX"], Criteria::EQUAL))->addAnd(
|
ListUnassignedPeer::APP_UID,
|
||||||
$criteria->getNewCriterion(ListUnassignedPeer::TAS_UID, $value["TAS_UID"], Criteria::EQUAL));
|
$value["APP_UID"],
|
||||||
|
Criteria::EQUAL
|
||||||
|
)->addAnd(
|
||||||
|
$criteria->getNewCriterion(ListUnassignedPeer::DEL_INDEX, $value["DEL_INDEX"], Criteria::EQUAL)
|
||||||
|
)->addAnd(
|
||||||
|
$criteria->getNewCriterion(ListUnassignedPeer::TAS_UID, $value["TAS_UID"], Criteria::EQUAL)
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
$criterionAux = $criteria->getNewCriterion(ListUnassignedPeer::APP_UID, $value["APP_UID"], Criteria::EQUAL)->addAnd(
|
$criterionAux = $criteria->getNewCriterion(
|
||||||
$criteria->getNewCriterion(ListUnassignedPeer::DEL_INDEX, $value["DEL_INDEX"], Criteria::EQUAL))->addAnd(
|
ListUnassignedPeer::APP_UID,
|
||||||
$criteria->getNewCriterion(ListUnassignedPeer::TAS_UID, $value["TAS_UID"], Criteria::EQUAL))->addOr(
|
$value["APP_UID"],
|
||||||
|
Criteria::EQUAL
|
||||||
|
)->addAnd(
|
||||||
|
$criteria->getNewCriterion(
|
||||||
|
ListUnassignedPeer::DEL_INDEX,
|
||||||
|
$value["DEL_INDEX"],
|
||||||
|
Criteria::EQUAL
|
||||||
|
)
|
||||||
|
)->addAnd(
|
||||||
|
$criteria->getNewCriterion(
|
||||||
|
ListUnassignedPeer::TAS_UID,
|
||||||
|
$value["TAS_UID"],
|
||||||
|
Criteria::EQUAL
|
||||||
|
)
|
||||||
|
)->addOr(
|
||||||
$criterionAux
|
$criterionAux
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -454,4 +497,3 @@ class ListUnassigned extends BaseListUnassigned
|
|||||||
return (int)$total;
|
return (int)$total;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,10 @@ require_once 'classes/model/om/BaseListUnassignedGroup.php';
|
|||||||
*
|
*
|
||||||
* @package classes.model
|
* @package classes.model
|
||||||
*/
|
*/
|
||||||
class ListUnassignedGroup extends BaseListUnassignedGroup {
|
// @codingStandardsIgnoreStart
|
||||||
|
class ListUnassignedGroup extends BaseListUnassignedGroup
|
||||||
|
{
|
||||||
|
// @codingStandardsIgnoreEnd
|
||||||
/**
|
/**
|
||||||
* Create List Unassigned Group Table
|
* Create List Unassigned Group Table
|
||||||
*
|
*
|
||||||
@@ -107,7 +110,8 @@ class ListUnassignedGroup extends BaseListUnassignedGroup {
|
|||||||
* @throws type
|
* @throws type
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function newRow($unaUid, $usrUid, $type, $typeUid=''){
|
public function newRow($unaUid, $usrUid, $type, $typeUid = '')
|
||||||
|
{
|
||||||
$data['UNA_UID'] = $unaUid;
|
$data['UNA_UID'] = $unaUid;
|
||||||
$data['USR_UID'] = $usrUid;
|
$data['USR_UID'] = $usrUid;
|
||||||
$data['TYPE'] = $type;
|
$data['TYPE'] = $type;
|
||||||
|
|||||||
Reference in New Issue
Block a user