| xqd
@@ -231,7 +231,7 @@ class OrderController extends AuthController
|
|
|
$orderPatient = OrderPatient::create($addPatient);
|
|
|
//保存订单疫苗信息
|
|
|
if ($req['product_type'] == 4) {
|
|
|
- $addVaccine = Vaccine::select(['id vaccine_id', 'type vaccine_type', 'price vaccine_price', 'name vaccine_name', 'remark vaccine_remark', 'supplier vaccine_supplier'])->where('id', $req['vaccine_id'])->first()->toArray();
|
|
|
+ $addVaccine = Vaccine::select(['id as vaccine_id', 'type as vaccine_type', 'price as vaccine_price', 'name as vaccine_name', 'remark as vaccine_remark', 'supplier as vaccine_supplier'])->where('id', $req['vaccine_id'])->first()->toArray();
|
|
|
$addVaccine['order_id'] = $order['id'];
|
|
|
$addVaccine['order_patient_id'] = $orderPatient['id'];
|
|
|
OrderVaccine::create($addVaccine);
|
| xqd
@@ -240,7 +240,7 @@ class OrderController extends AuthController
|
|
|
if ($req['product_type'] == 5) {
|
|
|
$nurse_ids = json_decode($req['nurse_ids'], true);
|
|
|
foreach ($nurse_ids as $k => $v) {
|
|
|
- $addNurse = Nurse::select(['id nurse_id', 'price nurse_price', 'name nurse_name', 'remark nurse_remark'])->where('id', $v)->first()->toArray();
|
|
|
+ $addNurse = Nurse::select(['id as nurse_id', 'price as nurse_price', 'name as nurse_name', 'remark as nurse_remark'])->where('id', $v)->first()->toArray();
|
|
|
$addNurse['order_id'] = $order['id'];
|
|
|
$addNurse['order_patient_id'] = $orderPatient['id'];
|
|
|
OrderNurse::create($addNurse);
|
| xqd
@@ -358,7 +358,7 @@ class OrderController extends AuthController
|
|
|
unset($addPatient['age']);
|
|
|
OrderPatient::create($addPatient);
|
|
|
//保存订单服务包表
|
|
|
- $addPack = ServicePack::select(['id service_pack_id', 'name pack_name', 'intro pack_intro', 'price pack_price', 'team_id', 'phone_minutes', 'chat_num', 'appoint_num', 'vaccine_limit_amount', 'nurses_limit_amount', 'effective_days'])->where('id', $req['service_pack_id'])->first()->toArray();
|
|
|
+ $addPack = ServicePack::select(['id as service_pack_id', 'name as pack_name', 'intro as pack_intro', 'price as pack_price', 'team_id', 'phone_minutes', 'chat_num', 'appoint_num', 'vaccine_limit_amount', 'nurses_limit_amount', 'effective_days'])->where('id', $req['service_pack_id'])->first()->toArray();
|
|
|
$addPack['order_id'] = $order['id'];
|
|
|
$addPack['is_security'] = $req['is_security'];
|
|
|
$addPack['guardian_name'] = $req['guardian_name'];
|