Commit 9d295b8e authored by Administrator's avatar Administrator

Merge tag 'alarm_order_store' into develop

no message
parents 8c1fa94a b3f364f2
......@@ -27,11 +27,13 @@ class AlarmOrderController extends Controller
alarm_order.*,
r.devicenumber, r.concentration, r.location, r.policestatus, r.shutoff_status,
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('device AS d', 'd.id', '=', 'alarm_order.device_id')
->leftjoin('users AS u', 'alarm_order.user_id', '=', 'u.id')
->leftjoin('status AS s', 's.id', '=', 'alarm_order.reportpolice_id')
->offset($offset)
->limit($limit)
->get()->toArray();
......@@ -62,6 +64,8 @@ class AlarmOrderController extends Controller
$order = new AlarmOrder();
$insertId = $order->insertGetId([
'order_num' => $orderNum,
'device_id' => $request->input('device_id'),
'user_id' => $request->input('user_id'),
'reportpolice_id' => $reportpolice_id,
'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