|
@@ -168,10 +168,10 @@ class Wenzhen extends Apic
|
|
|
|
|
|
$wenzhen_order['doctor_info'] = $doctor_info;*/
|
|
|
|
|
|
- //视频订单是否能拨打
|
|
|
+ //视频订单是否能拨打,排班模式才可以
|
|
|
$wenzhen_order['video_call_switch'] = 0;
|
|
|
- if($wenzhen_order['ordertype'] == 2 && $wenzhen_order['status'] == 20){ //25也可以,25倍被强制改成20了
|
|
|
- if(time() + 3600 >= $wenzhen_order['book_time']){
|
|
|
+ if($wenzhen_order['video_model'] == 1 && $wenzhen_order['ordertype'] == 2 && $wenzhen_order['status'] == 20){ //25也可以,25倍被强制改成20了
|
|
|
+ if(time() + 3600 >= $wenzhen_order['book_time']){ //距离预约时间1小时内就可以拨打
|
|
|
$wenzhen_order['video_call_switch'] = 1;
|
|
|
}
|
|
|
}
|
|
@@ -219,7 +219,7 @@ class Wenzhen extends Apic
|
|
|
|
|
|
//用户加钱
|
|
|
$logtype = $wenzhen_order['ordertype'] == 1 ? 13 : 14;
|
|
|
- $rs_wallet = model('wallet')->lockChangeAccountRemain($wenzhen_order['user_id'],'money',$wenzhen_order['total_fee'],$logtype,$remark='医生问诊退珍','wenzhen_order',$order_id);
|
|
|
+ $rs_wallet = model('wallet')->lockChangeAccountRemain($wenzhen_order['user_id'],'money',$wenzhen_order['total_fee'],$logtype,$remark='医生主动退珍','wenzhen_order',$order_id);
|
|
|
if($rs_wallet['status'] === false){
|
|
|
Db::rollback();
|
|
|
$this->error($rs_wallet['msg']);
|
|
@@ -263,6 +263,10 @@ class Wenzhen extends Apic
|
|
|
$this->error('不存在的订单');
|
|
|
}
|
|
|
|
|
|
+ if($wenzhen_order['video_model'] == 2){
|
|
|
+ $this->error('即时视频问诊不需要主动接诊');
|
|
|
+ }
|
|
|
+
|
|
|
if($wenzhen_order['status'] != 10){
|
|
|
$this->error('待接诊订单才能接诊');
|
|
|
}
|
|
@@ -325,7 +329,10 @@ class Wenzhen extends Apic
|
|
|
}
|
|
|
|
|
|
if($wenzhen_order['ordertype'] != 2){
|
|
|
- $this->error('视频订单才能拨打视频');
|
|
|
+ $this->error('视频问诊才能拨打视频');
|
|
|
+ }
|
|
|
+ if($wenzhen_order['video_model'] == 2){
|
|
|
+ $this->error('预约视频问诊才能主动拨打视频');
|
|
|
}
|
|
|
|
|
|
if($wenzhen_order['status'] == 30){
|
|
@@ -376,6 +383,9 @@ class Wenzhen extends Apic
|
|
|
if($wenzhen_order['ordertype'] != 2){
|
|
|
$this->error('视频订单才能拨打视频');
|
|
|
}
|
|
|
+ if($wenzhen_order['video_model'] == 2){
|
|
|
+ $this->error('预约视频问诊才能主动拨打视频');
|
|
|
+ }
|
|
|
|
|
|
if($wenzhen_order['status'] == 30){
|
|
|
$this->error('订单已结束');
|