Merged in qronald/processmaker/3.0.1-GA (pull request #2595)
change method list
This commit is contained in:
@@ -54,33 +54,41 @@ class Light
|
|||||||
$task = new \ProcessMaker\BusinessModel\Task();
|
$task = new \ProcessMaker\BusinessModel\Task();
|
||||||
$task->setFormatFieldNameInUppercase(false);
|
$task->setFormatFieldNameInUppercase(false);
|
||||||
$task->setArrayParamException(array("taskUid" => "act_uid", "stepUid" => "step_uid"));
|
$task->setArrayParamException(array("taskUid" => "act_uid", "stepUid" => "step_uid"));
|
||||||
|
|
||||||
|
$webEntryEvent = new \ProcessMaker\BusinessModel\WebEntryEvent();
|
||||||
|
$webEntryEvent->setFormatFieldNameInUppercase(false);
|
||||||
|
$webEntryEvent->setArrayFieldNameForException(array("processUid" => "prj_uid"));
|
||||||
|
|
||||||
$step = new \ProcessMaker\Services\Api\Project\Activity\Step();
|
$step = new \ProcessMaker\Services\Api\Project\Activity\Step();
|
||||||
$response = array();
|
$response = array();
|
||||||
foreach ($processList as $key => $processInfo) {
|
foreach ($processList as $key => $processInfo) {
|
||||||
$tempTreeChildren = array ();
|
$tempTreeChildren = array ();
|
||||||
foreach ($processList[$key] as $keyChild => $processInfoChild) {
|
foreach ($processList[$key] as $keyChild => $processInfoChild) {
|
||||||
$tempTreeChild['text'] = htmlentities($keyChild, ENT_QUOTES, 'UTF-8'); //ellipsis ( $keyChild, 50 );
|
$webEntryEventStart = $webEntryEvent->getWebEntryEvents($processInfoChild['pro_uid']);
|
||||||
$tempTreeChild['processId'] = $processInfoChild['pro_uid'];
|
if(empty($webEntryEventStart)){
|
||||||
$tempTreeChild['taskId'] = $processInfoChild['uid'];
|
$tempTreeChild['text'] = htmlentities($keyChild, ENT_QUOTES, 'UTF-8'); //ellipsis ( $keyChild, 50 );
|
||||||
$forms = $task->getSteps($processInfoChild['uid']);
|
$tempTreeChild['processId'] = $processInfoChild['pro_uid'];
|
||||||
$newForm = array();
|
$tempTreeChild['taskId'] = $processInfoChild['uid'];
|
||||||
$c = 0;
|
$forms = $task->getSteps($processInfoChild['uid']);
|
||||||
foreach ($forms as $k => $form) {
|
$newForm = array();
|
||||||
if ($form['step_type_obj'] == "DYNAFORM") {
|
$c = 0;
|
||||||
$newForm[$c]['formId'] = $form['step_uid_obj'];
|
foreach ($forms as $k => $form) {
|
||||||
$newForm[$c]['index'] = $c+1;
|
if ($form['step_type_obj'] == "DYNAFORM") {
|
||||||
$newForm[$c]['title'] = $form['obj_title'];
|
$newForm[$c]['formId'] = $form['step_uid_obj'];
|
||||||
$newForm[$c]['description'] = $form['obj_description'];
|
$newForm[$c]['index'] = $c+1;
|
||||||
$newForm[$c]['stepId'] = $form["step_uid"];
|
$newForm[$c]['title'] = $form['obj_title'];
|
||||||
$newForm[$c]['stepMode'] = $form['step_mode'];
|
$newForm[$c]['description'] = $form['obj_description'];
|
||||||
$trigger = $this->statusTriggers($step->doGetActivityStepTriggers($form["step_uid"], $tempTreeChild['taskId'], $tempTreeChild['processId']));
|
$newForm[$c]['stepId'] = $form["step_uid"];
|
||||||
$newForm[$c]["triggers"] = $trigger;
|
$newForm[$c]['stepMode'] = $form['step_mode'];
|
||||||
$c++;
|
$trigger = $this->statusTriggers($step->doGetActivityStepTriggers($form["step_uid"], $tempTreeChild['taskId'], $tempTreeChild['processId']));
|
||||||
|
$newForm[$c]["triggers"] = $trigger;
|
||||||
|
$c++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$tempTreeChild['forms'] = $newForm;
|
||||||
|
if (isset( $proData[$processInfoChild['pro_uid']] )) {
|
||||||
|
$tempTreeChildren[] = $tempTreeChild;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
$tempTreeChild['forms'] = $newForm;
|
|
||||||
if (isset( $proData[$processInfoChild['pro_uid']] )) {
|
|
||||||
$tempTreeChildren[] = $tempTreeChild;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$response = array_merge($response, $tempTreeChildren);
|
$response = array_merge($response, $tempTreeChildren);
|
||||||
|
|||||||
@@ -85,11 +85,15 @@ class Light extends Api
|
|||||||
public function doGetCasesListToDo(
|
public function doGetCasesListToDo(
|
||||||
$start = 0,
|
$start = 0,
|
||||||
$limit = 10,
|
$limit = 10,
|
||||||
$sort = 'APP_CACHE_VIEW.APP_NUMBER',
|
$sort = 'APP_UPDATE_DATE',
|
||||||
$dir = 'DESC',
|
$dir = 'DESC',
|
||||||
$cat_uid = '',
|
$cat_uid = '',
|
||||||
$pro_uid = '',
|
$pro_uid = '',
|
||||||
$search = ''
|
$search = '',
|
||||||
|
$filter = '',
|
||||||
|
$date_from = '',
|
||||||
|
$date_to = '',
|
||||||
|
$action = ''
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
$dataList['userId'] = $this->getUserId();
|
$dataList['userId'] = $this->getUserId();
|
||||||
@@ -102,9 +106,12 @@ class Light extends Api
|
|||||||
$dataList['category'] = $cat_uid;
|
$dataList['category'] = $cat_uid;
|
||||||
$dataList['process'] = $pro_uid;
|
$dataList['process'] = $pro_uid;
|
||||||
$dataList['search'] = $search;
|
$dataList['search'] = $search;
|
||||||
|
$dataList['filter'] = $filter;
|
||||||
$oCases = new \ProcessMaker\BusinessModel\Cases();
|
$dataList['dateFrom'] = $date_from;
|
||||||
$response = $oCases->getList($dataList);
|
$dataList['dateTo'] = $date_to;
|
||||||
|
$dataList['action'] = $action;
|
||||||
|
$lists = new \ProcessMaker\BusinessModel\Lists();
|
||||||
|
$response = $lists->getList('inbox', $dataList);
|
||||||
$result = $this->parserDataTodo($response['data']);
|
$result = $this->parserDataTodo($response['data']);
|
||||||
return $result;
|
return $result;
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
@@ -115,35 +122,29 @@ class Light extends Api
|
|||||||
public function parserDataTodo ($data)
|
public function parserDataTodo ($data)
|
||||||
{
|
{
|
||||||
$structure = array(
|
$structure = array(
|
||||||
//'app_uid' => 'mongoId',
|
'APP_UID' => 'caseId',
|
||||||
'app_uid' => 'caseId',
|
'APP_TITLE' => 'caseTitle',
|
||||||
'app_title' => 'caseTitle',
|
'APP_NUMBER' => 'caseNumber',
|
||||||
'app_number' => 'caseNumber',
|
'APP_UPDATE_DATE' => 'date',
|
||||||
'app_update_date' => 'date',
|
'DEL_TASK_DUE_DATE' => 'dueDate',
|
||||||
'del_task_due_date' => 'dueDate',
|
'DEL_INDEX' => 'delIndex',
|
||||||
'del_index' => 'delIndex',
|
|
||||||
//'' => 'status'
|
|
||||||
'user' => array(
|
'user' => array(
|
||||||
'usrcr_usr_uid' => 'userId',
|
'USR_UID' => 'userId'
|
||||||
'usrcr_usr_firstname' => 'firstName',
|
|
||||||
'usrcr_usr_lastname' => 'lastName',
|
|
||||||
'usrcr_usr_username' => 'fullName',
|
|
||||||
),
|
),
|
||||||
'prevUser' => array(
|
'prevUser' => array(
|
||||||
'previous_usr_uid' => 'userId',
|
'PREVIOUS_USR_UID' => 'userId',
|
||||||
'previous_usr_firstname' => 'firstName',
|
'PREVIOUS_USR_FIRSTNAME' => 'firstName',
|
||||||
'previous_usr_lastname' => 'lastName',
|
'PREVIOUS_USR_LASTNAME' => 'lastName',
|
||||||
'previous_usr_username' => 'fullName',
|
'PREVIOUS_USR_USERNAME' => 'fullName',
|
||||||
),
|
),
|
||||||
'process' => array(
|
'process' => array(
|
||||||
'pro_uid' => 'processId',
|
'PRO_UID' => 'processId',
|
||||||
'app_pro_title' => 'name'
|
'APP_PRO_TITLE' => 'name'
|
||||||
),
|
),
|
||||||
'task' => array(
|
'task' => array(
|
||||||
'tas_uid' => 'taskId',
|
'TAS_UID' => 'taskId',
|
||||||
'app_tas_title' => 'name'
|
'APP_TAS_TITLE' => 'name'
|
||||||
),
|
)
|
||||||
'inp_doc_uid' => 'documentUid' //Esta opcion es temporal
|
|
||||||
);
|
);
|
||||||
|
|
||||||
$response = $this->replaceFields($data, $structure);
|
$response = $this->replaceFields($data, $structure);
|
||||||
@@ -230,11 +231,14 @@ class Light extends Api
|
|||||||
public function doGetCasesListParticipated(
|
public function doGetCasesListParticipated(
|
||||||
$start = 0,
|
$start = 0,
|
||||||
$limit = 10,
|
$limit = 10,
|
||||||
$sort = 'APP_CACHE_VIEW.APP_NUMBER',
|
$sort = 'APP_UPDATE_DATE',
|
||||||
$dir = 'DESC',
|
$dir = 'DESC',
|
||||||
$cat_uid = '',
|
$cat_uid = '',
|
||||||
$pro_uid = '',
|
$pro_uid = '',
|
||||||
$search = ''
|
$search = '',
|
||||||
|
$filter = '',
|
||||||
|
$date_from = '',
|
||||||
|
$date_to = ''
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
$dataList['userId'] = $this->getUserId();
|
$dataList['userId'] = $this->getUserId();
|
||||||
@@ -247,8 +251,11 @@ class Light extends Api
|
|||||||
$dataList['category'] = $cat_uid;
|
$dataList['category'] = $cat_uid;
|
||||||
$dataList['process'] = $pro_uid;
|
$dataList['process'] = $pro_uid;
|
||||||
$dataList['search'] = $search;
|
$dataList['search'] = $search;
|
||||||
$oCases = new \ProcessMaker\BusinessModel\Cases();
|
$dataList['filter'] = $filter;
|
||||||
$response = $oCases->getList($dataList);
|
$dataList['dateFrom'] = $date_from;
|
||||||
|
$dataList['dateTo'] = $date_to;
|
||||||
|
$oCases = new \ProcessMaker\BusinessModel\Lists();
|
||||||
|
$response = $oCases->getList('participated_last', $dataList);
|
||||||
$result = $this->parserDataParticipated($response['data']);
|
$result = $this->parserDataParticipated($response['data']);
|
||||||
return $result;
|
return $result;
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
@@ -260,31 +267,31 @@ class Light extends Api
|
|||||||
{
|
{
|
||||||
$structure = array(
|
$structure = array(
|
||||||
//'app_uid' => 'mongoId',
|
//'app_uid' => 'mongoId',
|
||||||
'app_uid' => 'caseId',
|
'APP_UID' => 'caseId',
|
||||||
'app_title' => 'caseTitle',
|
'APP_TITLE' => 'caseTitle',
|
||||||
'app_number' => 'caseNumber',
|
'APP_NUMBER' => 'caseNumber',
|
||||||
'app_update_date' => 'date',
|
'APP_UPDATE_DATE' => 'date',
|
||||||
'del_task_due_date' => 'dueDate',
|
'DEL_TASK_DUE_DATE' => 'dueDate',
|
||||||
'del_index' => 'delIndex',
|
'DEL_INDEX' => 'delIndex',
|
||||||
'currentUser' => array(
|
'currentUser' => array(
|
||||||
'usrcr_usr_uid' => 'userId',
|
'USR_UID' => 'userId',
|
||||||
'usrcr_usr_firstname' => 'firstName',
|
'USR_FIRSTNAME' => 'firstName',
|
||||||
'usrcr_usr_lastname' => 'lastName',
|
'USR_LASTNAME' => 'lastName',
|
||||||
'usrcr_usr_username' => 'fullName',
|
'USR_USERNAME' => 'fullName',
|
||||||
),
|
),
|
||||||
'prevUser' => array(
|
'prevUser' => array(
|
||||||
'previous_usr_uid' => 'userId',
|
'PREVIOUS_USR_UID' => 'userId',
|
||||||
'previous_usr_firstname' => 'firstName',
|
'PREVIOUS_USR_FIRSTNAME' => 'firstName',
|
||||||
'previous_usr_lastname' => 'lastName',
|
'PREVIOUS_USR_LASTNAME' => 'lastName',
|
||||||
'previous_usr_username' => 'fullName',
|
'PREVIOUS_USR_USERNAME' => 'fullName',
|
||||||
),
|
),
|
||||||
'process' => array(
|
'process' => array(
|
||||||
'pro_uid' => 'processId',
|
'PRO_UID' => 'processId',
|
||||||
'app_pro_title' => 'name'
|
'APP_PRO_TITLE' => 'name'
|
||||||
),
|
),
|
||||||
'task' => array(
|
'task' => array(
|
||||||
'tas_uid' => 'taskId',
|
'TAS_UID' => 'taskId',
|
||||||
'app_tas_title' => 'name'
|
'APP_TAS_TITLE' => 'name'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -302,11 +309,14 @@ class Light extends Api
|
|||||||
public function doGetCasesListPaused(
|
public function doGetCasesListPaused(
|
||||||
$start = 0,
|
$start = 0,
|
||||||
$limit = 10,
|
$limit = 10,
|
||||||
$sort = 'APP_CACHE_VIEW.APP_NUMBER',
|
$sort = 'APP_PAUSED_DATE',
|
||||||
$dir = 'DESC',
|
$dir = 'DESC',
|
||||||
$cat_uid = '',
|
$cat_uid = '',
|
||||||
$pro_uid = '',
|
$pro_uid = '',
|
||||||
$search = ''
|
$search = '',
|
||||||
|
$filter = '',
|
||||||
|
$date_from = '',
|
||||||
|
$date_to = ''
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
$dataList['userId'] = $this->getUserId();
|
$dataList['userId'] = $this->getUserId();
|
||||||
@@ -320,8 +330,11 @@ class Light extends Api
|
|||||||
$dataList['category'] = $cat_uid;
|
$dataList['category'] = $cat_uid;
|
||||||
$dataList['process'] = $pro_uid;
|
$dataList['process'] = $pro_uid;
|
||||||
$dataList['search'] = $search;
|
$dataList['search'] = $search;
|
||||||
$oCases = new \ProcessMaker\BusinessModel\Cases();
|
$dataList['filter'] = $filter;
|
||||||
$response = $oCases->getList($dataList);
|
$dataList['dateFrom'] = $date_from;
|
||||||
|
$dataList['dateTo'] = $date_to;
|
||||||
|
$lists = new \ProcessMaker\BusinessModel\Lists();
|
||||||
|
$response = $lists->getList('paused', $dataList);
|
||||||
$result = $this->parserDataParticipated($response['data']);
|
$result = $this->parserDataParticipated($response['data']);
|
||||||
return $result;
|
return $result;
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
@@ -332,32 +345,31 @@ class Light extends Api
|
|||||||
public function parserDataPaused ($data)
|
public function parserDataPaused ($data)
|
||||||
{
|
{
|
||||||
$structure = array(
|
$structure = array(
|
||||||
//'app_uid' => 'mongoId',
|
'APP_UID' => 'caseId',
|
||||||
'app_uid' => 'caseId',
|
'APP_TITLE' => 'caseTitle',
|
||||||
'app_title' => 'caseTitle',
|
'APP_NUMBER' => 'caseNumber',
|
||||||
'app_number' => 'caseNumber',
|
'APP_UPDATE_DATE' => 'date',
|
||||||
'app_update_date' => 'date',
|
'DEL_TASK_DUE_DATE' => 'dueDate',
|
||||||
'del_task_due_date' => 'dueDate',
|
'DEL_INDEX' => 'delIndex',
|
||||||
'del_index' => 'delIndex',
|
|
||||||
'currentUser' => array(
|
'currentUser' => array(
|
||||||
'usrcr_usr_uid' => 'userId',
|
'USR_UID' => 'userId',
|
||||||
'usrcr_usr_firstname' => 'firstName',
|
'DEL_CURRENT_USR_FIRSTNAME' => 'firstName',
|
||||||
'usrcr_usr_lastname' => 'lastName',
|
'DEL_CURRENT_USR_LASTNAME' => 'lastName',
|
||||||
'usrcr_usr_username' => 'fullName',
|
'DEL_CURRENT_USR_USERNAME' => 'fullName',
|
||||||
),
|
),
|
||||||
'prevUser' => array(
|
'prevUser' => array(
|
||||||
'previous_usr_uid' => 'userId',
|
'DEL_PREVIOUS_USR_UID' => 'userId',
|
||||||
'previous_usr_firstname' => 'firstName',
|
'DEL_PREVIOUS_USR_FIRSTNAME' => 'firstName',
|
||||||
'previous_usr_lastname' => 'lastName',
|
'DEL_PREVIOUS_USR_LASTNAME' => 'lastName',
|
||||||
'previous_usr_username' => 'fullName',
|
'DEL_PREVIOUS_USR_USERNAME' => 'fullName',
|
||||||
),
|
),
|
||||||
'process' => array(
|
'process' => array(
|
||||||
'pro_uid' => 'processId',
|
'PRO_UID' => 'processId',
|
||||||
'app_pro_title' => 'name'
|
'APP_PRO_TITLE' => 'name'
|
||||||
),
|
),
|
||||||
'task' => array(
|
'task' => array(
|
||||||
'tas_uid' => 'taskId',
|
'TAS_UID' => 'taskId',
|
||||||
'app_tas_title' => 'name'
|
'APP_TAS_TITLE' => 'name'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user