Add new flag / flag_out logick

This commit is contained in:
2016-09-25 13:32:27 +02:00
parent d46e717b53
commit 0ad2dafdeb
19 changed files with 389 additions and 29 deletions

View File

@@ -75,7 +75,7 @@ class DoorlogController extends Controller{
$card = $subject->card;
echo "in:" . $subject->usage_count. " | out:" . $subject->count_move_out . " | max: " .$subject->max_usage_count. " | card flag: " . $card->flag ."\n";
echo "in:" . $subject->usage_count. " | out:" . $subject->count_move_out . " | max: " .$subject->max_usage_count. " | card validity: " . $card->validity ."\n";
}

View File

@@ -0,0 +1,25 @@
<?php
namespace console\controllers;
use Yii;
use common\models;
use yii\console\Controller;
use common\models\Ticket;
use common\models\DoorLog;
use yii\helpers\VarDumper;
use common\models\Customer;
use common\models\Log;
class ProductConsoleController extends Controller{
public function actionIndex( )
{
\Yii::info("product console command");
}
}

View File

@@ -2,6 +2,7 @@
namespace console\controllers;
use common\models\Card;
use Yii;
use yii\console\Controller;
use common\models\Ticket;
@@ -16,12 +17,17 @@ use yii\helpers\Html;
use common\models\Subscriber;
class TicketController extends Controller {
public function actionIndex() {
$connection = \Yii::$app->db;
$command = $connection->createCommand ( Ticket::$SQL_UPDATE );
$command = $connection->createCommand ( Card::$SQL_CLEARS_STATUS_DOOR );
$result = $command->execute ();
\Yii::info ( "Tickets updated flag door: " . $result );
$command = $connection->createCommand ( Ticket::$SQL_UPDATE );
$result = $command->execute ();
\Yii::info ( "Tickets updated: " . $result );
echo "Tickets updated: " . $result;
}
/**