Browse Source

订单判断

lizhen_gitee 9 months ago
parent
commit
bcdffbda09
1 changed files with 10 additions and 2 deletions
  1. 10 2
      application/api/controller/doctor/Wenzhen.php

+ 10 - 2
application/api/controller/doctor/Wenzhen.php

@@ -332,10 +332,12 @@ class Wenzhen extends Apic
             $this->error('订单未接诊');
         }
 
-        if($wenzhen_order['book_time'] > time()){
+        if(time() + 3600 < $wenzhen_order['book_time']){
             $this->error('未到预约时间');
         }
 
+        //判断患者在线状态
+
         $this->success('操作成功');
     }
 
@@ -367,10 +369,12 @@ class Wenzhen extends Apic
             $this->error('订单未接诊');
         }
 
-        if($wenzhen_order['book_time'] > time()){
+        if(time() + 3600 < $wenzhen_order['book_time']){
             $this->error('未到预约时间');
         }
 
+        //判断患者在线状态
+
         //修改订单
         $nowtime = time();
         $update = [
@@ -477,6 +481,10 @@ class Wenzhen extends Apic
             //$this->error('已完成订单才能反馈');
         }
 
+        if(in_array($wenzhen_order['status'],[0,3,10,13,16,18,22])){
+            $this->error('该订单不能反馈结果');
+        }
+
         //修改订单
         $nowtime = time();
         $update = [