Browse Source

短信通知增加类型

NoNZero 8 years atrás
parent
commit
5480083092

+ 2 - 2
protected/config/sms.conf.php

@@ -1,5 +1,5 @@
 <?php
 $config['SMS_URL'] = 'http://sms.haotingyun.com/v2/sms/single_send.json';
 $config['SMS_AUTHKEY'] = 'fb5ef483e44b9556512a9febef376051';
-$config['SMS_TIPS_PRE'] = '【纵横计量支付】';
-$config['SMS_TIPS'] = array('AUDIT_NOTICE' => $config['SMS_TIPS_PRE'] . '验证码:', 'END_MSG' => ',15分钟内有效。', 'AUDIT_NOTICE_AUDITOR' => ',已审批通过。请您继续审批。', 'AUDIT_NOTICE_AUDITOR2' => ',需要您继续审批。');
+$config['SMS_TIPS_PRE'] = '【纵横计量管理】';
+$config['SMS_TIPS'] = array('AUDIT_NOTICE' => $config['SMS_TIPS_PRE'] . '验证码:', 'END_MSG' => ',15分钟内有效。', 'AUDIT_NOTICE_AUDITOR' => ',已审批通过。请您继续审批。', 'AUDIT_NOTICE_AUDITOR2' => '本期需要您审批,请登录计量系统处理,谢谢。', 'AUDIT_NOTICE_AUDITOR3' => '本期审核已完成,请登录计量系统处理,谢谢。', 'AUDIT_NOTICE_AUDITOR4' => '本期审核不通过,请登录计量系统处理,谢谢。');

+ 14 - 2
protected/controller/ClientController.php

@@ -216,7 +216,7 @@ class ClientController extends DooController
                                 $verifyUserArray = $this->profile->getVerifiedMobile($firstAuditor['auditoruid']);
                                 $pmnameArray = $this->actmeasure->getRowByPmid($this->params['tenderid']);
                                 if (isset($verifyUserArray) && ($verifyUserArray['mobile'])) {// // XXXX(标段名),陈特,已审批通过。请您继续审批。
-                                    $this->__auditNotice($verifyUserArray['mobile'], Doo::conf()->SMS_TIPS_PRE . $pmnameArray["pmname"] . Doo::conf()->SMS_TIPS["AUDIT_NOTICE_AUDITOR2"]);
+                                    $this->__auditNotice($verifyUserArray['mobile'], Doo::conf()->SMS_TIPS_PRE . '您好,' . $pmnameArray["pmname"] . Doo::conf()->SMS_TIPS["AUDIT_NOTICE_AUDITOR2"]);
                                 }
                                 // SMS End
                             }
@@ -796,6 +796,11 @@ class ClientController extends DooController
                         if ($auditArray['last'] == '1') {// 根据标志位判断是否为最后一个审核人{ 判断当前审核人是什么角色 } 利用post发送的UID 与 当前期数参与的所有人比较
                             $this->measureauditact->setStatusTo($auditUserArray[0]['maid'], 3);
                             $this->numofperact->updateAuditStatus($_POST['tenderid'], $_POST['phaseno'], 'checked', $iniTimes);
+                            // SMS Start
+                            if (isset($verifyUserArray) && ($verifyUserArray['mobile'])) {// // XXXX(标段名),陈特,已审批通过。请您继续审批。
+                                $this->__auditNotice($verifyUserArray['mobile'], Doo::conf()->SMS_TIPS_PRE . '您好,' . $pmnameArray["pmname"] . Doo::conf()->SMS_TIPS["AUDIT_NOTICE_AUDITOR3"]);
+                            }
+                            // SMS End
                             echo json_encode(array('status' => TRUE, 'msg' => ''), JSON_UNESCAPED_UNICODE);
                             die();
                         } else {// 不是最后一个审核人根据不同审核人数量变更状态 {当前用户不是最后一个审核人}
@@ -819,7 +824,7 @@ class ClientController extends DooController
                                         }
                                         // SMS Start
                                         if (isset($verifyUserArray) && ($verifyUserArray['mobile'])) {// // XXXX(标段名),陈特,已审批通过。请您继续审批。
-                                            $this->__auditNotice($verifyUserArray['mobile'], Doo::conf()->SMS_TIPS_PRE . $pmnameArray["pmname"] . Doo::conf()->SMS_TIPS["AUDIT_NOTICE_AUDITOR2"]);
+                                            $this->__auditNotice($verifyUserArray['mobile'], Doo::conf()->SMS_TIPS_PRE . '您好,' . $pmnameArray["pmname"] . Doo::conf()->SMS_TIPS["AUDIT_NOTICE_AUDITOR2"]);
                                         }
                                         // SMS End
                                         $this->numofperact->updateAuditStatus($_POST['tenderid'], $_POST['phaseno'], 'checking', $iniTimes);
