|
@@ -165,8 +165,12 @@ class Report extends CatchModel
|
|
$end_time = date('Y-m-d');
|
|
$end_time = date('Y-m-d');
|
|
}
|
|
}
|
|
// 获取设备类型
|
|
// 获取设备类型
|
|
- $device_types = $this->getDeviceType();
|
|
|
|
-
|
|
|
|
|
|
+ $device_types = array(
|
|
|
|
+ array('text'=>'法兰'),
|
|
|
|
+ array('text'=>'液压泵'),
|
|
|
|
+ array('text'=>'液压扳手'),
|
|
|
|
+ );
|
|
|
|
+ // var_dump($device_types);
|
|
$data = [];
|
|
$data = [];
|
|
$device_model = new DeviceModel();
|
|
$device_model = new DeviceModel();
|
|
while ($start_time <= $end_time) {
|
|
while ($start_time <= $end_time) {
|
|
@@ -176,17 +180,18 @@ 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 = $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);
|
|
// var_dump($device_model->getLastSql());
|
|
// var_dump($device_model->getLastSql());
|
|
$data[$type['text']]['data'][$start_time] = $count;
|
|
$data[$type['text']]['data'][$start_time] = $count;
|
|
}
|
|
}
|
|
|
|
|
|
$start_time = date('Y-m-d', strtotime($start_time . ' +1 day'));
|
|
$start_time = date('Y-m-d', strtotime($start_time . ' +1 day'));
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
return array_values($data);
|
|
return array_values($data);
|
|
}
|
|
}
|
|
|
|
|