|
@@ -67,8 +67,7 @@ class CameraStatusHistory extends Command
|
|
$ningmei['total_offline'] = $ningmei['total'] - $ningmei['total_online'];
|
|
$ningmei['total_offline'] = $ningmei['total'] - $ningmei['total_online'];
|
|
$ningmei['rate'] = round($ningmei['total_online'] / $ningmei['total'] * 100,2);
|
|
$ningmei['rate'] = round($ningmei['total_online'] / $ningmei['total'] * 100,2);
|
|
$ningmei['type'] = 0;
|
|
$ningmei['type'] = 0;
|
|
- $ningmei['created_at'] = date('Y-m-d H:i:s');
|
|
|
|
- $ningmei['updated_at'] = date('Y-m-d H:i:s');
|
|
|
|
|
|
+ $ningmei['date'] = date('Y-m-d');
|
|
DB::table('camera_status_history')->insert($ningmei);
|
|
DB::table('camera_status_history')->insert($ningmei);
|
|
|
|
|
|
$data = [];
|
|
$data = [];
|
|
@@ -129,8 +128,7 @@ class CameraStatusHistory extends Command
|
|
}else{
|
|
}else{
|
|
$res['type'] = 3;
|
|
$res['type'] = 3;
|
|
}
|
|
}
|
|
- $res['created_at'] = date('Y-m-d H:i:s');
|
|
|
|
- $res['updated_at'] = date('Y-m-d H:i:s');
|
|
|
|
|
|
+ $res['date'] = date('Y-m-d');
|
|
DB::table('camera_status_history')->insert($res);
|
|
DB::table('camera_status_history')->insert($res);
|
|
}
|
|
}
|
|
}
|
|
}
|