@@ -969,6 +974,13 @@ class ClientController extends DooController
                 }
                 $this->measureauditact->setCheckno($auditArray['maid'], $auditcontent);
                 $this->numofperact->updateAuditStatus($this->params['tenderid'], $this->params['phaseno'], 'checkno', $iniTimes);
+                // SMS Start
+                $TenderArray = $this->actmeasure->getRowByPmid($this->params['tenderid']);
+                $userProArray = $this->profile->getProWithUid($TenderArray['uid']);
+                if (isset($userProArray) && ($userProArray['mobile'])) {// // XXXX(标段名),陈特,已审批通过。请您继续审批。
+                    $this->__auditNotice($userProArray['mobile'], Doo::conf()->SMS_TIPS_PRE . '您好,' . $TenderArray["pmname"] . Doo::conf()->SMS_TIPS["AUDIT_NOTICE_AUDITOR4"]);
+                }
+                // SMS End
                 $fp = $this->upfile('upfile');
                 if (isset($fp[0]['filepath'])) {
                     // 解压缩文件等待以后直接使用

+ 9 - 1
protected/controller/RProjectController.php

@@ -474,7 +474,8 @@ class RProjectController extends DooController
                                 }
                                 // SMS Start
                                 if (isset($verifyUserArray) && ($verifyUserArray['mobile'])) {// XXXX(标段名),陈特,已审批通过。请您继续审批。
-                                    $retval = $this->__auditNotice($verifyUserArray['mobile'], Doo::conf()->SMS_TIPS_PRE . $pmnameArray["pmname"] . Doo::conf()->SMS_TIPS["AUDIT_NOTICE_AUDITOR2"]);
+//                                    $retval = $this->__auditNotice($verifyUserArray['mobile'], Doo::conf()->SMS_TIPS_PRE . $pmnameArray["pmname"] . Doo::conf()->SMS_TIPS["AUDIT_NOTICE_AUDITOR2"]);
+                                    $this->__auditNotice($verifyUserArray['mobile'], Doo::conf()->SMS_TIPS_PRE . '您好,' . $pmnameArray["pmname"] . Doo::conf()->SMS_TIPS["AUDIT_NOTICE_AUDITOR2"]);
 //                                        var_dump($pmnameArray["pmname"] . Doo::conf()->SMS_TIPS["AUDIT_NOTICE_AUDITOR2"]);
 //                                        var_dump($retval);
 //                                        var_dump($this->sms->getErrors());
@@ -493,6 +494,13 @@ class RProjectController extends DooController
             $this->measureauditact->setCheckno($auditArray['maid'], $_POST['content'], 1);
             $this->numofperact->updateAuditStatus($lastRowArray['pmid'], $lastRowArray['numpname'], 'checkno', $maxTimes['times']);
             $this->attfile->updateHash($lastRowArray['pmid'], $lastRowArray['numpname'], $maxTimes['times']);
+            // SMS Start
+            $TenderArray = $this->actmeasure->getRowByPmid($lastRowArray['pmid']);
+            $userProArray = $this->profile->getProWithUid($TenderArray['uid']);
+            if (isset($userProArray) && ($userProArray['mobile'])) {// // XXXX(标段名),陈特,已审批通过。请您继续审批。
+                $this->__auditNotice($userProArray['mobile'], Doo::conf()->SMS_TIPS_PRE . '您好,' . $TenderArray["pmname"] . Doo::conf()->SMS_TIPS["AUDIT_NOTICE_AUDITOR4"]);
+            }
+            // SMS End
             echo json_encode(array('status' => 1), JSON_UNESCAPED_UNICODE);
             die();
         }

+ 2 - 2
protected/view/edit-profile-sms.html

@@ -78,10 +78,10 @@
                                 <input type="checkbox" checked value="option1" disabled> 到我审批
                             </label>
                             <label class="checkbox inline">
-                                <input type="checkbox" checked value="option1" disabled> 到我审批
+                                <input type="checkbox" checked value="option1" disabled> 标段审批通过(上报人接收)
                             </label>
                             <label class="checkbox inline">
-                                <input type="checkbox" checked value="option1" disabled> 到我审批
+                                <input type="checkbox" checked value="option1" disabled> 标段审批不通过(上报人接收)
                             </label>
                         </div>
                     </div>