Commit b9d8a862 authored by 冯超鹏's avatar 冯超鹏

报警记录添加设备id

parent 66fd6216
Pipeline #129 canceled with stages
...@@ -378,14 +378,14 @@ class DevicesController extends Controller ...@@ -378,14 +378,14 @@ class DevicesController extends Controller
if (!is_null($this->isadmin())) { if (!is_null($this->isadmin())) {
$data = DB::table('reportpolice as r') $data = DB::table('reportpolice as r')
->join('status as s', 'r.policestatus', '=', 's.id') ->join('status as s', 'r.policestatus', '=', 's.id')
->select('r.*', 's.status_name') ->select('r.*', 's.status_name','d.id as deid')
->get(); ->get();
}else{ }else{
$data = DB::table('reportpolice as r') $data = DB::table('reportpolice as r')
->join('status as s', 'r.policestatus', '=', 's.id') ->join('status as s', 'r.policestatus', '=', 's.id')
->join('device as d' , 'r.devicenumber','=','d.devicenum') ->join('device as d' , 'r.devicenumber','=','d.devicenum')
->where('d.uid','=',Auth::id()) ->where('d.uid','=',Auth::id())
->select('r.*', 's.status_name') ->select('r.*', 's.status_name','d.id as deid')
->get(); ->get();
} }
return $this->jsonSuccessData($data); return $this->jsonSuccessData($data);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment