|
|
|
@ -117,6 +117,7 @@ class OrderController extends Controller
|
|
|
|
if (!$person) return \Yz::echoError1('体检人不存在');
|
|
|
|
if (!$person) return \Yz::echoError1('体检人不存在');
|
|
|
|
$title = "自选项目";
|
|
|
|
$title = "自选项目";
|
|
|
|
$price = 0;
|
|
|
|
$price = 0;
|
|
|
|
|
|
|
|
$true_price=0;//订单真实支付金额
|
|
|
|
$buy_info = [
|
|
|
|
$buy_info = [
|
|
|
|
'combo' => [
|
|
|
|
'combo' => [
|
|
|
|
'id' => 0,
|
|
|
|
'id' => 0,
|
|
|
|
@ -161,6 +162,7 @@ class OrderController extends Controller
|
|
|
|
$missingIds = array_diff($item_ids, $existingIds);
|
|
|
|
$missingIds = array_diff($item_ids, $existingIds);
|
|
|
|
if (count($missingIds) > 0) return \Yz::echoError1("部分自选项目不可用,Id:" . implode(', ', $missingIds));
|
|
|
|
if (count($missingIds) > 0) return \Yz::echoError1("部分自选项目不可用,Id:" . implode(', ', $missingIds));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$true_price=$price;
|
|
|
|
//如果是团检
|
|
|
|
//如果是团检
|
|
|
|
$group_info = false;
|
|
|
|
$group_info = false;
|
|
|
|
if ($type == 2) {
|
|
|
|
if ($type == 2) {
|
|
|
|
@ -181,6 +183,8 @@ class OrderController extends Controller
|
|
|
|
'group_id' => $group_info['group_id'],
|
|
|
|
'group_id' => $group_info['group_id'],
|
|
|
|
];
|
|
|
|
];
|
|
|
|
$title = "单位团检" . $group_info['combo_name'];
|
|
|
|
$title = "单位团检" . $group_info['combo_name'];
|
|
|
|
|
|
|
|
$price = $price + $group_info['sixi_zong_ji_jin_e'];
|
|
|
|
|
|
|
|
$true_price = ($price - $group_info['tongshou_xiane']) > 0 ? $price - $group_info['tongshou_xiane'] : 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//调用思信接口判断各个项目是否可用
|
|
|
|
//调用思信接口判断各个项目是否可用
|
|
|
|
@ -258,7 +262,7 @@ class OrderController extends Controller
|
|
|
|
'id_number' => $person->id_number,
|
|
|
|
'id_number' => $person->id_number,
|
|
|
|
'buy_info' => json_encode($buy_info, JSON_UNESCAPED_UNICODE),
|
|
|
|
'buy_info' => json_encode($buy_info, JSON_UNESCAPED_UNICODE),
|
|
|
|
'price' => $price,
|
|
|
|
'price' => $price,
|
|
|
|
'true_price' => $price,
|
|
|
|
'true_price' => $true_price,
|
|
|
|
'order_number' => $order_num,
|
|
|
|
'order_number' => $order_num,
|
|
|
|
'status' => 1,
|
|
|
|
'status' => 1,
|
|
|
|
'appointment_date' => $plan->date,
|
|
|
|
'appointment_date' => $plan->date,
|
|
|
|
|