исправление иморта деловых линий

This commit is contained in:
root 2022-10-31 00:29:53 +00:00
parent fc38285d06
commit a11a21d1ab
3 changed files with 426 additions and 4425 deletions

4829
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -24,9 +24,9 @@ class DellinController extends Controller
/**
* Импортировать терминалы из ДеловыеЛинии
*/
public function actionImportTerminals()
public function actionImportTerminals(?int $account = null)
{
if (Dellin::importTerminals()) {
if (Dellin::importTerminals($account)) {
return ExitCode::OK;
}

View File

@ -295,15 +295,19 @@ class Dellin extends Model
if (is_null($account)) {
// Данные аккаунта не переданы
if (yii::$app->user->isGuest) {
// Аккаунт не аутентифицирован
if (isset(yii::$app->user)) {
if (yii::$app->user->isGuest) {
// Аккаунт не аутентифицирован
return 0;
return 0;
} else {
// Аккаунт аутентифицирован
// Инициализация
$account = yii::$app->user->identity;
}
} else {
// Аккаунт аутентифицирован
// Инициализация
$account = yii::$app->user->identity;
return 0;
}
} else {
if (is_int($account)) {