|
@@ -7,7 +7,7 @@ use catcher\Utils;
|
|
use catchAdmin\permissions\model\DataRangScopeTrait;
|
|
use catchAdmin\permissions\model\DataRangScopeTrait;
|
|
|
|
|
|
use catchAdmin\stations\model\Station as StationModel;
|
|
use catchAdmin\stations\model\Station as StationModel;
|
|
-use catchAdmin\device\model\Device as DeviceModel;
|
|
|
|
|
|
+
|
|
use catchAdmin\school\model\KqBuilding as BuildingModel;
|
|
use catchAdmin\school\model\KqBuilding as BuildingModel;
|
|
use catchAdmin\permissions\model\Users as UsersModel;
|
|
use catchAdmin\permissions\model\Users as UsersModel;
|
|
use catchAdmin\permissions\model\Department as DepartmentModel;
|
|
use catchAdmin\permissions\model\Department as DepartmentModel;
|
|
@@ -172,7 +172,7 @@ class Report extends CatchModel
|
|
);
|
|
);
|
|
// var_dump($device_types);
|
|
// var_dump($device_types);
|
|
$data = [];
|
|
$data = [];
|
|
- $device_model = new DeviceModel();
|
|
|
|
|
|
+
|
|
while ($start_time <= $end_time) {
|
|
while ($start_time <= $end_time) {
|
|
|
|
|
|
foreach($device_types as $type) {
|
|
foreach($device_types as $type) {
|
|
@@ -180,12 +180,9 @@ class Report extends CatchModel
|
|
$data[$type['text']]['name'] = $type['text'];
|
|
$data[$type['text']]['name'] = $type['text'];
|
|
}
|
|
}
|
|
|
|
|
|
- // $count = $device_model->dataRange()
|
|
|
|
- // ->where('device_type', $type['value'])
|
|
|
|
- // ->whereBetweenTime('created_at', 0, date('Y-m-d 23:59:59', strtotime($start_time)))
|
|
|
|
- // ->count();
|
|
|
|
|
|
+
|
|
$count=mt_rand(1,10);
|
|
$count=mt_rand(1,10);
|
|
- // var_dump($device_model->getLastSql());
|
|
|
|
|
|
+
|
|
$data[$type['text']]['data'][$start_time] = $count;
|
|
$data[$type['text']]['data'][$start_time] = $count;
|
|
}
|
|
}
|
|
|
|
|