public function sendStatData($paramObj) { $user = $paramObj['user']; $ymd = $paramObj['ymd']; $eno = $user->eno; if (empty($ymd)) { $ymd = date('Y-m-d'); } $deptid = $paramObj['deptid']; $staffs = $paramObj['staff']; if (empty($deptid)) { $dept_name = '公司全员'; } else { $deptMgr = new Dept($this->conn, $this->conn_im, $this->container); $deptdata = $deptMgr->getInfo($deptid); $dept_name = $deptdata['deptname']; } $delay = $paramObj['delay']; //迟到人数 $notattendance = $paramObj['notattendance']; //未考勤人数 $hosturl = $_SERVER['HTTP_HOST']; $http = $_SERVER['HTTPS'] != 'on' ? 'http://' : 'https://'; $senddata = array(); // 'this is a test.click here http://112.126.77.162:8000/admin/theme/index.html'; $senddata['title'] = $dept_name . '考勤统计报表-' . $ymd; $senddata['text'] = '今日迟到 ' . $delay . ' 人,未考勤 ' . $notattendance . ' 人,...'; $senddata['img'] = $http . $hosturl . '/admin/theme/images/notes.png'; $senddata['source'] = '考勤管理系统'; $senddata['link'] = $http . $hosturl . '/admin/theme/modules/mobile/index.html?page=hr_attendance&ymd=' . $ymd . '&deptid=' . $deptid; $messagedata = Utils::WrapShearMessage('eim-chat-link', $senddata, $senddata['title']); $msg = Utils::WrapChatMessageXml($user->fafa_jid, $user->nick_name, $messagedata); Utils::sendChatMessage($user->fafa_jid, $staffs, $msg, $this->container); return Utils::WrapResultOK(''); }