PMCORE-3832
This commit is contained in:
committed by
Paula.Quispe
parent
c4684271c6
commit
908e975d5f
@@ -75,6 +75,30 @@ class CaseList extends Model
|
||||
*/
|
||||
public static $excludeColumns = ['APP_UID', 'APP_NUMBER', 'APP_STATUS'];
|
||||
|
||||
/**
|
||||
* Get case list
|
||||
*
|
||||
* @param string $id
|
||||
* @param string $type
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Builder
|
||||
*/
|
||||
public static function getCaseList($id, $type)
|
||||
{
|
||||
$caseList = CaseList::where('CAL_ID', '=', $id)
|
||||
->where('CAL_TYPE', '=', $type)
|
||||
->leftJoin('ADDITIONAL_TABLES', 'ADDITIONAL_TABLES.ADD_TAB_UID', '=', 'CASE_LIST.ADD_TAB_UID')
|
||||
->select([
|
||||
'CASE_LIST.*',
|
||||
'ADDITIONAL_TABLES.ADD_TAB_NAME',
|
||||
'ADDITIONAL_TABLES.PRO_UID'
|
||||
])
|
||||
->get()
|
||||
->first();
|
||||
|
||||
return $caseList;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get column name from alias.
|
||||
* @param array $array
|
||||
|
||||
@@ -204,6 +204,25 @@ class Process extends Model
|
||||
return $query->where('PROCESS.PRO_STATUS', $status);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return process
|
||||
* @param int|string $id
|
||||
* @param string $key
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getIds($id, $key)
|
||||
{
|
||||
$process = Process::query()
|
||||
->select()
|
||||
->where($key, $id)
|
||||
->get()
|
||||
->values()
|
||||
->toArray();
|
||||
|
||||
return $process;
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtains the process list for an specific user and/or for the specific category
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user