|
@@ -319,6 +319,34 @@ class MineServices{
|
|
|
return $mine_list;
|
|
|
}
|
|
|
|
|
|
+ //根据区域编号获取下一级区域列表
|
|
|
+ public static function getChildArea($parent_id, $mine_id , $type = CameraEnum::REQUEST_TYPE_API)
|
|
|
+ {
|
|
|
+ $result['status'] = true;
|
|
|
+ $result['msg'] = ApiEnum::RETURN_SUCCESS;
|
|
|
+ $result['data'] = [];
|
|
|
+
|
|
|
+ $query = MineListExt::where('mine_id', $parent_id)->first();
|
|
|
+
|
|
|
+ $mine = DB::table('mine_list')->where('id',$mine_id)->get();
|
|
|
+
|
|
|
+ Input::replace(
|
|
|
+ [
|
|
|
+ 'url' => trim($query->ip, '/') . ':' . $query->port,
|
|
|
+ 'key' => $query->key,
|
|
|
+ 'secret' => $query->secret,
|
|
|
+ 'type' => $type,
|
|
|
+ 'index_code' => $mine[0]->index_code,
|
|
|
+ ]
|
|
|
+ );
|
|
|
+ $haikang = new HaiKangController();
|
|
|
+ $result_hk = $haikang->getChildMineList();
|
|
|
+
|
|
|
+ $result['data'] = $result_hk['data']['list'];
|
|
|
+
|
|
|
+ return $result;
|
|
|
+ }
|
|
|
+
|
|
|
//查询海康矿井区域
|
|
|
public static function getHaiKangArea($mine_id, $type = CameraEnum::REQUEST_TYPE_API)
|
|
|
{
|