|
|
|
@ -335,7 +335,7 @@ class OrderController extends Controller
|
|
|
|
$true_price = $true_price - ($jifen + $yucunkuan);
|
|
|
|
$true_price = $true_price - ($jifen + $yucunkuan);
|
|
|
|
if ($true_price < -1) return \Yz::echoError1("预抵扣金额超过订单金额,操作失败");
|
|
|
|
if ($true_price < -1) return \Yz::echoError1("预抵扣金额超过订单金额,操作失败");
|
|
|
|
if ($true_price < 0) $true_price = 0;
|
|
|
|
if ($true_price < 0) $true_price = 0;
|
|
|
|
//如果有二线号源,根据体检时间查询二线可用号源,区分上下午
|
|
|
|
//如果有二线号源,根据体检时间查询二线可用号源,区分上下午,二线需预约体检时间1小时后
|
|
|
|
$plan_nmr_info=[];
|
|
|
|
$plan_nmr_info=[];
|
|
|
|
if (isset($erxian_info) and !empty($erxian_info)) {
|
|
|
|
if (isset($erxian_info) and !empty($erxian_info)) {
|
|
|
|
foreach ($erxian_info as $erxian_item) {
|
|
|
|
foreach ($erxian_info as $erxian_item) {
|
|
|
|
@ -344,8 +344,11 @@ class OrderController extends Controller
|
|
|
|
if($plan->time>"12:00") $end_time="23:59";
|
|
|
|
if($plan->time>"12:00") $end_time="23:59";
|
|
|
|
if(!isset($nmrPlans[$plan->date]) or empty($nmrPlans[$plan->date])) return \Yz::echoError1("二线号源不可用,请重新选则日期");
|
|
|
|
if(!isset($nmrPlans[$plan->date]) or empty($nmrPlans[$plan->date])) return \Yz::echoError1("二线号源不可用,请重新选则日期");
|
|
|
|
$temp_date=[];
|
|
|
|
$temp_date=[];
|
|
|
|
|
|
|
|
$planTime = new DateTime($plan->time);
|
|
|
|
|
|
|
|
$planTime->modify('+1 hour');
|
|
|
|
|
|
|
|
$plan_time=$planTime->format('H:i');
|
|
|
|
foreach ($nmrPlans[$plan->date] as $nmp_p){
|
|
|
|
foreach ($nmrPlans[$plan->date] as $nmp_p){
|
|
|
|
if($nmp_p['Time']>=substr($plan->time,0,5) and $nmp_p['Time']<=$end_time and $nmp_p['keyong']==="0"){
|
|
|
|
if($nmp_p['Time']>=$plan_time and $nmp_p['Time']<=$end_time and $nmp_p['keyong']==="0"){
|
|
|
|
$temp_date=[
|
|
|
|
$temp_date=[
|
|
|
|
"item_id"=>$erxian_item['item_id'],
|
|
|
|
"item_id"=>$erxian_item['item_id'],
|
|
|
|
"name"=>$erxian_item['name'],
|
|
|
|
"name"=>$erxian_item['name'],
|
|
|
|
@ -585,7 +588,7 @@ class OrderController extends Controller
|
|
|
|
$up_doctor=DB::table('orders')->where('id', $orderid)->update(['doctor' => $doctor]);
|
|
|
|
$up_doctor=DB::table('orders')->where('id', $orderid)->update(['doctor' => $doctor]);
|
|
|
|
return \Yz::Return(true,"操作完成",[]);
|
|
|
|
return \Yz::Return(true,"操作完成",[]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//如果有二线号源,根据体检时间查询二线可用号源,区分上下午
|
|
|
|
//如果有二线号源,根据体检时间查询二线可用号源,区分上下午,二线需预约体检时间1小时后
|
|
|
|
$db_nmr_info=json_decode($orderInfo->erxian_appointment_info,true);
|
|
|
|
$db_nmr_info=json_decode($orderInfo->erxian_appointment_info,true);
|
|
|
|
$nmr_info=[];
|
|
|
|
$nmr_info=[];
|
|
|
|
if (isset($db_nmr_info) and !empty($db_nmr_info)) {
|
|
|
|
if (isset($db_nmr_info) and !empty($db_nmr_info)) {
|
|
|
|
@ -595,8 +598,11 @@ class OrderController extends Controller
|
|
|
|
if($planInfo->time>"12:00") $end_time="23:59";
|
|
|
|
if($planInfo->time>"12:00") $end_time="23:59";
|
|
|
|
if(!isset($nmrPlans[$planInfo->date]) or empty($nmrPlans[$planInfo->date])) return \Yz::echoError1("二线号源不可用,请重新选则日期");
|
|
|
|
if(!isset($nmrPlans[$planInfo->date]) or empty($nmrPlans[$planInfo->date])) return \Yz::echoError1("二线号源不可用,请重新选则日期");
|
|
|
|
$temp_date=[];
|
|
|
|
$temp_date=[];
|
|
|
|
|
|
|
|
$planTime = new DateTime($planInfo->time);
|
|
|
|
|
|
|
|
$planTime->modify('+1 hour');
|
|
|
|
|
|
|
|
$plan_time=$planTime->format('H:i');
|
|
|
|
foreach ($nmrPlans[$planInfo->date] as $nmp_p){
|
|
|
|
foreach ($nmrPlans[$planInfo->date] as $nmp_p){
|
|
|
|
if($nmp_p['Time']>=substr($planInfo->time,0,5) and $nmp_p['Time']<=$end_time and $nmp_p['keyong']==="0"){
|
|
|
|
if($nmp_p['Time']>=$plan_time and $nmp_p['Time']<=$end_time and $nmp_p['keyong']==="0"){
|
|
|
|
$temp_date=[
|
|
|
|
$temp_date=[
|
|
|
|
"item_id"=>$erxian_item['item_id'],
|
|
|
|
"item_id"=>$erxian_item['item_id'],
|
|
|
|
"name"=>$erxian_item['name'],
|
|
|
|
"name"=>$erxian_item['name'],
|
|
|
|
|