Commit b3f364f2 authored by Administrator's avatar Administrator

Merge branch 'hotfix/alarm_order_store'

parents ecc7108c 5747a2d5
Pipeline #187 failed with stage
...@@ -27,11 +27,13 @@ class AlarmOrderController extends Controller ...@@ -27,11 +27,13 @@ class AlarmOrderController extends Controller
alarm_order.*, alarm_order.*,
r.devicenumber, r.concentration, r.location, r.policestatus, r.shutoff_status, r.devicenumber, r.concentration, r.location, r.policestatus, r.shutoff_status,
d.devicecoord, d.username, d.devicecoord, d.username,
u.name, u.phone_number u.name, u.phone_number,
s.status_name
') ')
->leftjoin('reportpolice AS r', 'r.id', '=', 'alarm_order.reportpolice_id') ->leftjoin('reportpolice AS r', 'r.id', '=', 'alarm_order.reportpolice_id')
->leftjoin('device AS d', 'd.id', '=', 'alarm_order.device_id') ->leftjoin('device AS d', 'd.id', '=', 'alarm_order.device_id')
->leftjoin('users AS u', 'alarm_order.user_id', '=', 'u.id') ->leftjoin('users AS u', 'alarm_order.user_id', '=', 'u.id')
->leftjoin('status AS s', 's.id', '=', 'alarm_order.reportpolice_id')
->offset($offset) ->offset($offset)
->limit($limit) ->limit($limit)
->get()->toArray(); ->get()->toArray();
...@@ -62,6 +64,8 @@ class AlarmOrderController extends Controller ...@@ -62,6 +64,8 @@ class AlarmOrderController extends Controller
$order = new AlarmOrder(); $order = new AlarmOrder();
$insertId = $order->insertGetId([ $insertId = $order->insertGetId([
'order_num' => $orderNum, 'order_num' => $orderNum,
'device_id' => $request->input('device_id'),
'user_id' => $request->input('user_id'),
'reportpolice_id' => $reportpolice_id, 'reportpolice_id' => $reportpolice_id,
'created_at' => Carbon::now(), 'created_at' => Carbon::now(),
]); ]);
......
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