소스 검색

摄像头状态历史数据

任敬轩 1 년 전
부모
커밋
a8b9b4a0d3
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      app/Console/Commands/CameraStatusHistory.php

+ 2 - 2
app/Console/Commands/CameraStatusHistory.php

@@ -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);