|
@@ -88,15 +88,7 @@ class flow_meetingClassModel extends flowModel
|
|
|
return $rs;
|
|
|
}
|
|
|
|
|
|
- public function getstatezt($zt)
|
|
|
- {
|
|
|
- if (isset($this->hyarrb[$zt])) {
|
|
|
- $html = '<font color="'.$this->hyarrb[$zt].'">'.$this->hyarra[$zt].'</font>';
|
|
|
- return $html;
|
|
|
- } else {
|
|
|
- return null;
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
// $ors当前单据操作信息,$crs提交过来的信息
|
|
|
public function flowoptmenu($ors, $crs)
|
|
@@ -170,10 +162,39 @@ class flow_meetingClassModel extends flowModel
|
|
|
}
|
|
|
|
|
|
//流程全部完成后调用
|
|
|
- public function flowcheckfinsh($sm) {
|
|
|
+// public function flowcheckfinsh($sm) {
|
|
|
+ protected function flowcheckfinsh($sm){
|
|
|
+
|
|
|
+ // 审批完成给负责人发短信
|
|
|
+ $meeting = m("meeting")->getone("id={$this->id}");
|
|
|
+ if (empty($meeting)) return;
|
|
|
+ m("log")->addlog("会议室审批", "发送短信给".$meeting['attendees']."部门负责人");
|
|
|
+
|
|
|
+ foreach (explode(',', $meeting['attendees_id']) as $val) {
|
|
|
+ if (substr($val, 0,1) == 'u') {
|
|
|
+ $users[] = substr($val, 1);
|
|
|
+ } else if (substr($val, 0,1) == 'd') {
|
|
|
+ $depts[] = substr($val, 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $users = m("admin")->getall("id in (".implode(',', $users).")");
|
|
|
|
|
|
- // 会议议题状态全部设置为1
|
|
|
-// m('meeting_topics')->update(['topic_state'=>'1'], 'mid='.$this->id);
|
|
|
+ $mobile = [];
|
|
|
+ foreach ($users as $val) {
|
|
|
+ $mobile[] = $val['mobile'];
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!empty($depts)) {
|
|
|
+ $deptSql = "select distinct b.mobile from [Q]dept a left join [Q]admin b on a.headid = b.id where a.id in (".implode(',', $depts).") and a.headid is not null";
|
|
|
+ m("log")->addlog("会议室审批", $deptSql);
|
|
|
+ $depts = $this->db->getall($deptSql);
|
|
|
+ // 部门负责人手机号
|
|
|
+ foreach ($depts as $val) {
|
|
|
+ $mobile[] = $val['mobile'];
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ m("log")->addlog("会议室审批", "短信包括:".implode(' ', $mobile));
|
|
|
|
|
|
}
|
|
|
|
|
@@ -188,6 +209,16 @@ class flow_meetingClassModel extends flowModel
|
|
|
|
|
|
|
|
|
|
|
|
+ public function getstatezt($zt)
|
|
|
+ {
|
|
|
+ if (isset($this->hyarrb[$zt])) {
|
|
|
+ $html = '<font color="'.$this->hyarrb[$zt].'">'.$this->hyarra[$zt].'</font>';
|
|
|
+ return $html;
|
|
|
+ } else {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
|
|
|
}
|