处理bug,修改短信发送判断性别

main
yanzai 1 year ago
parent bc49d74fcf
commit 86cd09cc93

@ -50,14 +50,17 @@ class AspNetZhuanController extends Controller
} }
//发送短信 //发送短信
public static function SendMsg($r_yyid,$tel,$name,$time){ public static function SendMsg($r_yyid,$tel,$name,$time,$sex){
if($r_yyid==1){ if($r_yyid==1){
$yyid=6; $yyid=6;
} }
if($r_yyid==4){ if($r_yyid==4){
$yyid=2; $yyid=2;
} }
$content="时间:".$time.";科室:健康管理中心1区。温馨提醒:您的预约已成功,请在预约时间前 30 分钟达到科室凭身份证原件开单。建议您体检前3天清淡饮食、禁烟酒"; $keshi="健康管理中心1区";
if($sex==1) $keshi="健康管理中心1区";
if($sex==2) $keshi="健康管理中心2区";
$content="时间:".$time.";科室:".$keshi."。温馨提醒:您的预约已成功,请在预约时间前 30 分钟达到科室凭身份证原件开单。建议您体检前3天清淡饮食、禁烟酒";
$url=self::$BaseUrl."/tuisong.aspx?yyid=".$yyid."&type=8&mobile=".$tel."&msg1=".urlencode($name)."&msg2=".urlencode($content); $url=self::$BaseUrl."/tuisong.aspx?yyid=".$yyid."&type=8&mobile=".$tel."&msg1=".urlencode($name)."&msg2=".urlencode($content);
self::get($url,"短信发送"); self::get($url,"短信发送");

@ -900,9 +900,9 @@ class OrderController extends Controller
'appointment_back_info' => json_encode($appointment_info['data'][0], JSON_UNESCAPED_UNICODE) 'appointment_back_info' => json_encode($appointment_info['data'][0], JSON_UNESCAPED_UNICODE)
]); ]);
$is_sendMsg = DB::table('configs')->where(['label' => '预约完成短信通知'])->first(); $is_sendMsg = DB::table('configs')->where(['label' => '预约完成短信通知'])->first();
if (!!$is_sendMsg and $is_sendMsg->value == 1) { if (!!$is_sendMsg and $is_sendMsg->value == 1 and strlen($cha->phone)>0) {
$asp = new AspNetZhuanController(); $asp = new AspNetZhuanController();
$asp::SendMsg($cha->hospital_id, $cha->phone, $cha->name, $cha->appointment_date . ' ' . substr($cha->appointment_time, 0, 5)); $asp::SendMsg($cha->hospital_id, $cha->phone, $cha->name, $cha->appointment_date . ' ' . substr($cha->appointment_time, 0, 5),$cha->sex);
} }
return ['status' => true, 'msg' => "完成"]; return ['status' => true, 'msg' => "完成"];
} }

@ -237,7 +237,7 @@ class UserController extends Controller
$info = [ $info = [
'name' => isset($default_person->name) ? $default_person->name : null, 'name' => isset($default_person->name) ? $default_person->name : null,
'sex' => isset($default_person->sex) ? $default_person->sex : null, 'sex' => isset($default_person->sex) ? $default_person->sex : null,
'phone' => $default_person->phone, 'phone' => isset($default_person->phone) ? $default_person->phone:null,
'id_number' => $default_person->id_number, 'id_number' => $default_person->id_number,
'count' => $count, 'count' => $count,
'openid' => $openid, 'openid' => $openid,

Loading…
Cancel
Save