MT-28
This commit is contained in:
@@ -2599,6 +2599,7 @@ class Processes
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $aStepSupervisor
|
* @param $aStepSupervisor
|
||||||
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function updateStepSupervisorRows ($aStepSupervisor)
|
public function updateStepSupervisorRows ($aStepSupervisor)
|
||||||
{
|
{
|
||||||
@@ -2717,6 +2718,7 @@ class Processes
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $aPermission
|
* @param $aPermission
|
||||||
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function createObjectPermissionRows ($aPermission)
|
public function createObjectPermissionRows ($aPermission)
|
||||||
{
|
{
|
||||||
@@ -2735,6 +2737,7 @@ class Processes
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $aPermission
|
* @param $aPermission
|
||||||
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function updateObjectPermissionRows ($aPermission)
|
public function updateObjectPermissionRows ($aPermission)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,13 +25,21 @@ class DBConnectionMigrator implements Importable, Exportable
|
|||||||
// TODO: Implement beforeImport() method.
|
// TODO: Implement beforeImport() method.
|
||||||
}
|
}
|
||||||
|
|
||||||
public function import($data)
|
/**
|
||||||
|
* @param $data
|
||||||
|
* @param $replace
|
||||||
|
*/
|
||||||
|
public function import($data, $replace)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$this->processes->createDBConnectionsRows($data);
|
if ($replace) {
|
||||||
|
$this->processes->createDBConnectionsRows($data);
|
||||||
|
} else {
|
||||||
|
$this->processes->updateDBConnectionsRows($data);
|
||||||
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
\Logger::log($e->getMessage());
|
\Logger::log($e->getMessage());
|
||||||
throw new ImportException($e->getMessage());
|
throwException(new ImportException($e->getMessage()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,13 +24,21 @@ class DynaformsMigrator implements Importable, Exportable
|
|||||||
// TODO: Implement beforeImport() method.
|
// TODO: Implement beforeImport() method.
|
||||||
}
|
}
|
||||||
|
|
||||||
public function import($data)
|
/**
|
||||||
|
* @param $data
|
||||||
|
* @param $replace
|
||||||
|
*/
|
||||||
|
public function import($data, $replace)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$this->processes->createDynaformRows($data);
|
if ($replace) {
|
||||||
|
$this->processes->createDynaformRows($data);
|
||||||
|
} else {
|
||||||
|
$this->processes->updateDynaformRows($data);
|
||||||
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
\Logger::log($e->getMessage());
|
\Logger::log($e->getMessage());
|
||||||
throw new ImportException($e->getMessage());
|
throwException(new ImportException($e->getMessage()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,11 @@ class FilesMigrator implements Importable, Exportable
|
|||||||
// TODO: Implement beforeImport() method.
|
// TODO: Implement beforeImport() method.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $data
|
||||||
|
* @param $replace
|
||||||
|
* @throws ImportException
|
||||||
|
*/
|
||||||
public function import($data, $replace)
|
public function import($data, $replace)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -25,13 +25,21 @@ class InputDocumentsMigrator implements Importable, Exportable
|
|||||||
// TODO: Implement beforeImport() method.
|
// TODO: Implement beforeImport() method.
|
||||||
}
|
}
|
||||||
|
|
||||||
public function import($data)
|
/**
|
||||||
|
* @param $data
|
||||||
|
* @param $replace
|
||||||
|
*/
|
||||||
|
public function import($data, $replace)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$this->processes->createInputRows($data);
|
if ($replace) {
|
||||||
|
$this->processes->createInputRows($data);
|
||||||
|
} else {
|
||||||
|
$this->processes->updateInputRows($data);
|
||||||
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
\Logger::log($e->getMessage());
|
\Logger::log($e->getMessage());
|
||||||
throw new ImportException($e->getMessage());
|
throwException(new ImportException($e->getMessage()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,13 +27,21 @@ class OutputDocumentsMigrator implements Importable, Exportable
|
|||||||
// TODO: Implement beforeImport() method.
|
// TODO: Implement beforeImport() method.
|
||||||
}
|
}
|
||||||
|
|
||||||
public function import($data)
|
/**
|
||||||
|
* @param $data
|
||||||
|
* @param $replace
|
||||||
|
*/
|
||||||
|
public function import($data, $replace)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$this->processes->createOutputRows($data);
|
if ($replace) {
|
||||||
|
$this->processes->createOutputRows($data);
|
||||||
|
} else {
|
||||||
|
$this->processes->updateOutputRows($data);
|
||||||
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
\Logger::log($e->getMessage());
|
\Logger::log($e->getMessage());
|
||||||
throw new ImportException($e->getMessage());
|
throwException(new ImportException($e->getMessage()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,9 +26,22 @@ class PermissionsMigrator implements Importable, Exportable
|
|||||||
// TODO: Implement beforeImport() method.
|
// TODO: Implement beforeImport() method.
|
||||||
}
|
}
|
||||||
|
|
||||||
public function import($data)
|
/**
|
||||||
|
* @param $data
|
||||||
|
* @param $replace
|
||||||
|
*/
|
||||||
|
public function import($data, $replace)
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
|
if ($replace) {
|
||||||
|
$this->processes->createObjectPermissionsRows($data);
|
||||||
|
} else {
|
||||||
|
$this->processes->updateObjectPermissionRows($data);
|
||||||
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
\Logger::log($e->getMessage());
|
||||||
|
throwException(new ImportException($e->getMessage()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function afterImport($data)
|
public function afterImport($data)
|
||||||
|
|||||||
@@ -25,9 +25,23 @@ class ReportTablesMigrator implements Importable, Exportable
|
|||||||
// TODO: Implement beforeImport() method.
|
// TODO: Implement beforeImport() method.
|
||||||
}
|
}
|
||||||
|
|
||||||
public function import($data)
|
/**
|
||||||
|
* @param $data
|
||||||
|
* @param $replace
|
||||||
|
*/
|
||||||
|
public function import($data, $replace)
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
|
$aReportTablesVars = array();
|
||||||
|
if ($replace) {
|
||||||
|
$this->processes->createReportTables($data, $aReportTablesVars);
|
||||||
|
} else {
|
||||||
|
$this->processes->updateReportTables($data, $aReportTablesVars);
|
||||||
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
\Logger::log($e->getMessage());
|
||||||
|
throwException(new ImportException($e->getMessage()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function afterImport($data)
|
public function afterImport($data)
|
||||||
|
|||||||
@@ -26,9 +26,22 @@ class SupervisorsMigrator implements Importable, Exportable
|
|||||||
// TODO: Implement beforeImport() method.
|
// TODO: Implement beforeImport() method.
|
||||||
}
|
}
|
||||||
|
|
||||||
public function import($data)
|
/**
|
||||||
|
* @param $data
|
||||||
|
* @param $replace
|
||||||
|
*/
|
||||||
|
public function import($data, $replace)
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
|
if ($replace) {
|
||||||
|
$this->processes->createProcessUser($data);
|
||||||
|
} else {
|
||||||
|
$this->processes->updateProcessUser($data);
|
||||||
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
\Logger::log($e->getMessage());
|
||||||
|
throwException(new ImportException($e->getMessage()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function afterImport($data)
|
public function afterImport($data)
|
||||||
|
|||||||
@@ -25,9 +25,22 @@ class SupervisorsObjectsMigrator implements Importable, Exportable
|
|||||||
// TODO: Implement beforeImport() method.
|
// TODO: Implement beforeImport() method.
|
||||||
}
|
}
|
||||||
|
|
||||||
public function import($data)
|
/**
|
||||||
|
* @param $data
|
||||||
|
* @param $replace
|
||||||
|
*/
|
||||||
|
public function import($data, $replace)
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
|
if ($replace) {
|
||||||
|
$this->processes->createStepSupervisorRows($data);
|
||||||
|
} else {
|
||||||
|
$this->processes->updateStepSupervisorRows($data);
|
||||||
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
\Logger::log($e->getMessage());
|
||||||
|
throwException(new ImportException($e->getMessage()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function afterImport($data)
|
public function afterImport($data)
|
||||||
|
|||||||
Reference in New Issue
Block a user