|
@@ -164,6 +164,7 @@ class UpdateHkList extends Command
|
|
->where('degree','like',$mine_list_ext[$i]->mine_id.'|%')
|
|
->where('degree','like',$mine_list_ext[$i]->mine_id.'|%')
|
|
->where('index_code','!=',null)->get();
|
|
->where('index_code','!=',null)->get();
|
|
foreach($mine_list as $k=>$v){
|
|
foreach($mine_list as $k=>$v){
|
|
|
|
+ $mine_id = $v->id;
|
|
Input::replace(
|
|
Input::replace(
|
|
[
|
|
[
|
|
'parentOrgIds' => $v->index_code,
|
|
'parentOrgIds' => $v->index_code,
|
|
@@ -176,6 +177,7 @@ class UpdateHkList extends Command
|
|
//获取区域下的子区域
|
|
//获取区域下的子区域
|
|
$tdwy = new TdwyController();
|
|
$tdwy = new TdwyController();
|
|
$region = $tdwy->getRegionByOrgId();
|
|
$region = $tdwy->getRegionByOrgId();
|
|
|
|
+
|
|
//获取最底层区域摄像头列表
|
|
//获取最底层区域摄像头列表
|
|
if (empty($region['content'])) {
|
|
if (empty($region['content'])) {
|
|
Input::replace(
|
|
Input::replace(
|
|
@@ -192,8 +194,9 @@ class UpdateHkList extends Command
|
|
//获取设备列表
|
|
//获取设备列表
|
|
$tdwy = new TdwyController();
|
|
$tdwy = new TdwyController();
|
|
$device_list = $tdwy->queryDeviceList();
|
|
$device_list = $tdwy->queryDeviceList();
|
|
|
|
+ $device_index_code = [];
|
|
//删除区域下所有摄像头
|
|
//删除区域下所有摄像头
|
|
- DB::table('camera_list')->where('mine_id',$v->id)->delete();
|
|
|
|
|
|
+// DB::table('camera_list')->where('mine_id',$v->id)->delete();
|
|
if(sizeof($device_list['content'])>0){
|
|
if(sizeof($device_list['content'])>0){
|
|
for($j=0;$j<sizeof($device_list['content']);$j++){//循环添加区域下所有摄像头
|
|
for($j=0;$j<sizeof($device_list['content']);$j++){//循环添加区域下所有摄像头
|
|
if(isset($device_list['content'][$j]['sId'])){//筛选有sId的摄像头
|
|
if(isset($device_list['content'][$j]['sId'])){//筛选有sId的摄像头
|
|
@@ -210,6 +213,7 @@ class UpdateHkList extends Command
|
|
];
|
|
];
|
|
CameraList::updateOrCreate(['index_code' => $device_list['content'][$j]['sId']], $params);
|
|
CameraList::updateOrCreate(['index_code' => $device_list['content'][$j]['sId']], $params);
|
|
}
|
|
}
|
|
|
|
+ $device_index_code[$j] = $device_list['content'][$j]['sId'];
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|