|
@@ -48,6 +48,7 @@ class NmCameraStatus extends Command
|
|
//同步区域列表
|
|
//同步区域列表
|
|
public function cameraStatusNm()
|
|
public function cameraStatusNm()
|
|
{
|
|
{
|
|
|
|
+// ini_set("memory_limit", "-1");
|
|
//宁煤集团
|
|
//宁煤集团
|
|
$ningmei = DB::table('mine_list')->where('title',config('mine_hls'))->get();
|
|
$ningmei = DB::table('mine_list')->where('title',config('mine_hls'))->get();
|
|
//所有区域
|
|
//所有区域
|
|
@@ -65,7 +66,8 @@ class NmCameraStatus extends Command
|
|
$camera = DB::table('camera_list')
|
|
$camera = DB::table('camera_list')
|
|
->whereIn('mine_id',$mine_use)
|
|
->whereIn('mine_id',$mine_use)
|
|
->where('deleted_at',null)
|
|
->where('deleted_at',null)
|
|
- ->get();
|
|
|
|
|
|
+ ->pluck('index_code','id')
|
|
|
|
+ ->all();
|
|
|
|
|
|
$query = MineListExt::where('mine_id', $ningmei[0]->id)->first();
|
|
$query = MineListExt::where('mine_id', $ningmei[0]->id)->first();
|
|
|
|
|
|
@@ -79,8 +81,8 @@ class NmCameraStatus extends Command
|
|
$haikang = new HaiKangController();
|
|
$haikang = new HaiKangController();
|
|
|
|
|
|
foreach($camera as $k=>$v){
|
|
foreach($camera as $k=>$v){
|
|
- $res['camera_status'] = $haikang->getCameraStatus($v->index_code);
|
|
|
|
- DB::table('camera_list')->where('id',$v->id)->update($res);
|
|
|
|
|
|
+ $res['camera_status'] = $haikang->getCameraStatus($v);
|
|
|
|
+ DB::table('camera_list')->where('id',$k)->update($res);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|