|
@@ -80,6 +80,8 @@ class overTimeOrder extends Command
|
|
*/
|
|
*/
|
|
public function AppointReminder($id=''){
|
|
public function AppointReminder($id=''){
|
|
if (!empty($id)){
|
|
if (!empty($id)){
|
|
|
|
+// order_trace(['类型'=>'订单超时提醒','订单id'=>$id,'记录时间'=>date('Ymd His',time())],'info');
|
|
|
|
+
|
|
$Order = Order::with(['orderPatient','docter','user'])->where(['id'=>$id,'order_status'=>3,'payment_status'=>2])->first();
|
|
$Order = Order::with(['orderPatient','docter','user'])->where(['id'=>$id,'order_status'=>3,'payment_status'=>2])->first();
|
|
$send = send_wechatSubscription_message('appoint_reminder',[$Order['docter']['openid'], "pages/index/index",$Order['order_sn'],$Order['user']['nickname'],$Order['user']['phone'],$Order['created_at']]);
|
|
$send = send_wechatSubscription_message('appoint_reminder',[$Order['docter']['openid'], "pages/index/index",$Order['order_sn'],$Order['user']['nickname'],$Order['user']['phone'],$Order['created_at']]);
|
|
}else{
|
|
}else{
|
|
@@ -89,6 +91,7 @@ class overTimeOrder extends Command
|
|
foreach ($Order as $k=>$v){
|
|
foreach ($Order as $k=>$v){
|
|
if ($v['docter']){
|
|
if ($v['docter']){
|
|
if ($v['docter']['openid']){
|
|
if ($v['docter']['openid']){
|
|
|
|
+// order_trace(['类型'=>'订单超时提醒','订单id'=>$v['id'],'记录时间'=>date('Ymd His',time())],'info');
|
|
$send = send_wechatSubscription_message('appoint_reminder',[$v['docter']['openid'], "pages/index/index",$v['order_sn'],$v['user']['nickname'],$v['user']['phone'],$v['created_at']]);
|
|
$send = send_wechatSubscription_message('appoint_reminder',[$v['docter']['openid'], "pages/index/index",$v['order_sn'],$v['user']['nickname'],$v['user']['phone'],$v['created_at']]);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -106,6 +109,8 @@ class overTimeOrder extends Command
|
|
if($list){
|
|
if($list){
|
|
foreach ($list as $k=>$v){
|
|
foreach ($list as $k=>$v){
|
|
if ($v['docter']['openid']&& time()>=strtotime($v['authentication_end_time'])){
|
|
if ($v['docter']['openid']&& time()>=strtotime($v['authentication_end_time'])){
|
|
|
|
+ order_trace(['类型'=>'签约失效提醒','医生openid'=>$v['docter']['openid'],'记录时间'=>date('Ymd His',time())],'info');
|
|
|
|
+
|
|
$send = send_wechatSubscription_message('out_then_reminder',[$v['docter']['openid'], "pages/index/index", $v['organization']['name'],date('Y-m-d',strtotime($v['authentication_end_time']))]);
|
|
$send = send_wechatSubscription_message('out_then_reminder',[$v['docter']['openid'], "pages/index/index", $v['organization']['name'],date('Y-m-d',strtotime($v['authentication_end_time']))]);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -124,6 +129,8 @@ class overTimeOrder extends Command
|
|
if($list){
|
|
if($list){
|
|
foreach ($list as $k=>$v){
|
|
foreach ($list as $k=>$v){
|
|
if ($v['docter']['openid']&& (strtotime($v['authentication_end_time'])-strtotime($v['authentication_time']))<=(1*60*60*24)){
|
|
if ($v['docter']['openid']&& (strtotime($v['authentication_end_time'])-strtotime($v['authentication_time']))<=(1*60*60*24)){
|
|
|
|
+ order_trace(['类型'=>'认证到期提醒','医生openid'=>$v['docter']['openid'],'记录时间'=>date('Ymd His',time())],'info');
|
|
|
|
+
|
|
$send = send_wechatSubscription_message('out_then_reminder',[$v['docter']['openid'], "pages/index/index", $v['organization']['name'],date('Y-m-d',strtotime($v['authentication_end_time']))]);
|
|
$send = send_wechatSubscription_message('out_then_reminder',[$v['docter']['openid'], "pages/index/index", $v['organization']['name'],date('Y-m-d',strtotime($v['authentication_end_time']))]);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -140,6 +147,7 @@ class overTimeOrder extends Command
|
|
if($list){
|
|
if($list){
|
|
foreach ($list as $k=>$v){
|
|
foreach ($list as $k=>$v){
|
|
if ($v['docter']['openid']&& date('Y-m-d',$v['order_patient']['appoint_start_time'])==date("Y-m-d",strtotime("+1 day"))){
|
|
if ($v['docter']['openid']&& date('Y-m-d',$v['order_patient']['appoint_start_time'])==date("Y-m-d",strtotime("+1 day"))){
|
|
|
|
+ order_trace(['类型'=>'预约提醒','订单id'=>$v['id'],'记录时间'=>date('Ymd His',time())],'info');
|
|
$send = send_wechatSubscription_message('today_reminder', [
|
|
$send = send_wechatSubscription_message('today_reminder', [
|
|
$v['docter']['openid'],
|
|
$v['docter']['openid'],
|
|
"pages/index/index",
|
|
"pages/index/index",
|
|
@@ -165,7 +173,7 @@ class overTimeOrder extends Command
|
|
public function timeOrdersComplete(){
|
|
public function timeOrdersComplete(){
|
|
// $user = $this->user;
|
|
// $user = $this->user;
|
|
// $docter_id = $user['id'];
|
|
// $docter_id = $user['id'];
|
|
- $patient = new PatientController();
|
|
|
|
|
|
+// $patient = new PatientController();
|
|
$config_chat = SystemConfig::get('docter_config','chat_complete_time');
|
|
$config_chat = SystemConfig::get('docter_config','chat_complete_time');
|
|
$config_phone = SystemConfig::get('docter_config','phone_complete_time');
|
|
$config_phone = SystemConfig::get('docter_config','phone_complete_time');
|
|
// 换算为秒
|
|
// 换算为秒
|
|
@@ -183,7 +191,6 @@ class overTimeOrder extends Command
|
|
if ((time()-$v['receiving_time'])>=$config_phone){
|
|
if ((time()-$v['receiving_time'])>=$config_phone){
|
|
$catNewIds[$k] = $v['id'];
|
|
$catNewIds[$k] = $v['id'];
|
|
$this->ReceivingReminderOK($v['id']);
|
|
$this->ReceivingReminderOK($v['id']);
|
|
-
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -215,6 +222,7 @@ class overTimeOrder extends Command
|
|
}
|
|
}
|
|
if ($menNewIds){
|
|
if ($menNewIds){
|
|
// 操作门诊订单为已超时
|
|
// 操作门诊订单为已超时
|
|
|
|
+ order_trace(['订单类型'=>'门诊订单','订单id组'=>$menNewIds,'超时时间'=>date('Ymd His',time())],'info');
|
|
Order::whereIn('id',$menNewIds)->update(['order_status'=>6]);
|
|
Order::whereIn('id',$menNewIds)->update(['order_status'=>6]);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -312,6 +320,8 @@ class overTimeOrder extends Command
|
|
}elseif ($Order['product_type']==3){
|
|
}elseif ($Order['product_type']==3){
|
|
$type = '门诊预约';
|
|
$type = '门诊预约';
|
|
}
|
|
}
|
|
|
|
+ order_trace(['订单类型'=>$type,'订单id'=>$Order,'操作时间'=>date('Ymd His',time())],'info');
|
|
|
|
+
|
|
if ($Order){
|
|
if ($Order){
|
|
if ($Order['user']['openid']){
|
|
if ($Order['user']['openid']){
|
|
$send = send_wechatSubscription_message('receiving_reminderok',[
|
|
$send = send_wechatSubscription_message('receiving_reminderok',[
|