doorcardpass && door move manager logging
This commit is contained in:
@@ -2,18 +2,17 @@
|
||||
|
||||
namespace frontend\controllers;
|
||||
|
||||
use common\components\DateUtil;
|
||||
use common\components\Helper;
|
||||
use common\manager\DoorCardPassManager;
|
||||
use common\models\Card;
|
||||
use common\models\DoorCardPass;
|
||||
use Yii;
|
||||
use common\models\City;
|
||||
use backend\models\CitySearch;
|
||||
use yii\web\BadRequestHttpException;
|
||||
use yii\web\Controller;
|
||||
use yii\web\NotFoundHttpException;
|
||||
use yii\filters\VerbFilter;
|
||||
use yii\base\BaseObject;
|
||||
use yii\db\Query;
|
||||
use yii\helpers\Json;
|
||||
|
||||
/**
|
||||
* CityController implements the CRUD actions for City model.
|
||||
@@ -39,11 +38,12 @@ class DoorCardPassController extends Controller
|
||||
if (!isset($card)){
|
||||
throw new BadRequestHttpException("card id not found");
|
||||
}
|
||||
$model = new DoorCardPass();
|
||||
$model->id_card = $idCard;
|
||||
$model->save(false);
|
||||
|
||||
$this->redirect('customer/reception');
|
||||
$doorCardPassManager = new DoorCardPassManager();
|
||||
$doorCardPassManager->createNewDoorCardPass($idCard);
|
||||
$doorCardPassManager->updateDoorCardPassStateForCard($idCard);
|
||||
|
||||
$this->redirect(['customer/reception', 'number' => $card->number]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -72,5 +72,5 @@ class DoorCardPassController extends Controller
|
||||
throw new NotFoundHttpException('The requested page does not exist.');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user