|
@@ -8,6 +8,8 @@ Doo::loadClass('contractact');
|
|
|
Doo::loadClass('actmeasure');
|
|
|
Doo::loadClass('measureauditact');
|
|
|
Doo::loadClass('numofperact');
|
|
|
+Doo::loadModelAt('aconfig', 'admin');
|
|
|
+Doo::loadClass('sms');
|
|
|
|
|
|
/**
|
|
|
* MainController
|
|
@@ -18,7 +20,7 @@ Doo::loadClass('numofperact');
|
|
|
class RProjectController extends DooController
|
|
|
{
|
|
|
|
|
|
- private $data, $auth, $attfile, $profile, $project, $contractact, $actmeasure, $measureauditact, $numofperact, $statusArray = array('uncheck' => '未审批', 'checking' => '审批中', 'checked' => '已审批', 'checkno' => '未通过');
|
|
|
+ private $data, $auth, $attfile, $profile, $project, $contractact, $actmeasure, $measureauditact, $numofperact, $statusArray = array('uncheck' => '未审批', 'checking' => '审批中', 'checked' => '已审批', 'checkno' => '未通过'), $aconfig, $sms;
|
|
|
|
|
|
public function __construct()
|
|
|
{
|
|
@@ -30,6 +32,8 @@ class RProjectController extends DooController
|
|
|
$this->actmeasure = new actMeasure();
|
|
|
$this->measureauditact = new MeasureauditAct();
|
|
|
$this->numofperact = new NumofperAct();
|
|
|
+ $this->aconfig = new AConfig();
|
|
|
+ $this->sms = new Sms(Doo::conf()->SMS_URL, Doo::conf()->SMS_AUTHKEY);
|
|
|
$this->data['rootUrl'] = Doo::conf()->APP_URL;
|
|
|
$this->data['currChannle'] = 'r';
|
|
|
$this->data['user'] = $this->profile->getProWithUid($this->auth->getUid());
|
|
@@ -365,6 +369,13 @@ class RProjectController extends DooController
|
|
|
$this->measureauditact->updateMastatus($auditUserArray[0]['maid']);
|
|
|
} else {
|
|
|
$this->measureauditact->updateMastatus($auditUserArray[$k + 1]['maid']);
|
|
|
+ // SMS Start
|
|
|
+ $verifyUserArray = $this->profile->getVerifiedMobile($auditUserArray[$k + 1]['auditoruid']);
|
|
|
+ $pmnameArray = $this->actmeasure->getRowByPmid($auditUserArray[$k + 1]['pmid']);
|
|
|
+ if (isset($verifyUserArray) && ($verifyUserArray['mobile'])) {
|
|
|
+ $this->__auditNotice($verifyUserArray['mobile'], $pmnameArray["pmname"] . ',' . $verifyUserArray["name"] . Doo::conf()->SMS_TIPS["AUDIT_NOTICE_AUDITOR"]);
|
|
|
+ }
|
|
|
+ // SMS End
|
|
|
}
|
|
|
$this->numofperact->updateAuditStatus($lastRowArray['pmid'], $lastRowArray['numpname'], 'checking', $maxTimes['times']);
|
|
|
echo json_encode(array('status' => 1), JSON_UNESCAPED_UNICODE);
|
|
@@ -425,6 +436,18 @@ class RProjectController extends DooController
|
|
|
$this->data['mpid'] = $this->params['mpid'];
|
|
|
$this->render('r-project-section-report', $this->data, TRUE);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 。
|
|
|
+ * 标段ID,期号
|
|
|
+ */
|
|
|
+ private function __auditNotice($mobile, $text)
|
|
|
+ {
|
|
|
+ $smsSwitch = $this->aconfig->getOne(array('select' => 'smsSwitch', 'asArray' => TRUE))['smsSwitch'];
|
|
|
+ if ($smsSwitch > 0)
|
|
|
+ return $this->sms->sendSms($mobile, $text);
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
?>
|