|
@@ -64,8 +64,8 @@ class CameraStatusHistory extends Command
|
|
|
$nm['mine_code'] = $ningmei[0]->slug;
|
|
|
$nm['total'] = DB::table('camera_list')->whereIn('mine_id',$mine_ningmei)->where('deleted_at',null)->count();
|
|
|
$nm['total_online'] = DB::table('camera_list')->whereIn('mine_id',$mine_ningmei)->where('camera_status',1)->where('deleted_at',null)->count();
|
|
|
- $nm['total_offline'] = $ningmei['total'] - $ningmei['total_online'];
|
|
|
- $nm['rate'] = round($ningmei['total_online'] / $ningmei['total'] * 100,2);
|
|
|
+ $nm['total_offline'] = $nm['total'] - $nm['total_online'];
|
|
|
+ $nm['rate'] = round($nm['total_online'] / $nm['total'] * 100,2);
|
|
|
$nm['type'] = 0;
|
|
|
$nm['date'] = date('Y-m-d');
|
|
|
DB::table('camera_status_history')->insert($nm);
|