Merge remote-tracking branch 'upstream/MT-10' into MT-10
This commit is contained in:
@@ -3131,6 +3131,50 @@ class Processes
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $sProUid
|
||||
* @return mixed
|
||||
* @throws Exception
|
||||
*/
|
||||
public function getReportTables($sProUid)
|
||||
{
|
||||
try {
|
||||
|
||||
$additionalTables = new AdditionalTables();
|
||||
$getalldditionalTables = $additionalTables->getReportTables($sProUid);
|
||||
return $getalldditionalTables;
|
||||
} catch (Exception $oError) {
|
||||
throw $oError;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $sProUid
|
||||
* @return mixed
|
||||
* @throws Exception
|
||||
*/
|
||||
public function getReportTablesVar($sProUid)
|
||||
{
|
||||
try {
|
||||
$fieldsReportTables = array();
|
||||
$additionalTables = new AdditionalTables();
|
||||
$getalldditionalTables = $additionalTables->getReportTables($sProUid);
|
||||
|
||||
foreach ($getalldditionalTables as $row) {
|
||||
$additionalTables->setAddTabUid($row['ADD_TAB_UID']);
|
||||
$fieldsAdditionalTables = $additionalTables->getFields();
|
||||
foreach ($fieldsAdditionalTables as $rowField) {
|
||||
$rowField['ADD_TAB_UID'] = $row['ADD_TAB_UID'];
|
||||
array_push($fieldsReportTables, $rowField);
|
||||
}
|
||||
}
|
||||
|
||||
return $fieldsReportTables;
|
||||
} catch (Exception $oError) {
|
||||
throw $oError;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Report Tables Vars Rows for a Process
|
||||
*
|
||||
@@ -4045,6 +4089,29 @@ class Processes
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create if the new Files Managers does not exist
|
||||
*
|
||||
* @param string $processUid Unique id of Process
|
||||
* @param array $arrayData Data
|
||||
*
|
||||
* return void
|
||||
*/
|
||||
public function addNewFilesManager($processUid, array $arrayData)
|
||||
{
|
||||
try {
|
||||
$filesManager = new \ProcessMaker\BusinessModel\FilesManager();
|
||||
|
||||
foreach ($arrayData as $value) {
|
||||
if(!$filesManager->existsProcessFile($value['PRF_UID'])){
|
||||
$filesManager->addProcessFilesManagerInDb($value);
|
||||
}
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $arrayData
|
||||
* @throws Exception
|
||||
|
||||
Reference in New Issue
Block a user