|
@@ -27,6 +27,9 @@ class flow_sealaplClassModel extends flowModel
|
|
"advice_level1_leader_id"=>$this->flowarr[0]['nowcheckid']
|
|
"advice_level1_leader_id"=>$this->flowarr[0]['nowcheckid']
|
|
];
|
|
];
|
|
m('sealapl')->update($info, "id = {$this->id}");
|
|
m('sealapl')->update($info, "id = {$this->id}");
|
|
|
|
+
|
|
|
|
+ // 给部门领导发短信,提醒审批
|
|
|
|
+ $this->sendSealSms($this->id, 0); // 提醒领导审核
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -73,7 +76,7 @@ class flow_sealaplClassModel extends flowModel
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- //展示时替换一下
|
|
|
|
|
|
+ // 展示时替换一下
|
|
public function flowrsreplace($rs, $lx=0)
|
|
public function flowrsreplace($rs, $lx=0)
|
|
{
|
|
{
|
|
|
|
|
|
@@ -240,7 +243,6 @@ class flow_sealaplClassModel extends flowModel
|
|
return $arr;
|
|
return $arr;
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
// $ors当前单据操作信息,$crs提交过来的信息
|
|
// $ors当前单据操作信息,$crs提交过来的信息
|
|
public function flowoptmenu($ors, $crs)
|
|
public function flowoptmenu($ors, $crs)
|
|
{
|
|
{
|
|
@@ -252,6 +254,7 @@ class flow_sealaplClassModel extends flowModel
|
|
|
|
|
|
//审核之前调用$zt 状态, $sm说明
|
|
//审核之前调用$zt 状态, $sm说明
|
|
protected function flowcheckbefore($zt, $sm, $ufied) {
|
|
protected function flowcheckbefore($zt, $sm, $ufied) {
|
|
|
|
+
|
|
if ($zt == 1) {
|
|
if ($zt == 1) {
|
|
$nodes_old = $this->rs['notes'];
|
|
$nodes_old = $this->rs['notes'];
|
|
if (isset($this->nowcourse['step'])) {
|
|
if (isset($this->nowcourse['step'])) {
|
|
@@ -270,6 +273,7 @@ class flow_sealaplClassModel extends flowModel
|
|
// "notes"=>'部门领导-'.$this->rock->adminname.":".$sm
|
|
// "notes"=>'部门领导-'.$this->rock->adminname.":".$sm
|
|
];
|
|
];
|
|
|
|
|
|
|
|
+
|
|
} else if ($step_name == '办公室审批') {
|
|
} else if ($step_name == '办公室审批') {
|
|
$date = date('Y-m-d H:i:s'); // 办公室处理日期
|
|
$date = date('Y-m-d H:i:s'); // 办公室处理日期
|
|
// 获取当月最大id数据
|
|
// 获取当月最大id数据
|
|
@@ -346,7 +350,61 @@ class flow_sealaplClassModel extends flowModel
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+ //审核完成后调用
|
|
|
|
+ protected function flowcheckafter($zt, $sm){
|
|
|
|
+ if ($zt == 1) {
|
|
|
|
+ if ($this->nowcourse['step'] == 2) {
|
|
|
|
+ // 给办公室发短信题型审批
|
|
|
|
+ $this->sendSealSms($this->id, 1); // 提醒领导审核
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ protected function sendSealSms($id, $step) {
|
|
|
|
+
|
|
|
|
+ if (isset($this->rs) && !empty($this->rs)) {
|
|
|
|
+ $sealApl = m("sealapl")->getone("id={$id}");
|
|
|
|
+ $sealId = $sealApl['seal_name'];
|
|
|
|
+ $seal = m("seal")->getone("id = {$sealId}");
|
|
|
|
+ $leaderInfo = [];
|
|
|
|
+ $smsInfo = [];
|
|
|
|
+ $mobile = [];
|
|
|
|
+ if ($step == 0) {
|
|
|
|
+ $leaderId = $sealApl["advice_level1_leader_id"];
|
|
|
|
+ $leaderInfo = m("admin")->getone("id = {$leaderId}");
|
|
|
|
+
|
|
|
|
+ if (isset($leaderInfo)) {
|
|
|
|
+ $mobile[] = $leaderInfo['mobile']; // 领导短信
|
|
|
|
+ $dept = $this->rs['apply_dept']; // 申请部门
|
|
|
|
+ $name = $this->rs['optname']; // 申请人
|
|
|
|
+ $smsInfo[] = [
|
|
|
|
+ "username" => $dept."-".$name,
|
|
|
|
+ "seqlname" => $seal['name']
|
|
|
|
+ ];
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ } else if($step == 1) {
|
|
|
|
+ $sealAdmin = $seal['specialized_id'];
|
|
|
|
+ $leaderInfo = m("admin")->getall("id in ({$sealAdmin})");
|
|
|
|
+
|
|
|
|
+ foreach ($leaderInfo as $key=>$value) {
|
|
|
|
+ $mobile[] = $value['mobile'];
|
|
|
|
+ $dept = $this->rs['apply_dept']; // 申请部门
|
|
|
|
+ $name = $this->rs['optname']; // 申请人
|
|
|
|
+ $smsInfo[] = [
|
|
|
|
+ "username" => $dept."-".$name,
|
|
|
|
+ "seqlname" => $seal['name']
|
|
|
|
+ ];
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ m('send_sms')->sendBatchSms($mobile, $smsInfo, 101);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|