update cho Cao Bang

This commit is contained in:
2020-02-27 09:49:06 +07:00
parent 417e1ec3b7
commit 4c775c111f
6 changed files with 32 additions and 34 deletions

View File

@@ -4,6 +4,7 @@ namespace app\controllers;
use Yii;
use app\models\Logs;
use app\models\LogsUnknow;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
@@ -43,7 +44,7 @@ class DashboardController extends Controller {
$f = date_format(date_create_from_format('H:i d/m/Y', "00:00 " . date("d/m/Y")), 'U');
$t = date_format(date_create_from_format('H:i d/m/Y', "23:59 " . date("d/m/Y")), 'U');
$logs = Logs::find()->andWhere(["OR", ["BETWEEN", 'time_in', $f, $t], ["BETWEEN", 'time_out', $f, $t]])->orderBy(['time_in' => SORT_DESC, 'time_out' => SORT_DESC])->all();
$logs = LogsUnknow::find()->andWhere(["OR", ["BETWEEN", 'time_in', $f, $t], ["BETWEEN", 'time_out', $f, $t]])->orderBy(['time_in' => SORT_DESC, 'time_out' => SORT_DESC])->all();
$temp = [];
$in = 0;