| xqd
@@ -89,7 +89,7 @@ class OrderController extends AuthController
|
|
|
$order_sn = build_sn($order['id']);
|
|
|
Order::where('id', $order['id'])->update(['order_sn' => $order_sn]);
|
|
|
//保存订单患者信息
|
|
|
- $addPatient = Patient::select(['name', 'sex', 'avatar', 'birthday', 'relationship_type', 'info', 'card_type', 'card_number'])->where('id', $req['patient_id'])->first()->toArray();
|
|
|
+ $addPatient = Patient::select(['name', 'sex', 'avatar', 'birthday', 'relationship_type', 'info', 'card_type', 'card_number'])->where('id', $req['patient_id'])->first()->getOriginal();
|
|
|
$addPatient['order_id'] = $order['id'];
|
|
|
$addPatient['patient_id'] = $req['patient_id'];
|
|
|
if ($req['product_type'] == 1) {
|
| xqd
@@ -100,7 +100,6 @@ class OrderController extends AuthController
|
|
|
$addPatient['symptoms'] = $req['symptoms'];
|
|
|
$addPatient['medical_imgs'] = $req['medical_imgs'];
|
|
|
}
|
|
|
- unset($addPatient['age']);
|
|
|
OrderPatient::create($addPatient);
|
|
|
|
|
|
//判断是微信支付
|
| xqd
@@ -229,7 +228,7 @@ class OrderController extends AuthController
|
|
|
$order_sn = build_sn($order['id']);
|
|
|
Order::where('id', $order['id'])->update(['order_sn' => $order_sn]);
|
|
|
//保存订单患者信息
|
|
|
- $addPatient = Patient::select(['name', 'sex', 'avatar', 'birthday', 'relationship_type', 'info', 'card_type', 'card_number'])->where('id', $req['patient_id'])->first()->toArray();
|
|
|
+ $addPatient = Patient::select(['name', 'sex', 'avatar', 'birthday', 'relationship_type', 'info', 'card_type', 'card_number'])->where('id', $req['patient_id'])->first()->getOriginal();
|
|
|
$addPatient['order_id'] = $order['id'];
|
|
|
$addPatient['patient_id'] = $req['patient_id'];
|
|
|
$addPatient['organization_id'] = $req['organization_id'];
|
| xqd
@@ -237,11 +236,10 @@ class OrderController extends AuthController
|
|
|
$timePeriod = TimePeriod::where('id', $req['time_period_id'])->first();
|
|
|
$addPatient['appoint_start_time'] = strtotime($req['schedule_date'].' '.$timePeriod['start_time_period'].':00');
|
|
|
$addPatient['appoint_end_time'] = strtotime($req['schedule_date'].' '.$timePeriod['end_time_period'].':00');
|
|
|
- unset($addPatient['age']);
|
|
|
$orderPatient = OrderPatient::create($addPatient);
|
|
|
//保存订单疫苗信息
|
|
|
if ($req['product_type'] == 4) {
|
|
|
- $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 = 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()->getOriginal();
|
|
|
$addVaccine['order_id'] = $order['id'];
|
|
|
$addVaccine['order_patient_id'] = $orderPatient['id'];
|
|
|
OrderVaccine::create($addVaccine);
|
| xqd
@@ -250,7 +248,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 as nurse_id', 'price as nurse_price', 'name as nurse_name', 'remark as 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()->getOriginal();
|
|
|
$addNurse['order_id'] = $order['id'];
|
|
|
$addNurse['order_patient_id'] = $orderPatient['id'];
|
|
|
OrderNurse::create($addNurse);
|
| xqd
@@ -367,13 +365,12 @@ class OrderController extends AuthController
|
|
|
$order_sn = build_sn($order['id']);
|
|
|
Order::where('id', $order['id'])->update(['order_sn' => $order_sn]);
|
|
|
//保存订单患者信息
|
|
|
- $addPatient = Patient::select(['name', 'sex', 'avatar', 'birthday', 'relationship_type', 'info', 'card_type', 'card_number'])->where('id', $req['patient_id'])->first()->toArray();
|
|
|
+ $addPatient = Patient::select(['name', 'sex', 'avatar', 'birthday', 'relationship_type', 'info', 'card_type', 'card_number'])->where('id', $req['patient_id'])->first()->getOriginal();
|
|
|
$addPatient['order_id'] = $order['id'];
|
|
|
$addPatient['patient_id'] = $req['patient_id'];
|
|
|
- unset($addPatient['age']);
|
|
|
OrderPatient::create($addPatient);
|
|
|
//保存订单服务包表
|
|
|
- $addPack = ServicePack::select(['id as service_pack_id', 'name as pack_name', 'intro as pack_intro', 'price as pack_price', 'insurance_policy', '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', 'insurance_policy', 'team_id', 'phone_minutes', 'chat_num', 'appoint_num', 'vaccine_limit_amount', 'nurses_limit_amount', 'effective_days'])->where('id', $req['service_pack_id'])->first()->getOriginal();
|
|
|
$addPack['order_id'] = $order['id'];
|
|
|
$addPack['is_security'] = $req['is_security'];
|
|
|
$addPack['guardian_name'] = $req['guardian_name'];
|