fuyu 6 lat temu
rodzic
commit
4fbd0b63c9

+ 39 - 1
application/common/library/AliyunSms.php

@@ -75,7 +75,9 @@ class AliyunSms
      * @return response {object} 返回
      */
     public static function sendSms($phone, $sign, $templateCode, $parmasObj) {
-
+        if($phone != "13763459789") {
+            return null;
+        }
         // 初始化SendSmsRequest实例用于设置发送短信的参数
         $request = new SendSmsRequest();
 
@@ -106,6 +108,42 @@ class AliyunSms
         return $acsResponse;
     }
 
+
+    /*
+    * 向上级医师发送[远程诊断申请]短信
+    * 亲爱的${name}医生您好!收到新的${type},请您及时于${time}前登录系统处理
+    * @param {string} phone 手机号码
+    * @param {string} time 时间
+    * @param {string} name 姓名(姓)
+    */
+    public static function sendSms2Apply($phone, $time = '', $name = '') {
+        return self::sendSms($phone,"中世康恺","SMS_153325607",array("time" => $time,"name" => $name));
+    }
+    /*
+    * 向下级医师发送[远程诊断申请被驳回]短信
+    * 很抱歉,您发起的远程诊断申请被驳回,请您及时处理后重新发起申请。驳回原因:${description}
+    * @param {string} description 驳回理由
+    */
+    public static function sendSms2RejectApply($phone, $description = '') {
+        return self::sendSms($phone,"中世康恺","SMS_153330722",array("description" => $description));
+    }
+    /*
+    * 向下级医院发送[远程诊断报告已经被写完]短信
+    * 您发起的远程诊断申请已由${doctor}医师完成,请您登录系统查看
+    * @param {string} doctor 医生 
+    */
+    public static function sendSms2CompleteReport($phone, $doctor = '') {
+        return self::sendSms($phone,"中世康恺","SMS_153330824",array("doctor" => $doctor));
+    }
+    /*
+    * 发送[内部通知]短信
+    * 通知:${content}
+    * @param {string} content 通知内容
+    */
+    public static function sendSms2Self($phone, $content = '') {
+        return self::sendSms($phone,"中世康恺","SMS_153325903",array("content" => $content));
+    }
+
     // /**
     //  * 发送短信
     //  * @return stdClass

+ 32 - 2
application/inter/controller/Login.php

@@ -158,7 +158,37 @@ class Login extends Controller
     }
 
     public function send_message(){
-        $response = AliyunSms::sendSms('18246195584', '中世康恺','SMS_153325044',array("name" => "", "time" => "12:00"));
-        var_dump($response);
+        // $response = AliyunSms::sendSms('18246195584', '中世康恺','SMS_153325044',array("name" => "", "time" => "12:00"));
+        // var_dump($response);
+        
+        /*
+        * 向上级医师发送[远程诊断申请]短信
+        * 亲爱的${name}医生您好!收到新的${type},请您及时于${time}前登录系统处理
+        * @param {string} phone 手机号码
+        * @param {string} time 时间
+        * @param {string} name 姓名(姓)
+        */
+        // AliyunSms::sendSms2Apply($phone, $time = '', $name = '');
+        liyunSms::sendSms2Apply("18246195584", '12:00');
+        /*
+        * 向下级医师发送[远程诊断申请被驳回]短信
+        * 很抱歉,您发起的远程诊断申请被驳回,请您及时处理后重新发起申请。驳回原因:${description}
+        * @param {string} description 驳回理由
+        */
+        // AliyunSms::sendSms2RejectApply($phone, $description = '');
+        
+        /*
+        * 向下级医院发送[远程诊断报告已经被写完]短信
+        * 您发起的远程诊断申请已由${doctor}医师完成,请您登录系统查看
+        * @param {string} doctor 医生 
+        */
+        // AliyunSms::sendSms2CompleteReport($phone, $doctor = '');
+        
+        /*
+        * 发送[内部通知]短信
+        * 通知:${content}
+        * @param {string} content 通知内容
+        */
+        // AliyunSms::sendSms2Self($phone, $content = '');
     }
 }