fuyu 5 gadi atpakaļ
vecāks
revīzija
929d6d1f6d
1 mainītis faili ar 26 papildinājumiem un 32 dzēšanām
  1. 26 32
      application/inter/controller/Wechat.php

+ 26 - 32
application/inter/controller/Wechat.php

@@ -1,14 +1,8 @@
 <?php
 namespace app\inter\controller;
 
-use think\Controller;
 use think\Db;
-use think\Session;
-use app\common\library\UUIDs;
-use think\Cache;
 use think\Log;
-use app\common\library\Verify;
-use think\File;
 use app\common\library\send_message;
 use app\common\library\Message;
 use app\inter\service\WechatService;
@@ -79,32 +73,32 @@ class Wechat extends Base {
                 DB::table("remote_order")->where("id", $out_trade_no)->update($order);
                 $application = DB::table('remote_application')->where('id', $order['application_id'])->field('exam_id')->find();
                 $exam_id = $application['exam_id'];
-                $r_info = DB::table('report')->where('exam_id',$exam_id)->where('remote_application_id', $aid)->find();
-                $t = '收到一条远程诊断申请';
-                $ins = DB::table('institution')->where('id',$order['hospital_id'])->field('name')->find();
-                $doctor = DB::table('doctors')->where('id',$order['doctor_id'])->field('realname')->find();
-                $c = $ins['name'].$doctor['realname'].'医师向您发起一条远程诊断申请';
-                $type = '1';
-                $url = Message::url(null, $exam_id,1,$order['exam_class'],$r_info['id'],$aid);
-                Log::record('-----系统内消息通知-----');
-                Message::insert($t,$c,$d,$type,$url,1,$aid);
-                    //保存  申请
-                if(empty($d)) {
-                    Log::record('---微信支付回调---结束---没有远程医生');
-                    return $repsone;
-                }
-                $dinfo = DB::table('doctors')->where('id',$d)->find();
-                $d_phone = $dinfo['phone'];
-                $d_name = $dinfo['realname'];
-                if($order['is_urgent'] === 1) {
-                    $d_time = date('H:i',strtotime('+30 min'));
-                } else {
-                    $d_time = date('H:i',strtotime('+1 hour'));
-                }
-                if($dinfo['institution_id'] == '22100003' || $dinfo['send_sms'] == 1){ //魏庙
-                    Log::record('-----短信通知-----');
-                    send_message::sendSms2Apply($d_phone,$d_time,$d_name);
-                }
+                // $r_info = DB::table('report')->where('exam_id',$exam_id)->where('remote_application_id', $aid)->find();
+                // $t = '收到一条远程诊断申请';
+                // $ins = DB::table('institution')->where('id',$order['hospital_id'])->field('name')->find();
+                // $doctor = DB::table('doctors')->where('id',$order['doctor_id'])->field('realname')->find();
+                // $c = $ins['name'].$doctor['realname'].'医师向您发起一条远程诊断申请';
+                // $type = '1';
+                // $url = Message::url(null, $exam_id,1,$order['exam_class'],$r_info['id'],$aid);
+                // Log::record('-----系统内消息通知-----');
+                // Message::insert($t,$c,$d,$type,$url,1,$aid);
+                //     //保存  申请
+                // if(empty($d)) {
+                //     Log::record('---微信支付回调---结束---没有远程医生');
+                //     return $repsone;
+                // }
+                // $dinfo = DB::table('doctors')->where('id',$d)->find();
+                // $d_phone = $dinfo['phone'];
+                // $d_name = $dinfo['realname'];
+                // if($order['is_urgent'] === 1) {
+                //     $d_time = date('H:i',strtotime('+30 min'));
+                // } else {
+                //     $d_time = date('H:i',strtotime('+1 hour'));
+                // }
+                // if($dinfo['institution_id'] == '22100003' || $dinfo['send_sms'] == 1){ //魏庙
+                //     Log::record('-----短信通知-----');
+                //     send_message::sendSms2Apply($d_phone,$d_time,$d_name);
+                // }
             }
             Log::record('---微信支付回调---结束---');
             return $repsone;