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

报警记录添加设备id

parent 66fd6216
Pipeline #129 canceled with stages
......@@ -378,14 +378,14 @@ class DevicesController extends Controller
if (!is_null($this->isadmin())) {
$data = DB::table('reportpolice as r')
->join('status as s', 'r.policestatus', '=', 's.id')
->select('r.*', 's.status_name')
->select('r.*', 's.status_name','d.id as deid')
->get();
}else{
$data = DB::table('reportpolice as r')
->join('status as s', 'r.policestatus', '=', 's.id')
->join('device as d' , 'r.devicenumber','=','d.devicenum')
->where('d.uid','=',Auth::id())
->select('r.*', 's.status_name')
->select('r.*', 's.status_name','d.id as deid')
->get();
}
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