|
@@ -1,14 +1,8 @@
|
|
<?php
|
|
<?php
|
|
namespace app\inter\controller;
|
|
namespace app\inter\controller;
|
|
|
|
|
|
-use think\Controller;
|
|
|
|
use think\Db;
|
|
use think\Db;
|
|
-use think\Session;
|
|
|
|
-use app\common\library\UUIDs;
|
|
|
|
-use think\Cache;
|
|
|
|
use think\Log;
|
|
use think\Log;
|
|
-use app\common\library\Verify;
|
|
|
|
-use think\File;
|
|
|
|
use app\common\library\send_message;
|
|
use app\common\library\send_message;
|
|
use app\common\library\Message;
|
|
use app\common\library\Message;
|
|
use app\inter\service\WechatService;
|
|
use app\inter\service\WechatService;
|
|
@@ -79,32 +73,32 @@ class Wechat extends Base {
|
|
DB::table("remote_order")->where("id", $out_trade_no)->update($order);
|
|
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();
|
|
$application = DB::table('remote_application')->where('id', $order['application_id'])->field('exam_id')->find();
|
|
$exam_id = $application['exam_id'];
|
|
$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('---微信支付回调---结束---');
|
|
Log::record('---微信支付回调---结束---');
|
|
return $repsone;
|
|
return $repsone;
|